feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94

Merged
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813
Aug 14, 2026
Merged

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85)#94
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch orch/issues-20260813.

Verification

  • Full bats suite on the merged tree: 521/521 pass, 0 failures
  • wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)
  • Shallow-clone (depth-1) probe: the new commit-purity test skips honestly; runs for real on full clones
  • Review process dogfooded the new pass: two real defects caught and fixed in rework rounds (working-tree purity assertion → commit-anchored; shallow-clone history falsity → --is-shallow-repository guard)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj

dch0202and others added 11 commits August 14, 2026 10:25
Give the wiki's routing protocol a review-time entry point: AGENTS.md's
routing protocol gains step 7, a diff-signal decision table plus a
page-set comparison directive, and both AGENTS.md and INDEX.md's
preambles now name task and diff as the protocol's two inputs.
Steps 1-6 and the Hard rule paragraph are untouched. Adds
tests/review-routing.bats with a negative control proving the new
checks can fail.
Two review-relevant failure classes had no reachable wiki page: a CLI
flag/subcommand/API method that exists locally but not at the execution
site, and two objects written non-atomically with a reader that can
observe the gap. Adds both pages under platforms/toolchains and
backend/common/storage with sourced Do-this tables and edge cases, plus
one review-voice index row each.
Closes#85
Replace Phase 4's one-sentence review method with a fixed pass of four
lenses (plan conformance, wiki re-route via AGENTS.md step 7,
execution-environment reality, multi-object write ordering), each
grounded in a named document, plus templates/review-report.md as the
source for reviews/<task>-rN.md's three-part finding format.
Closes#82.
session-prompt.md §3/§O3 previously forced rework compliance ("Address the
issues...") through an information gap: the coordinator sees the diff but
not the constraint the worker hit. Give the worker the matching half of
i82's Socratic finding format — per blocking finding, fix it or answer its
Question with the concrete reason and leave it, recorded via an in-file
`- **Answer (r{N})**` line; silence on any finding is not a valid
resolution. §O3 additionally requires the worker_done --body to summarize
per-finding outcomes so the coordinator sees the split without opening the
review file. Non-blocking findings are excluded from the obligation.
Also bumps the pre-existing pinned checksum in tests/send-prompt.bats
("the Orca prompt set is byte-identical"), which hashes the exact byte
range covering §O3 and necessarily changed; scoped to the checksum literal
and its precedent-style bump-comment only, per that test's own documented
maintenance convention and coordinator sign-off.
Closes#84.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvxaV9oGPZmpKXh6EsLBh3
…dings
Add the near-miss capture rule to Phase 4: after a rework round's fix is
confirmed by re-review, emit one Insight candidate per fixed
`## Findings` item (never for `## Non-blocking`), using the frozen block
format and 0-3/session cap, with a fenced worked example whose
placeholder trigger/directive keep it from being self-harvested if ever
quoted verbatim.
Also fixes i82's scope-purity test (tests/orchestrate-review-pass.bats):
anchor to the commit that introduced the file instead of live git-status
(avoids false positives from a sibling task's uncommitted files on this
shared branch), and skip honestly on a shallow clone where the adding
commit cannot be resolved truthfully.
Closes#83.
session-prompt.md wraps the §O3 "fix it, or answer its Question" phrase
across two physical lines. The literal-space glob in
session-prompt-rework.bats couldn't match the resulting newline, so the
suite passed locally (bats/eval artifact) but failed on ubuntu bash 5 in
CI (PR #94, not ok 433). Add normalize_ws() and apply it to the two §O3
tests' extracted section before matching; the §3 single-physical-line
structural test keeps raw extraction since it exists to detect embedded
newlines.
@choiyounggi
choiyounggi merged commit 276c921 into mainAug 14, 2026
2 checks passed
@choiyounggi
choiyounggi deleted the orch/issues-20260813 branch August 14, 2026 05:32
choiyounggi pushed a commit that referenced this pull request Aug 14, 2026
… for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
choiyounggi added a commit that referenced this pull request Aug 14, 2026
…ason surfacing, merge-on-approval (#87#90) (#102)
* fix(orchestrate): {ORCH_DIR} absolute-path token for worker-facing orchestration artifacts (#87)
Worker-facing templates referenced briefs/plans/reviews via bare
`.orchestration/...` relative paths, which resolve to nothing once a
worker's cwd is its own worktree. Introduce {ORCH_DIR} (substituted
like {STATUS_DIR}) and convert every such reference in
session-prompt.md (§1-§4, §O1-§O4) and brief.md to it, including the
ad-hoc `$(dirname {STATUS_DIR})/reviews/...` form in §3/§O3. Document
the two-convention rule (orchestration artifacts absolute, repo files
relative) in SKILL.md next to the brief/plan composition text.
Bump the pinned Orca-block cksum in tests/send-prompt.bats to match,
per that test's own same-commit-update convention.
* fix(orchestrate): watch-status.sh reached-target stall-skip + stall-reason surfacing (#88, #89)
A worker already at/above the watched target phase was still stall-checked
and could false-report exit 7 even though its silence was exactly what the
session prompt ordered. The stall check now gates on rank < target_rank;
the dead-worker/liveness check is unchanged and still applies.
When a genuine stall IS reported, classify_stall() reads the pane scrollback
(capture-pane -S -1000) and enriches the exit-7 message with a usage-limit
reset time or chooser-pending state, falling back to the bare message
otherwise. LO_LIMIT_EXTRA additively extends the usage-limit pattern.
Annotations use octal printf escapes (\302\267, \342\200\224) rather than
\xNN hex escapes, since dash (ubuntu CI's /bin/sh) does not interpret \x.
* fix(orchestrate): merge-on-approval dispatch rule + observable worktree base (#90)
A dependent task's worktree previously only received its dependencies'
signatures (Phase 3 step 0 injection), never their merged code, because
merging happened only at Phase 6. Document the gap, adopt merge-on-approval
(merge before returning to ready-set on approval, verified via
git merge-base --is-ancestor) as the dispatch-loop contract, and print each
new worktree's base commit from setup-worktrees.sh so it's checkable.
* fix(orchestrate): keep 'return to step 1 of the dispatch' on one line for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…ession suite from ambient env (#99, #100) (#105)
* test(orchestrate): delete two wave-scoped scope-purity guards (fixes#99)
The #81-#85 wave's per-task scope-purity guards anchored on that wave's
live state: a hardcoded task-file allowlist checked against
`git status --porcelain`, and "the commit that added this file" via
`git log --diff-filter=A`. PR #94 squash-merged the wave, collapsing
the single-file-add commit into a multi-file commit and leaving the
allowlist landmine for any future dirty worktree — the review-pass
guard is now permanently red on main, and the insight-emission guard
is a false-positive trap.
Both guards' consequence (this wave's task touched only its owned
files) is uncomputable now that the wave is over: per
wiki/testing/quality/guard-shape-vs-consequence.md, an uncomputable
consequence narrows the guard's scope, and a finished historical wave
narrows to zero. Deleting outright (not exempting, not skip-on-squash)
avoids an accumulating allow-list and avoids adding a guard that always
skips on main, which is itself a check that cannot fail
(wiki/testing/quality/tests-that-cannot-fail.md).
No replacement guard: scope purity for future orchestration waves is
already served live by the coordinator's Phase 4 diff review and each
task brief's <out_of_scope>, so a repo-persistent guard keyed to a
transient wave would just recreate the same rot.
tests/orchestrate-insight-emission.bats + tests/orchestrate-review-pass.bats:
25 -> 23 tests, 1 failure -> 0. Full `bats tests/` (env-isolated):
556/556, 0 failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhwvK2TGfsRV9TQW7Xr6dB
* test(launch-session): isolate suite from ambient LO_*/GROUNDWORK_* env (fixes#100)
A worker session running this suite inherits LO_RUN_ID/LO_STATUS_DIR/
LO_TASK_ID (and GROUNDWORK_*) from its own launch, and `env VAR=val`
in a test's `run` line merges with — not replaces — that inherited
environment. Six tests failed under a worker, and worse, a leaked real
LO_STATUS_DIR let the suite overwrite a live run's status file
(t90.json in i8790).
setup() now unsets every LO_*/GROUNDWORK_*/DEV_LOOP_* variable
launch-session.sh or its status-update.sh callee reads; tests that
need a value keep setting it explicitly per-invocation, which
overrides the unset.
A CONTAMINATION GUARD test plants real-looking decoy status/escalation
dirs as ambient env, re-runs the one boundary test that relies solely
on setup()'s isolation as a nested bats process, and asserts both an
unchanged outcome and zero files in the decoys. Negative control
verified 2026-08-14: with the unset block removed, the decoy gains a
zzz.json, reproducing the live contamination.
Verified: 28/28 in launch-session.bats (clean and ambient-env runs),
full suite green (exit 0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) (#108)
* fix(orchestrate): guard cmd_send against unsubmitted [Pasted text] placeholders (#96)
send-prompt.sh's cmd_send could report "delivered" while the prompt was
actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the
worker's input box -- tmux send-keys reports success as soon as the bytes
reach the tty, regardless of whether the CLI consumed them. Field-confirmed
2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on
[Pasted text #4] until one extra Enter unstuck it.
Port the same guard launch-session.sh already uses for the first injection:
after the existing queued_pat check, detect the placeholder in the
post-send pane capture and retry with Enter, bounded to 3 attempts
(LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present
after the bound reports "unconfirmed" (exit 7), never a guessed "delivered".
The exit-code contract and one-token stdout are unchanged.
Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error:
persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still
wins when both indicators are present) via a scripted fake tmux that returns
a different pane capture on each successive call. Verified against a
guard-stripped mutant: the normal/error cases fail without the fix.
bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
* fix(orchestrate): gate status-update.sh session resolution on $TMUX, document failed-phase reset (#97)
A coordinator-shell caller (outside tmux) running status-update.sh got
tmux display-message answering with the server's most-recently-active
session instead of its own -- there is no $TMUX check before consulting
it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION
still wins unconditionally, and behavior inside tmux or with
STATUS_SESSION set is unchanged.
Also document, in SKILL.md's exit-6 question playbook, the reset step
needed after a worker records phase=failed and the coordinator resolves
it via ask-coordinator -- otherwise watch-status.sh keeps counting the
stale failed phase and re-aborts with exit 3 on every subsequent poll.
The reset is a normal status-update.sh write with the observed phase,
not a new phase word. Document STATUS_SESSION for coordinator-side
calls in the Session knobs paragraph.
Sub-item (c) (stale `error` field surviving merges) is deliberately
skipped per plan decision D5 -- nothing reads that field today.
Extends tests/status-update.bats with normal/regression/boundary cases
for the $TMUX gating; full bats tests/ green (560/560).
* feat(wiki): seed gap categories G1-G6 for issue #38
Add 6 sourced, lint-clean wiki pages closing the highest-priority
wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes
(existing api-design category), data-backfill-migrations (existing
operations category), feature-flag-lifecycle (existing deploy category),
and two new categories — backend/common/architecture
(sync-vs-async-integration) and backend/common/realtime
(websocket-sse-lifecycle). Register every page in its domain index with
a load-when trigger, and extend the root INDEX.md backend route-line for
the two new categories per the mechanical index-registration precedent.
G1 is scoped to sync-vs-async-integration only; the other two
categories.md sub-topics (module-boundaries-and-layering,
event-driven-adoption-criteria) are intentionally left out as future
ingest candidates on issue #38, not silently dropped. G7-G10 stay open
on the issue.
Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61
to 64 directive units (coordinator-approved carve-out, scoped to exactly
this one assertion) — the 6 new pages' Do-this/Instead-of rows push the
real corpus count past the number the test had frozen. The stale
assertion still reported "ok" locally on macOS bash 3.2 due to a
[[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the
test; verified against a bash 5.2 (ubuntu-matching) run that it
genuinely fails without this fix, the same CI-only-failure class as
PR #94/§O3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@choiyounggichoiyounggi mentioned this pull request Aug 17, 2026
1 task
choiyounggi added a commit that referenced this pull request Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109)
Rolls up everything merged since 1.6.0:
- #94: review-time wiki routing, four-lens Phase 4 pass, insight emission,
socratic rework, failure-class pages
- #93: enforceable prohibition lint rule, disjoint routing scopes, flush
concurrency
- #102 (#87#90): {ORCH_DIR} path token, watch-status stall gating + reason
surfacing, merge-on-approval
- #105 (#99, #100): stale scope-purity guards deleted, launch-session suite
isolated from ambient LO_*/GROUNDWORK_* env
- #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry,
$TMUX-gated status-update session resolution + failed-phase reset playbook,
wiki gap seed pages G1–G6
Version bump propagates the send-prompt.sh delivery-confirmation fix to
plugin consumers (groundwork references dev-loop by URL; the cache updates
on version change).
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@choiyounggi
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all \u003cpre\u003e\u003ccode\u003e blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks"); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); (function(){ try { var __m = "github.com"; var __re = new RegExp('^' + "github\\.com" + '
Skip to content

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94

Merged
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813
Aug 14, 2026
Merged

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85)#94
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch orch/issues-20260813.

Verification

  • Full bats suite on the merged tree: 521/521 pass, 0 failures
  • wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)
  • Shallow-clone (depth-1) probe: the new commit-purity test skips honestly; runs for real on full clones
  • Review process dogfooded the new pass: two real defects caught and fixed in rework rounds (working-tree purity assertion → commit-anchored; shallow-clone history falsity → --is-shallow-repository guard)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj

dch0202and others added 11 commits August 14, 2026 10:25
Give the wiki's routing protocol a review-time entry point: AGENTS.md's
routing protocol gains step 7, a diff-signal decision table plus a
page-set comparison directive, and both AGENTS.md and INDEX.md's
preambles now name task and diff as the protocol's two inputs.
Steps 1-6 and the Hard rule paragraph are untouched. Adds
tests/review-routing.bats with a negative control proving the new
checks can fail.
Two review-relevant failure classes had no reachable wiki page: a CLI
flag/subcommand/API method that exists locally but not at the execution
site, and two objects written non-atomically with a reader that can
observe the gap. Adds both pages under platforms/toolchains and
backend/common/storage with sourced Do-this tables and edge cases, plus
one review-voice index row each.
Closes#85
Replace Phase 4's one-sentence review method with a fixed pass of four
lenses (plan conformance, wiki re-route via AGENTS.md step 7,
execution-environment reality, multi-object write ordering), each
grounded in a named document, plus templates/review-report.md as the
source for reviews/<task>-rN.md's three-part finding format.
Closes#82.
session-prompt.md §3/§O3 previously forced rework compliance ("Address the
issues...") through an information gap: the coordinator sees the diff but
not the constraint the worker hit. Give the worker the matching half of
i82's Socratic finding format — per blocking finding, fix it or answer its
Question with the concrete reason and leave it, recorded via an in-file
`- **Answer (r{N})**` line; silence on any finding is not a valid
resolution. §O3 additionally requires the worker_done --body to summarize
per-finding outcomes so the coordinator sees the split without opening the
review file. Non-blocking findings are excluded from the obligation.
Also bumps the pre-existing pinned checksum in tests/send-prompt.bats
("the Orca prompt set is byte-identical"), which hashes the exact byte
range covering §O3 and necessarily changed; scoped to the checksum literal
and its precedent-style bump-comment only, per that test's own documented
maintenance convention and coordinator sign-off.
Closes#84.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvxaV9oGPZmpKXh6EsLBh3
…dings
Add the near-miss capture rule to Phase 4: after a rework round's fix is
confirmed by re-review, emit one Insight candidate per fixed
`## Findings` item (never for `## Non-blocking`), using the frozen block
format and 0-3/session cap, with a fenced worked example whose
placeholder trigger/directive keep it from being self-harvested if ever
quoted verbatim.
Also fixes i82's scope-purity test (tests/orchestrate-review-pass.bats):
anchor to the commit that introduced the file instead of live git-status
(avoids false positives from a sibling task's uncommitted files on this
shared branch), and skip honestly on a shallow clone where the adding
commit cannot be resolved truthfully.
Closes#83.
session-prompt.md wraps the §O3 "fix it, or answer its Question" phrase
across two physical lines. The literal-space glob in
session-prompt-rework.bats couldn't match the resulting newline, so the
suite passed locally (bats/eval artifact) but failed on ubuntu bash 5 in
CI (PR #94, not ok 433). Add normalize_ws() and apply it to the two §O3
tests' extracted section before matching; the §3 single-physical-line
structural test keeps raw extraction since it exists to detect embedded
newlines.
@choiyounggi
choiyounggi merged commit 276c921 into mainAug 14, 2026
2 checks passed
@choiyounggi
choiyounggi deleted the orch/issues-20260813 branch August 14, 2026 05:32
choiyounggi pushed a commit that referenced this pull request Aug 14, 2026
… for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
choiyounggi added a commit that referenced this pull request Aug 14, 2026
…ason surfacing, merge-on-approval (#87#90) (#102)
* fix(orchestrate): {ORCH_DIR} absolute-path token for worker-facing orchestration artifacts (#87)
Worker-facing templates referenced briefs/plans/reviews via bare
`.orchestration/...` relative paths, which resolve to nothing once a
worker's cwd is its own worktree. Introduce {ORCH_DIR} (substituted
like {STATUS_DIR}) and convert every such reference in
session-prompt.md (§1-§4, §O1-§O4) and brief.md to it, including the
ad-hoc `$(dirname {STATUS_DIR})/reviews/...` form in §3/§O3. Document
the two-convention rule (orchestration artifacts absolute, repo files
relative) in SKILL.md next to the brief/plan composition text.
Bump the pinned Orca-block cksum in tests/send-prompt.bats to match,
per that test's own same-commit-update convention.
* fix(orchestrate): watch-status.sh reached-target stall-skip + stall-reason surfacing (#88, #89)
A worker already at/above the watched target phase was still stall-checked
and could false-report exit 7 even though its silence was exactly what the
session prompt ordered. The stall check now gates on rank < target_rank;
the dead-worker/liveness check is unchanged and still applies.
When a genuine stall IS reported, classify_stall() reads the pane scrollback
(capture-pane -S -1000) and enriches the exit-7 message with a usage-limit
reset time or chooser-pending state, falling back to the bare message
otherwise. LO_LIMIT_EXTRA additively extends the usage-limit pattern.
Annotations use octal printf escapes (\302\267, \342\200\224) rather than
\xNN hex escapes, since dash (ubuntu CI's /bin/sh) does not interpret \x.
* fix(orchestrate): merge-on-approval dispatch rule + observable worktree base (#90)
A dependent task's worktree previously only received its dependencies'
signatures (Phase 3 step 0 injection), never their merged code, because
merging happened only at Phase 6. Document the gap, adopt merge-on-approval
(merge before returning to ready-set on approval, verified via
git merge-base --is-ancestor) as the dispatch-loop contract, and print each
new worktree's base commit from setup-worktrees.sh so it's checkable.
* fix(orchestrate): keep 'return to step 1 of the dispatch' on one line for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…ession suite from ambient env (#99, #100) (#105)
* test(orchestrate): delete two wave-scoped scope-purity guards (fixes#99)
The #81-#85 wave's per-task scope-purity guards anchored on that wave's
live state: a hardcoded task-file allowlist checked against
`git status --porcelain`, and "the commit that added this file" via
`git log --diff-filter=A`. PR #94 squash-merged the wave, collapsing
the single-file-add commit into a multi-file commit and leaving the
allowlist landmine for any future dirty worktree — the review-pass
guard is now permanently red on main, and the insight-emission guard
is a false-positive trap.
Both guards' consequence (this wave's task touched only its owned
files) is uncomputable now that the wave is over: per
wiki/testing/quality/guard-shape-vs-consequence.md, an uncomputable
consequence narrows the guard's scope, and a finished historical wave
narrows to zero. Deleting outright (not exempting, not skip-on-squash)
avoids an accumulating allow-list and avoids adding a guard that always
skips on main, which is itself a check that cannot fail
(wiki/testing/quality/tests-that-cannot-fail.md).
No replacement guard: scope purity for future orchestration waves is
already served live by the coordinator's Phase 4 diff review and each
task brief's <out_of_scope>, so a repo-persistent guard keyed to a
transient wave would just recreate the same rot.
tests/orchestrate-insight-emission.bats + tests/orchestrate-review-pass.bats:
25 -> 23 tests, 1 failure -> 0. Full `bats tests/` (env-isolated):
556/556, 0 failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhwvK2TGfsRV9TQW7Xr6dB
* test(launch-session): isolate suite from ambient LO_*/GROUNDWORK_* env (fixes#100)
A worker session running this suite inherits LO_RUN_ID/LO_STATUS_DIR/
LO_TASK_ID (and GROUNDWORK_*) from its own launch, and `env VAR=val`
in a test's `run` line merges with — not replaces — that inherited
environment. Six tests failed under a worker, and worse, a leaked real
LO_STATUS_DIR let the suite overwrite a live run's status file
(t90.json in i8790).
setup() now unsets every LO_*/GROUNDWORK_*/DEV_LOOP_* variable
launch-session.sh or its status-update.sh callee reads; tests that
need a value keep setting it explicitly per-invocation, which
overrides the unset.
A CONTAMINATION GUARD test plants real-looking decoy status/escalation
dirs as ambient env, re-runs the one boundary test that relies solely
on setup()'s isolation as a nested bats process, and asserts both an
unchanged outcome and zero files in the decoys. Negative control
verified 2026-08-14: with the unset block removed, the decoy gains a
zzz.json, reproducing the live contamination.
Verified: 28/28 in launch-session.bats (clean and ambient-env runs),
full suite green (exit 0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) (#108)
* fix(orchestrate): guard cmd_send against unsubmitted [Pasted text] placeholders (#96)
send-prompt.sh's cmd_send could report "delivered" while the prompt was
actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the
worker's input box -- tmux send-keys reports success as soon as the bytes
reach the tty, regardless of whether the CLI consumed them. Field-confirmed
2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on
[Pasted text #4] until one extra Enter unstuck it.
Port the same guard launch-session.sh already uses for the first injection:
after the existing queued_pat check, detect the placeholder in the
post-send pane capture and retry with Enter, bounded to 3 attempts
(LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present
after the bound reports "unconfirmed" (exit 7), never a guessed "delivered".
The exit-code contract and one-token stdout are unchanged.
Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error:
persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still
wins when both indicators are present) via a scripted fake tmux that returns
a different pane capture on each successive call. Verified against a
guard-stripped mutant: the normal/error cases fail without the fix.
bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
* fix(orchestrate): gate status-update.sh session resolution on $TMUX, document failed-phase reset (#97)
A coordinator-shell caller (outside tmux) running status-update.sh got
tmux display-message answering with the server's most-recently-active
session instead of its own -- there is no $TMUX check before consulting
it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION
still wins unconditionally, and behavior inside tmux or with
STATUS_SESSION set is unchanged.
Also document, in SKILL.md's exit-6 question playbook, the reset step
needed after a worker records phase=failed and the coordinator resolves
it via ask-coordinator -- otherwise watch-status.sh keeps counting the
stale failed phase and re-aborts with exit 3 on every subsequent poll.
The reset is a normal status-update.sh write with the observed phase,
not a new phase word. Document STATUS_SESSION for coordinator-side
calls in the Session knobs paragraph.
Sub-item (c) (stale `error` field surviving merges) is deliberately
skipped per plan decision D5 -- nothing reads that field today.
Extends tests/status-update.bats with normal/regression/boundary cases
for the $TMUX gating; full bats tests/ green (560/560).
* feat(wiki): seed gap categories G1-G6 for issue #38
Add 6 sourced, lint-clean wiki pages closing the highest-priority
wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes
(existing api-design category), data-backfill-migrations (existing
operations category), feature-flag-lifecycle (existing deploy category),
and two new categories — backend/common/architecture
(sync-vs-async-integration) and backend/common/realtime
(websocket-sse-lifecycle). Register every page in its domain index with
a load-when trigger, and extend the root INDEX.md backend route-line for
the two new categories per the mechanical index-registration precedent.
G1 is scoped to sync-vs-async-integration only; the other two
categories.md sub-topics (module-boundaries-and-layering,
event-driven-adoption-criteria) are intentionally left out as future
ingest candidates on issue #38, not silently dropped. G7-G10 stay open
on the issue.
Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61
to 64 directive units (coordinator-approved carve-out, scoped to exactly
this one assertion) — the 6 new pages' Do-this/Instead-of rows push the
real corpus count past the number the test had frozen. The stale
assertion still reported "ok" locally on macOS bash 3.2 due to a
[[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the
test; verified against a bash 5.2 (ubuntu-matching) run that it
genuinely fails without this fix, the same CI-only-failure class as
PR #94/§O3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@choiyounggichoiyounggi mentioned this pull request Aug 17, 2026
1 task
choiyounggi added a commit that referenced this pull request Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109)
Rolls up everything merged since 1.6.0:
- #94: review-time wiki routing, four-lens Phase 4 pass, insight emission,
socratic rework, failure-class pages
- #93: enforceable prohibition lint rule, disjoint routing scopes, flush
concurrency
- #102 (#87#90): {ORCH_DIR} path token, watch-status stall gating + reason
surfacing, merge-on-approval
- #105 (#99, #100): stale scope-purity guards deleted, launch-session suite
isolated from ambient LO_*/GROUNDWORK_* env
- #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry,
$TMUX-gated status-update session resolution + failed-phase reset playbook,
wiki gap seed pages G1–G6
Version bump propagates the send-prompt.sh delivery-confirmation fix to
plugin consumers (groundwork references dev-loop by URL; the cache updates
on version change).
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@choiyounggi
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94

Merged
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813
Aug 14, 2026
Merged

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85)#94
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch orch/issues-20260813.

Verification

  • Full bats suite on the merged tree: 521/521 pass, 0 failures
  • wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)
  • Shallow-clone (depth-1) probe: the new commit-purity test skips honestly; runs for real on full clones
  • Review process dogfooded the new pass: two real defects caught and fixed in rework rounds (working-tree purity assertion → commit-anchored; shallow-clone history falsity → --is-shallow-repository guard)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj

dch0202and others added 11 commits August 14, 2026 10:25
Give the wiki's routing protocol a review-time entry point: AGENTS.md's
routing protocol gains step 7, a diff-signal decision table plus a
page-set comparison directive, and both AGENTS.md and INDEX.md's
preambles now name task and diff as the protocol's two inputs.
Steps 1-6 and the Hard rule paragraph are untouched. Adds
tests/review-routing.bats with a negative control proving the new
checks can fail.
Two review-relevant failure classes had no reachable wiki page: a CLI
flag/subcommand/API method that exists locally but not at the execution
site, and two objects written non-atomically with a reader that can
observe the gap. Adds both pages under platforms/toolchains and
backend/common/storage with sourced Do-this tables and edge cases, plus
one review-voice index row each.
Closes#85
Replace Phase 4's one-sentence review method with a fixed pass of four
lenses (plan conformance, wiki re-route via AGENTS.md step 7,
execution-environment reality, multi-object write ordering), each
grounded in a named document, plus templates/review-report.md as the
source for reviews/<task>-rN.md's three-part finding format.
Closes#82.
session-prompt.md §3/§O3 previously forced rework compliance ("Address the
issues...") through an information gap: the coordinator sees the diff but
not the constraint the worker hit. Give the worker the matching half of
i82's Socratic finding format — per blocking finding, fix it or answer its
Question with the concrete reason and leave it, recorded via an in-file
`- **Answer (r{N})**` line; silence on any finding is not a valid
resolution. §O3 additionally requires the worker_done --body to summarize
per-finding outcomes so the coordinator sees the split without opening the
review file. Non-blocking findings are excluded from the obligation.
Also bumps the pre-existing pinned checksum in tests/send-prompt.bats
("the Orca prompt set is byte-identical"), which hashes the exact byte
range covering §O3 and necessarily changed; scoped to the checksum literal
and its precedent-style bump-comment only, per that test's own documented
maintenance convention and coordinator sign-off.
Closes#84.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvxaV9oGPZmpKXh6EsLBh3
…dings
Add the near-miss capture rule to Phase 4: after a rework round's fix is
confirmed by re-review, emit one Insight candidate per fixed
`## Findings` item (never for `## Non-blocking`), using the frozen block
format and 0-3/session cap, with a fenced worked example whose
placeholder trigger/directive keep it from being self-harvested if ever
quoted verbatim.
Also fixes i82's scope-purity test (tests/orchestrate-review-pass.bats):
anchor to the commit that introduced the file instead of live git-status
(avoids false positives from a sibling task's uncommitted files on this
shared branch), and skip honestly on a shallow clone where the adding
commit cannot be resolved truthfully.
Closes#83.
session-prompt.md wraps the §O3 "fix it, or answer its Question" phrase
across two physical lines. The literal-space glob in
session-prompt-rework.bats couldn't match the resulting newline, so the
suite passed locally (bats/eval artifact) but failed on ubuntu bash 5 in
CI (PR #94, not ok 433). Add normalize_ws() and apply it to the two §O3
tests' extracted section before matching; the §3 single-physical-line
structural test keeps raw extraction since it exists to detect embedded
newlines.
@choiyounggi
choiyounggi merged commit 276c921 into mainAug 14, 2026
2 checks passed
@choiyounggi
choiyounggi deleted the orch/issues-20260813 branch August 14, 2026 05:32
choiyounggi pushed a commit that referenced this pull request Aug 14, 2026
… for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
choiyounggi added a commit that referenced this pull request Aug 14, 2026
…ason surfacing, merge-on-approval (#87#90) (#102)
* fix(orchestrate): {ORCH_DIR} absolute-path token for worker-facing orchestration artifacts (#87)
Worker-facing templates referenced briefs/plans/reviews via bare
`.orchestration/...` relative paths, which resolve to nothing once a
worker's cwd is its own worktree. Introduce {ORCH_DIR} (substituted
like {STATUS_DIR}) and convert every such reference in
session-prompt.md (§1-§4, §O1-§O4) and brief.md to it, including the
ad-hoc `$(dirname {STATUS_DIR})/reviews/...` form in §3/§O3. Document
the two-convention rule (orchestration artifacts absolute, repo files
relative) in SKILL.md next to the brief/plan composition text.
Bump the pinned Orca-block cksum in tests/send-prompt.bats to match,
per that test's own same-commit-update convention.
* fix(orchestrate): watch-status.sh reached-target stall-skip + stall-reason surfacing (#88, #89)
A worker already at/above the watched target phase was still stall-checked
and could false-report exit 7 even though its silence was exactly what the
session prompt ordered. The stall check now gates on rank < target_rank;
the dead-worker/liveness check is unchanged and still applies.
When a genuine stall IS reported, classify_stall() reads the pane scrollback
(capture-pane -S -1000) and enriches the exit-7 message with a usage-limit
reset time or chooser-pending state, falling back to the bare message
otherwise. LO_LIMIT_EXTRA additively extends the usage-limit pattern.
Annotations use octal printf escapes (\302\267, \342\200\224) rather than
\xNN hex escapes, since dash (ubuntu CI's /bin/sh) does not interpret \x.
* fix(orchestrate): merge-on-approval dispatch rule + observable worktree base (#90)
A dependent task's worktree previously only received its dependencies'
signatures (Phase 3 step 0 injection), never their merged code, because
merging happened only at Phase 6. Document the gap, adopt merge-on-approval
(merge before returning to ready-set on approval, verified via
git merge-base --is-ancestor) as the dispatch-loop contract, and print each
new worktree's base commit from setup-worktrees.sh so it's checkable.
* fix(orchestrate): keep 'return to step 1 of the dispatch' on one line for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…ession suite from ambient env (#99, #100) (#105)
* test(orchestrate): delete two wave-scoped scope-purity guards (fixes#99)
The #81-#85 wave's per-task scope-purity guards anchored on that wave's
live state: a hardcoded task-file allowlist checked against
`git status --porcelain`, and "the commit that added this file" via
`git log --diff-filter=A`. PR #94 squash-merged the wave, collapsing
the single-file-add commit into a multi-file commit and leaving the
allowlist landmine for any future dirty worktree — the review-pass
guard is now permanently red on main, and the insight-emission guard
is a false-positive trap.
Both guards' consequence (this wave's task touched only its owned
files) is uncomputable now that the wave is over: per
wiki/testing/quality/guard-shape-vs-consequence.md, an uncomputable
consequence narrows the guard's scope, and a finished historical wave
narrows to zero. Deleting outright (not exempting, not skip-on-squash)
avoids an accumulating allow-list and avoids adding a guard that always
skips on main, which is itself a check that cannot fail
(wiki/testing/quality/tests-that-cannot-fail.md).
No replacement guard: scope purity for future orchestration waves is
already served live by the coordinator's Phase 4 diff review and each
task brief's <out_of_scope>, so a repo-persistent guard keyed to a
transient wave would just recreate the same rot.
tests/orchestrate-insight-emission.bats + tests/orchestrate-review-pass.bats:
25 -> 23 tests, 1 failure -> 0. Full `bats tests/` (env-isolated):
556/556, 0 failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhwvK2TGfsRV9TQW7Xr6dB
* test(launch-session): isolate suite from ambient LO_*/GROUNDWORK_* env (fixes#100)
A worker session running this suite inherits LO_RUN_ID/LO_STATUS_DIR/
LO_TASK_ID (and GROUNDWORK_*) from its own launch, and `env VAR=val`
in a test's `run` line merges with — not replaces — that inherited
environment. Six tests failed under a worker, and worse, a leaked real
LO_STATUS_DIR let the suite overwrite a live run's status file
(t90.json in i8790).
setup() now unsets every LO_*/GROUNDWORK_*/DEV_LOOP_* variable
launch-session.sh or its status-update.sh callee reads; tests that
need a value keep setting it explicitly per-invocation, which
overrides the unset.
A CONTAMINATION GUARD test plants real-looking decoy status/escalation
dirs as ambient env, re-runs the one boundary test that relies solely
on setup()'s isolation as a nested bats process, and asserts both an
unchanged outcome and zero files in the decoys. Negative control
verified 2026-08-14: with the unset block removed, the decoy gains a
zzz.json, reproducing the live contamination.
Verified: 28/28 in launch-session.bats (clean and ambient-env runs),
full suite green (exit 0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) (#108)
* fix(orchestrate): guard cmd_send against unsubmitted [Pasted text] placeholders (#96)
send-prompt.sh's cmd_send could report "delivered" while the prompt was
actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the
worker's input box -- tmux send-keys reports success as soon as the bytes
reach the tty, regardless of whether the CLI consumed them. Field-confirmed
2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on
[Pasted text #4] until one extra Enter unstuck it.
Port the same guard launch-session.sh already uses for the first injection:
after the existing queued_pat check, detect the placeholder in the
post-send pane capture and retry with Enter, bounded to 3 attempts
(LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present
after the bound reports "unconfirmed" (exit 7), never a guessed "delivered".
The exit-code contract and one-token stdout are unchanged.
Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error:
persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still
wins when both indicators are present) via a scripted fake tmux that returns
a different pane capture on each successive call. Verified against a
guard-stripped mutant: the normal/error cases fail without the fix.
bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
* fix(orchestrate): gate status-update.sh session resolution on $TMUX, document failed-phase reset (#97)
A coordinator-shell caller (outside tmux) running status-update.sh got
tmux display-message answering with the server's most-recently-active
session instead of its own -- there is no $TMUX check before consulting
it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION
still wins unconditionally, and behavior inside tmux or with
STATUS_SESSION set is unchanged.
Also document, in SKILL.md's exit-6 question playbook, the reset step
needed after a worker records phase=failed and the coordinator resolves
it via ask-coordinator -- otherwise watch-status.sh keeps counting the
stale failed phase and re-aborts with exit 3 on every subsequent poll.
The reset is a normal status-update.sh write with the observed phase,
not a new phase word. Document STATUS_SESSION for coordinator-side
calls in the Session knobs paragraph.
Sub-item (c) (stale `error` field surviving merges) is deliberately
skipped per plan decision D5 -- nothing reads that field today.
Extends tests/status-update.bats with normal/regression/boundary cases
for the $TMUX gating; full bats tests/ green (560/560).
* feat(wiki): seed gap categories G1-G6 for issue #38
Add 6 sourced, lint-clean wiki pages closing the highest-priority
wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes
(existing api-design category), data-backfill-migrations (existing
operations category), feature-flag-lifecycle (existing deploy category),
and two new categories — backend/common/architecture
(sync-vs-async-integration) and backend/common/realtime
(websocket-sse-lifecycle). Register every page in its domain index with
a load-when trigger, and extend the root INDEX.md backend route-line for
the two new categories per the mechanical index-registration precedent.
G1 is scoped to sync-vs-async-integration only; the other two
categories.md sub-topics (module-boundaries-and-layering,
event-driven-adoption-criteria) are intentionally left out as future
ingest candidates on issue #38, not silently dropped. G7-G10 stay open
on the issue.
Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61
to 64 directive units (coordinator-approved carve-out, scoped to exactly
this one assertion) — the 6 new pages' Do-this/Instead-of rows push the
real corpus count past the number the test had frozen. The stale
assertion still reported "ok" locally on macOS bash 3.2 due to a
[[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the
test; verified against a bash 5.2 (ubuntu-matching) run that it
genuinely fails without this fix, the same CI-only-failure class as
PR #94/§O3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@choiyounggichoiyounggi mentioned this pull request Aug 17, 2026
1 task
choiyounggi added a commit that referenced this pull request Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109)
Rolls up everything merged since 1.6.0:
- #94: review-time wiki routing, four-lens Phase 4 pass, insight emission,
socratic rework, failure-class pages
- #93: enforceable prohibition lint rule, disjoint routing scopes, flush
concurrency
- #102 (#87#90): {ORCH_DIR} path token, watch-status stall gating + reason
surfacing, merge-on-approval
- #105 (#99, #100): stale scope-purity guards deleted, launch-session suite
isolated from ambient LO_*/GROUNDWORK_* env
- #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry,
$TMUX-gated status-update session resolution + failed-phase reset playbook,
wiki gap seed pages G1–G6
Version bump propagates the send-prompt.sh delivery-confirmation fix to
plugin consumers (groundwork references dev-loop by URL; the cache updates
on version change).
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@choiyounggi
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length \u003e 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94

Merged
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813
Aug 14, 2026
Merged

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85)#94
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch orch/issues-20260813.

Verification

  • Full bats suite on the merged tree: 521/521 pass, 0 failures
  • wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)
  • Shallow-clone (depth-1) probe: the new commit-purity test skips honestly; runs for real on full clones
  • Review process dogfooded the new pass: two real defects caught and fixed in rework rounds (working-tree purity assertion → commit-anchored; shallow-clone history falsity → --is-shallow-repository guard)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj

dch0202and others added 11 commits August 14, 2026 10:25
Give the wiki's routing protocol a review-time entry point: AGENTS.md's
routing protocol gains step 7, a diff-signal decision table plus a
page-set comparison directive, and both AGENTS.md and INDEX.md's
preambles now name task and diff as the protocol's two inputs.
Steps 1-6 and the Hard rule paragraph are untouched. Adds
tests/review-routing.bats with a negative control proving the new
checks can fail.
Two review-relevant failure classes had no reachable wiki page: a CLI
flag/subcommand/API method that exists locally but not at the execution
site, and two objects written non-atomically with a reader that can
observe the gap. Adds both pages under platforms/toolchains and
backend/common/storage with sourced Do-this tables and edge cases, plus
one review-voice index row each.
Closes#85
Replace Phase 4's one-sentence review method with a fixed pass of four
lenses (plan conformance, wiki re-route via AGENTS.md step 7,
execution-environment reality, multi-object write ordering), each
grounded in a named document, plus templates/review-report.md as the
source for reviews/<task>-rN.md's three-part finding format.
Closes#82.
session-prompt.md §3/§O3 previously forced rework compliance ("Address the
issues...") through an information gap: the coordinator sees the diff but
not the constraint the worker hit. Give the worker the matching half of
i82's Socratic finding format — per blocking finding, fix it or answer its
Question with the concrete reason and leave it, recorded via an in-file
`- **Answer (r{N})**` line; silence on any finding is not a valid
resolution. §O3 additionally requires the worker_done --body to summarize
per-finding outcomes so the coordinator sees the split without opening the
review file. Non-blocking findings are excluded from the obligation.
Also bumps the pre-existing pinned checksum in tests/send-prompt.bats
("the Orca prompt set is byte-identical"), which hashes the exact byte
range covering §O3 and necessarily changed; scoped to the checksum literal
and its precedent-style bump-comment only, per that test's own documented
maintenance convention and coordinator sign-off.
Closes#84.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvxaV9oGPZmpKXh6EsLBh3
…dings
Add the near-miss capture rule to Phase 4: after a rework round's fix is
confirmed by re-review, emit one Insight candidate per fixed
`## Findings` item (never for `## Non-blocking`), using the frozen block
format and 0-3/session cap, with a fenced worked example whose
placeholder trigger/directive keep it from being self-harvested if ever
quoted verbatim.
Also fixes i82's scope-purity test (tests/orchestrate-review-pass.bats):
anchor to the commit that introduced the file instead of live git-status
(avoids false positives from a sibling task's uncommitted files on this
shared branch), and skip honestly on a shallow clone where the adding
commit cannot be resolved truthfully.
Closes#83.
session-prompt.md wraps the §O3 "fix it, or answer its Question" phrase
across two physical lines. The literal-space glob in
session-prompt-rework.bats couldn't match the resulting newline, so the
suite passed locally (bats/eval artifact) but failed on ubuntu bash 5 in
CI (PR #94, not ok 433). Add normalize_ws() and apply it to the two §O3
tests' extracted section before matching; the §3 single-physical-line
structural test keeps raw extraction since it exists to detect embedded
newlines.
@choiyounggi
choiyounggi merged commit 276c921 into mainAug 14, 2026
2 checks passed
@choiyounggi
choiyounggi deleted the orch/issues-20260813 branch August 14, 2026 05:32
choiyounggi pushed a commit that referenced this pull request Aug 14, 2026
… for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
choiyounggi added a commit that referenced this pull request Aug 14, 2026
…ason surfacing, merge-on-approval (#87#90) (#102)
* fix(orchestrate): {ORCH_DIR} absolute-path token for worker-facing orchestration artifacts (#87)
Worker-facing templates referenced briefs/plans/reviews via bare
`.orchestration/...` relative paths, which resolve to nothing once a
worker's cwd is its own worktree. Introduce {ORCH_DIR} (substituted
like {STATUS_DIR}) and convert every such reference in
session-prompt.md (§1-§4, §O1-§O4) and brief.md to it, including the
ad-hoc `$(dirname {STATUS_DIR})/reviews/...` form in §3/§O3. Document
the two-convention rule (orchestration artifacts absolute, repo files
relative) in SKILL.md next to the brief/plan composition text.
Bump the pinned Orca-block cksum in tests/send-prompt.bats to match,
per that test's own same-commit-update convention.
* fix(orchestrate): watch-status.sh reached-target stall-skip + stall-reason surfacing (#88, #89)
A worker already at/above the watched target phase was still stall-checked
and could false-report exit 7 even though its silence was exactly what the
session prompt ordered. The stall check now gates on rank < target_rank;
the dead-worker/liveness check is unchanged and still applies.
When a genuine stall IS reported, classify_stall() reads the pane scrollback
(capture-pane -S -1000) and enriches the exit-7 message with a usage-limit
reset time or chooser-pending state, falling back to the bare message
otherwise. LO_LIMIT_EXTRA additively extends the usage-limit pattern.
Annotations use octal printf escapes (\302\267, \342\200\224) rather than
\xNN hex escapes, since dash (ubuntu CI's /bin/sh) does not interpret \x.
* fix(orchestrate): merge-on-approval dispatch rule + observable worktree base (#90)
A dependent task's worktree previously only received its dependencies'
signatures (Phase 3 step 0 injection), never their merged code, because
merging happened only at Phase 6. Document the gap, adopt merge-on-approval
(merge before returning to ready-set on approval, verified via
git merge-base --is-ancestor) as the dispatch-loop contract, and print each
new worktree's base commit from setup-worktrees.sh so it's checkable.
* fix(orchestrate): keep 'return to step 1 of the dispatch' on one line for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…ession suite from ambient env (#99, #100) (#105)
* test(orchestrate): delete two wave-scoped scope-purity guards (fixes#99)
The #81-#85 wave's per-task scope-purity guards anchored on that wave's
live state: a hardcoded task-file allowlist checked against
`git status --porcelain`, and "the commit that added this file" via
`git log --diff-filter=A`. PR #94 squash-merged the wave, collapsing
the single-file-add commit into a multi-file commit and leaving the
allowlist landmine for any future dirty worktree — the review-pass
guard is now permanently red on main, and the insight-emission guard
is a false-positive trap.
Both guards' consequence (this wave's task touched only its owned
files) is uncomputable now that the wave is over: per
wiki/testing/quality/guard-shape-vs-consequence.md, an uncomputable
consequence narrows the guard's scope, and a finished historical wave
narrows to zero. Deleting outright (not exempting, not skip-on-squash)
avoids an accumulating allow-list and avoids adding a guard that always
skips on main, which is itself a check that cannot fail
(wiki/testing/quality/tests-that-cannot-fail.md).
No replacement guard: scope purity for future orchestration waves is
already served live by the coordinator's Phase 4 diff review and each
task brief's <out_of_scope>, so a repo-persistent guard keyed to a
transient wave would just recreate the same rot.
tests/orchestrate-insight-emission.bats + tests/orchestrate-review-pass.bats:
25 -> 23 tests, 1 failure -> 0. Full `bats tests/` (env-isolated):
556/556, 0 failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhwvK2TGfsRV9TQW7Xr6dB
* test(launch-session): isolate suite from ambient LO_*/GROUNDWORK_* env (fixes#100)
A worker session running this suite inherits LO_RUN_ID/LO_STATUS_DIR/
LO_TASK_ID (and GROUNDWORK_*) from its own launch, and `env VAR=val`
in a test's `run` line merges with — not replaces — that inherited
environment. Six tests failed under a worker, and worse, a leaked real
LO_STATUS_DIR let the suite overwrite a live run's status file
(t90.json in i8790).
setup() now unsets every LO_*/GROUNDWORK_*/DEV_LOOP_* variable
launch-session.sh or its status-update.sh callee reads; tests that
need a value keep setting it explicitly per-invocation, which
overrides the unset.
A CONTAMINATION GUARD test plants real-looking decoy status/escalation
dirs as ambient env, re-runs the one boundary test that relies solely
on setup()'s isolation as a nested bats process, and asserts both an
unchanged outcome and zero files in the decoys. Negative control
verified 2026-08-14: with the unset block removed, the decoy gains a
zzz.json, reproducing the live contamination.
Verified: 28/28 in launch-session.bats (clean and ambient-env runs),
full suite green (exit 0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) (#108)
* fix(orchestrate): guard cmd_send against unsubmitted [Pasted text] placeholders (#96)
send-prompt.sh's cmd_send could report "delivered" while the prompt was
actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the
worker's input box -- tmux send-keys reports success as soon as the bytes
reach the tty, regardless of whether the CLI consumed them. Field-confirmed
2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on
[Pasted text #4] until one extra Enter unstuck it.
Port the same guard launch-session.sh already uses for the first injection:
after the existing queued_pat check, detect the placeholder in the
post-send pane capture and retry with Enter, bounded to 3 attempts
(LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present
after the bound reports "unconfirmed" (exit 7), never a guessed "delivered".
The exit-code contract and one-token stdout are unchanged.
Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error:
persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still
wins when both indicators are present) via a scripted fake tmux that returns
a different pane capture on each successive call. Verified against a
guard-stripped mutant: the normal/error cases fail without the fix.
bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
* fix(orchestrate): gate status-update.sh session resolution on $TMUX, document failed-phase reset (#97)
A coordinator-shell caller (outside tmux) running status-update.sh got
tmux display-message answering with the server's most-recently-active
session instead of its own -- there is no $TMUX check before consulting
it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION
still wins unconditionally, and behavior inside tmux or with
STATUS_SESSION set is unchanged.
Also document, in SKILL.md's exit-6 question playbook, the reset step
needed after a worker records phase=failed and the coordinator resolves
it via ask-coordinator -- otherwise watch-status.sh keeps counting the
stale failed phase and re-aborts with exit 3 on every subsequent poll.
The reset is a normal status-update.sh write with the observed phase,
not a new phase word. Document STATUS_SESSION for coordinator-side
calls in the Session knobs paragraph.
Sub-item (c) (stale `error` field surviving merges) is deliberately
skipped per plan decision D5 -- nothing reads that field today.
Extends tests/status-update.bats with normal/regression/boundary cases
for the $TMUX gating; full bats tests/ green (560/560).
* feat(wiki): seed gap categories G1-G6 for issue #38
Add 6 sourced, lint-clean wiki pages closing the highest-priority
wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes
(existing api-design category), data-backfill-migrations (existing
operations category), feature-flag-lifecycle (existing deploy category),
and two new categories — backend/common/architecture
(sync-vs-async-integration) and backend/common/realtime
(websocket-sse-lifecycle). Register every page in its domain index with
a load-when trigger, and extend the root INDEX.md backend route-line for
the two new categories per the mechanical index-registration precedent.
G1 is scoped to sync-vs-async-integration only; the other two
categories.md sub-topics (module-boundaries-and-layering,
event-driven-adoption-criteria) are intentionally left out as future
ingest candidates on issue #38, not silently dropped. G7-G10 stay open
on the issue.
Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61
to 64 directive units (coordinator-approved carve-out, scoped to exactly
this one assertion) — the 6 new pages' Do-this/Instead-of rows push the
real corpus count past the number the test had frozen. The stale
assertion still reported "ok" locally on macOS bash 3.2 due to a
[[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the
test; verified against a bash 5.2 (ubuntu-matching) run that it
genuinely fails without this fix, the same CI-only-failure class as
PR #94/§O3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@choiyounggichoiyounggi mentioned this pull request Aug 17, 2026
1 task
choiyounggi added a commit that referenced this pull request Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109)
Rolls up everything merged since 1.6.0:
- #94: review-time wiki routing, four-lens Phase 4 pass, insight emission,
socratic rework, failure-class pages
- #93: enforceable prohibition lint rule, disjoint routing scopes, flush
concurrency
- #102 (#87#90): {ORCH_DIR} path token, watch-status stall gating + reason
surfacing, merge-on-approval
- #105 (#99, #100): stale scope-purity guards deleted, launch-session suite
isolated from ambient LO_*/GROUNDWORK_* env
- #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry,
$TMUX-gated status-update session resolution + failed-phase reset playbook,
wiki gap seed pages G1–G6
Version bump propagates the send-prompt.sh delivery-confirmation fix to
plugin consumers (groundwork references dev-loop by URL; the cache updates
on version change).
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@choiyounggi
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94

Merged
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813
Aug 14, 2026
Merged

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85)#94
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch orch/issues-20260813.

Verification

  • Full bats suite on the merged tree: 521/521 pass, 0 failures
  • wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)
  • Shallow-clone (depth-1) probe: the new commit-purity test skips honestly; runs for real on full clones
  • Review process dogfooded the new pass: two real defects caught and fixed in rework rounds (working-tree purity assertion → commit-anchored; shallow-clone history falsity → --is-shallow-repository guard)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj

dch0202and others added 11 commits August 14, 2026 10:25
Give the wiki's routing protocol a review-time entry point: AGENTS.md's
routing protocol gains step 7, a diff-signal decision table plus a
page-set comparison directive, and both AGENTS.md and INDEX.md's
preambles now name task and diff as the protocol's two inputs.
Steps 1-6 and the Hard rule paragraph are untouched. Adds
tests/review-routing.bats with a negative control proving the new
checks can fail.
Two review-relevant failure classes had no reachable wiki page: a CLI
flag/subcommand/API method that exists locally but not at the execution
site, and two objects written non-atomically with a reader that can
observe the gap. Adds both pages under platforms/toolchains and
backend/common/storage with sourced Do-this tables and edge cases, plus
one review-voice index row each.
Closes#85
Replace Phase 4's one-sentence review method with a fixed pass of four
lenses (plan conformance, wiki re-route via AGENTS.md step 7,
execution-environment reality, multi-object write ordering), each
grounded in a named document, plus templates/review-report.md as the
source for reviews/<task>-rN.md's three-part finding format.
Closes#82.
session-prompt.md §3/§O3 previously forced rework compliance ("Address the
issues...") through an information gap: the coordinator sees the diff but
not the constraint the worker hit. Give the worker the matching half of
i82's Socratic finding format — per blocking finding, fix it or answer its
Question with the concrete reason and leave it, recorded via an in-file
`- **Answer (r{N})**` line; silence on any finding is not a valid
resolution. §O3 additionally requires the worker_done --body to summarize
per-finding outcomes so the coordinator sees the split without opening the
review file. Non-blocking findings are excluded from the obligation.
Also bumps the pre-existing pinned checksum in tests/send-prompt.bats
("the Orca prompt set is byte-identical"), which hashes the exact byte
range covering §O3 and necessarily changed; scoped to the checksum literal
and its precedent-style bump-comment only, per that test's own documented
maintenance convention and coordinator sign-off.
Closes#84.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvxaV9oGPZmpKXh6EsLBh3
…dings
Add the near-miss capture rule to Phase 4: after a rework round's fix is
confirmed by re-review, emit one Insight candidate per fixed
`## Findings` item (never for `## Non-blocking`), using the frozen block
format and 0-3/session cap, with a fenced worked example whose
placeholder trigger/directive keep it from being self-harvested if ever
quoted verbatim.
Also fixes i82's scope-purity test (tests/orchestrate-review-pass.bats):
anchor to the commit that introduced the file instead of live git-status
(avoids false positives from a sibling task's uncommitted files on this
shared branch), and skip honestly on a shallow clone where the adding
commit cannot be resolved truthfully.
Closes#83.
session-prompt.md wraps the §O3 "fix it, or answer its Question" phrase
across two physical lines. The literal-space glob in
session-prompt-rework.bats couldn't match the resulting newline, so the
suite passed locally (bats/eval artifact) but failed on ubuntu bash 5 in
CI (PR #94, not ok 433). Add normalize_ws() and apply it to the two §O3
tests' extracted section before matching; the §3 single-physical-line
structural test keeps raw extraction since it exists to detect embedded
newlines.
@choiyounggi
choiyounggi merged commit 276c921 into mainAug 14, 2026
2 checks passed
@choiyounggi
choiyounggi deleted the orch/issues-20260813 branch August 14, 2026 05:32
choiyounggi pushed a commit that referenced this pull request Aug 14, 2026
… for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
choiyounggi added a commit that referenced this pull request Aug 14, 2026
…ason surfacing, merge-on-approval (#87#90) (#102)
* fix(orchestrate): {ORCH_DIR} absolute-path token for worker-facing orchestration artifacts (#87)
Worker-facing templates referenced briefs/plans/reviews via bare
`.orchestration/...` relative paths, which resolve to nothing once a
worker's cwd is its own worktree. Introduce {ORCH_DIR} (substituted
like {STATUS_DIR}) and convert every such reference in
session-prompt.md (§1-§4, §O1-§O4) and brief.md to it, including the
ad-hoc `$(dirname {STATUS_DIR})/reviews/...` form in §3/§O3. Document
the two-convention rule (orchestration artifacts absolute, repo files
relative) in SKILL.md next to the brief/plan composition text.
Bump the pinned Orca-block cksum in tests/send-prompt.bats to match,
per that test's own same-commit-update convention.
* fix(orchestrate): watch-status.sh reached-target stall-skip + stall-reason surfacing (#88, #89)
A worker already at/above the watched target phase was still stall-checked
and could false-report exit 7 even though its silence was exactly what the
session prompt ordered. The stall check now gates on rank < target_rank;
the dead-worker/liveness check is unchanged and still applies.
When a genuine stall IS reported, classify_stall() reads the pane scrollback
(capture-pane -S -1000) and enriches the exit-7 message with a usage-limit
reset time or chooser-pending state, falling back to the bare message
otherwise. LO_LIMIT_EXTRA additively extends the usage-limit pattern.
Annotations use octal printf escapes (\302\267, \342\200\224) rather than
\xNN hex escapes, since dash (ubuntu CI's /bin/sh) does not interpret \x.
* fix(orchestrate): merge-on-approval dispatch rule + observable worktree base (#90)
A dependent task's worktree previously only received its dependencies'
signatures (Phase 3 step 0 injection), never their merged code, because
merging happened only at Phase 6. Document the gap, adopt merge-on-approval
(merge before returning to ready-set on approval, verified via
git merge-base --is-ancestor) as the dispatch-loop contract, and print each
new worktree's base commit from setup-worktrees.sh so it's checkable.
* fix(orchestrate): keep 'return to step 1 of the dispatch' on one line for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…ession suite from ambient env (#99, #100) (#105)
* test(orchestrate): delete two wave-scoped scope-purity guards (fixes#99)
The #81-#85 wave's per-task scope-purity guards anchored on that wave's
live state: a hardcoded task-file allowlist checked against
`git status --porcelain`, and "the commit that added this file" via
`git log --diff-filter=A`. PR #94 squash-merged the wave, collapsing
the single-file-add commit into a multi-file commit and leaving the
allowlist landmine for any future dirty worktree — the review-pass
guard is now permanently red on main, and the insight-emission guard
is a false-positive trap.
Both guards' consequence (this wave's task touched only its owned
files) is uncomputable now that the wave is over: per
wiki/testing/quality/guard-shape-vs-consequence.md, an uncomputable
consequence narrows the guard's scope, and a finished historical wave
narrows to zero. Deleting outright (not exempting, not skip-on-squash)
avoids an accumulating allow-list and avoids adding a guard that always
skips on main, which is itself a check that cannot fail
(wiki/testing/quality/tests-that-cannot-fail.md).
No replacement guard: scope purity for future orchestration waves is
already served live by the coordinator's Phase 4 diff review and each
task brief's <out_of_scope>, so a repo-persistent guard keyed to a
transient wave would just recreate the same rot.
tests/orchestrate-insight-emission.bats + tests/orchestrate-review-pass.bats:
25 -> 23 tests, 1 failure -> 0. Full `bats tests/` (env-isolated):
556/556, 0 failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhwvK2TGfsRV9TQW7Xr6dB
* test(launch-session): isolate suite from ambient LO_*/GROUNDWORK_* env (fixes#100)
A worker session running this suite inherits LO_RUN_ID/LO_STATUS_DIR/
LO_TASK_ID (and GROUNDWORK_*) from its own launch, and `env VAR=val`
in a test's `run` line merges with — not replaces — that inherited
environment. Six tests failed under a worker, and worse, a leaked real
LO_STATUS_DIR let the suite overwrite a live run's status file
(t90.json in i8790).
setup() now unsets every LO_*/GROUNDWORK_*/DEV_LOOP_* variable
launch-session.sh or its status-update.sh callee reads; tests that
need a value keep setting it explicitly per-invocation, which
overrides the unset.
A CONTAMINATION GUARD test plants real-looking decoy status/escalation
dirs as ambient env, re-runs the one boundary test that relies solely
on setup()'s isolation as a nested bats process, and asserts both an
unchanged outcome and zero files in the decoys. Negative control
verified 2026-08-14: with the unset block removed, the decoy gains a
zzz.json, reproducing the live contamination.
Verified: 28/28 in launch-session.bats (clean and ambient-env runs),
full suite green (exit 0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) (#108)
* fix(orchestrate): guard cmd_send against unsubmitted [Pasted text] placeholders (#96)
send-prompt.sh's cmd_send could report "delivered" while the prompt was
actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the
worker's input box -- tmux send-keys reports success as soon as the bytes
reach the tty, regardless of whether the CLI consumed them. Field-confirmed
2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on
[Pasted text #4] until one extra Enter unstuck it.
Port the same guard launch-session.sh already uses for the first injection:
after the existing queued_pat check, detect the placeholder in the
post-send pane capture and retry with Enter, bounded to 3 attempts
(LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present
after the bound reports "unconfirmed" (exit 7), never a guessed "delivered".
The exit-code contract and one-token stdout are unchanged.
Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error:
persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still
wins when both indicators are present) via a scripted fake tmux that returns
a different pane capture on each successive call. Verified against a
guard-stripped mutant: the normal/error cases fail without the fix.
bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
* fix(orchestrate): gate status-update.sh session resolution on $TMUX, document failed-phase reset (#97)
A coordinator-shell caller (outside tmux) running status-update.sh got
tmux display-message answering with the server's most-recently-active
session instead of its own -- there is no $TMUX check before consulting
it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION
still wins unconditionally, and behavior inside tmux or with
STATUS_SESSION set is unchanged.
Also document, in SKILL.md's exit-6 question playbook, the reset step
needed after a worker records phase=failed and the coordinator resolves
it via ask-coordinator -- otherwise watch-status.sh keeps counting the
stale failed phase and re-aborts with exit 3 on every subsequent poll.
The reset is a normal status-update.sh write with the observed phase,
not a new phase word. Document STATUS_SESSION for coordinator-side
calls in the Session knobs paragraph.
Sub-item (c) (stale `error` field surviving merges) is deliberately
skipped per plan decision D5 -- nothing reads that field today.
Extends tests/status-update.bats with normal/regression/boundary cases
for the $TMUX gating; full bats tests/ green (560/560).
* feat(wiki): seed gap categories G1-G6 for issue #38
Add 6 sourced, lint-clean wiki pages closing the highest-priority
wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes
(existing api-design category), data-backfill-migrations (existing
operations category), feature-flag-lifecycle (existing deploy category),
and two new categories — backend/common/architecture
(sync-vs-async-integration) and backend/common/realtime
(websocket-sse-lifecycle). Register every page in its domain index with
a load-when trigger, and extend the root INDEX.md backend route-line for
the two new categories per the mechanical index-registration precedent.
G1 is scoped to sync-vs-async-integration only; the other two
categories.md sub-topics (module-boundaries-and-layering,
event-driven-adoption-criteria) are intentionally left out as future
ingest candidates on issue #38, not silently dropped. G7-G10 stay open
on the issue.
Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61
to 64 directive units (coordinator-approved carve-out, scoped to exactly
this one assertion) — the 6 new pages' Do-this/Instead-of rows push the
real corpus count past the number the test had frozen. The stale
assertion still reported "ok" locally on macOS bash 3.2 due to a
[[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the
test; verified against a bash 5.2 (ubuntu-matching) run that it
genuinely fails without this fix, the same CI-only-failure class as
PR #94/§O3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@choiyounggichoiyounggi mentioned this pull request Aug 17, 2026
1 task
choiyounggi added a commit that referenced this pull request Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109)
Rolls up everything merged since 1.6.0:
- #94: review-time wiki routing, four-lens Phase 4 pass, insight emission,
socratic rework, failure-class pages
- #93: enforceable prohibition lint rule, disjoint routing scopes, flush
concurrency
- #102 (#87#90): {ORCH_DIR} path token, watch-status stall gating + reason
surfacing, merge-on-approval
- #105 (#99, #100): stale scope-purity guards deleted, launch-session suite
isolated from ambient LO_*/GROUNDWORK_* env
- #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry,
$TMUX-gated status-update session resolution + failed-phase reset playbook,
wiki gap seed pages G1–G6
Version bump propagates the send-prompt.sh delivery-confirmation fix to
plugin consumers (groundwork references dev-loop by URL; the cache updates
on version change).
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@choiyounggi
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94

Merged
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813
Aug 14, 2026
Merged

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85)#94
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch orch/issues-20260813.

Verification

  • Full bats suite on the merged tree: 521/521 pass, 0 failures
  • wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)
  • Shallow-clone (depth-1) probe: the new commit-purity test skips honestly; runs for real on full clones
  • Review process dogfooded the new pass: two real defects caught and fixed in rework rounds (working-tree purity assertion → commit-anchored; shallow-clone history falsity → --is-shallow-repository guard)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj

dch0202and others added 11 commits August 14, 2026 10:25
Give the wiki's routing protocol a review-time entry point: AGENTS.md's
routing protocol gains step 7, a diff-signal decision table plus a
page-set comparison directive, and both AGENTS.md and INDEX.md's
preambles now name task and diff as the protocol's two inputs.
Steps 1-6 and the Hard rule paragraph are untouched. Adds
tests/review-routing.bats with a negative control proving the new
checks can fail.
Two review-relevant failure classes had no reachable wiki page: a CLI
flag/subcommand/API method that exists locally but not at the execution
site, and two objects written non-atomically with a reader that can
observe the gap. Adds both pages under platforms/toolchains and
backend/common/storage with sourced Do-this tables and edge cases, plus
one review-voice index row each.
Closes#85
Replace Phase 4's one-sentence review method with a fixed pass of four
lenses (plan conformance, wiki re-route via AGENTS.md step 7,
execution-environment reality, multi-object write ordering), each
grounded in a named document, plus templates/review-report.md as the
source for reviews/<task>-rN.md's three-part finding format.
Closes#82.
session-prompt.md §3/§O3 previously forced rework compliance ("Address the
issues...") through an information gap: the coordinator sees the diff but
not the constraint the worker hit. Give the worker the matching half of
i82's Socratic finding format — per blocking finding, fix it or answer its
Question with the concrete reason and leave it, recorded via an in-file
`- **Answer (r{N})**` line; silence on any finding is not a valid
resolution. §O3 additionally requires the worker_done --body to summarize
per-finding outcomes so the coordinator sees the split without opening the
review file. Non-blocking findings are excluded from the obligation.
Also bumps the pre-existing pinned checksum in tests/send-prompt.bats
("the Orca prompt set is byte-identical"), which hashes the exact byte
range covering §O3 and necessarily changed; scoped to the checksum literal
and its precedent-style bump-comment only, per that test's own documented
maintenance convention and coordinator sign-off.
Closes#84.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvxaV9oGPZmpKXh6EsLBh3
…dings
Add the near-miss capture rule to Phase 4: after a rework round's fix is
confirmed by re-review, emit one Insight candidate per fixed
`## Findings` item (never for `## Non-blocking`), using the frozen block
format and 0-3/session cap, with a fenced worked example whose
placeholder trigger/directive keep it from being self-harvested if ever
quoted verbatim.
Also fixes i82's scope-purity test (tests/orchestrate-review-pass.bats):
anchor to the commit that introduced the file instead of live git-status
(avoids false positives from a sibling task's uncommitted files on this
shared branch), and skip honestly on a shallow clone where the adding
commit cannot be resolved truthfully.
Closes#83.
session-prompt.md wraps the §O3 "fix it, or answer its Question" phrase
across two physical lines. The literal-space glob in
session-prompt-rework.bats couldn't match the resulting newline, so the
suite passed locally (bats/eval artifact) but failed on ubuntu bash 5 in
CI (PR #94, not ok 433). Add normalize_ws() and apply it to the two §O3
tests' extracted section before matching; the §3 single-physical-line
structural test keeps raw extraction since it exists to detect embedded
newlines.
@choiyounggi
choiyounggi merged commit 276c921 into mainAug 14, 2026
2 checks passed
@choiyounggi
choiyounggi deleted the orch/issues-20260813 branch August 14, 2026 05:32
choiyounggi pushed a commit that referenced this pull request Aug 14, 2026
… for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
choiyounggi added a commit that referenced this pull request Aug 14, 2026
…ason surfacing, merge-on-approval (#87#90) (#102)
* fix(orchestrate): {ORCH_DIR} absolute-path token for worker-facing orchestration artifacts (#87)
Worker-facing templates referenced briefs/plans/reviews via bare
`.orchestration/...` relative paths, which resolve to nothing once a
worker's cwd is its own worktree. Introduce {ORCH_DIR} (substituted
like {STATUS_DIR}) and convert every such reference in
session-prompt.md (§1-§4, §O1-§O4) and brief.md to it, including the
ad-hoc `$(dirname {STATUS_DIR})/reviews/...` form in §3/§O3. Document
the two-convention rule (orchestration artifacts absolute, repo files
relative) in SKILL.md next to the brief/plan composition text.
Bump the pinned Orca-block cksum in tests/send-prompt.bats to match,
per that test's own same-commit-update convention.
* fix(orchestrate): watch-status.sh reached-target stall-skip + stall-reason surfacing (#88, #89)
A worker already at/above the watched target phase was still stall-checked
and could false-report exit 7 even though its silence was exactly what the
session prompt ordered. The stall check now gates on rank < target_rank;
the dead-worker/liveness check is unchanged and still applies.
When a genuine stall IS reported, classify_stall() reads the pane scrollback
(capture-pane -S -1000) and enriches the exit-7 message with a usage-limit
reset time or chooser-pending state, falling back to the bare message
otherwise. LO_LIMIT_EXTRA additively extends the usage-limit pattern.
Annotations use octal printf escapes (\302\267, \342\200\224) rather than
\xNN hex escapes, since dash (ubuntu CI's /bin/sh) does not interpret \x.
* fix(orchestrate): merge-on-approval dispatch rule + observable worktree base (#90)
A dependent task's worktree previously only received its dependencies'
signatures (Phase 3 step 0 injection), never their merged code, because
merging happened only at Phase 6. Document the gap, adopt merge-on-approval
(merge before returning to ready-set on approval, verified via
git merge-base --is-ancestor) as the dispatch-loop contract, and print each
new worktree's base commit from setup-worktrees.sh so it's checkable.
* fix(orchestrate): keep 'return to step 1 of the dispatch' on one line for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…ession suite from ambient env (#99, #100) (#105)
* test(orchestrate): delete two wave-scoped scope-purity guards (fixes#99)
The #81-#85 wave's per-task scope-purity guards anchored on that wave's
live state: a hardcoded task-file allowlist checked against
`git status --porcelain`, and "the commit that added this file" via
`git log --diff-filter=A`. PR #94 squash-merged the wave, collapsing
the single-file-add commit into a multi-file commit and leaving the
allowlist landmine for any future dirty worktree — the review-pass
guard is now permanently red on main, and the insight-emission guard
is a false-positive trap.
Both guards' consequence (this wave's task touched only its owned
files) is uncomputable now that the wave is over: per
wiki/testing/quality/guard-shape-vs-consequence.md, an uncomputable
consequence narrows the guard's scope, and a finished historical wave
narrows to zero. Deleting outright (not exempting, not skip-on-squash)
avoids an accumulating allow-list and avoids adding a guard that always
skips on main, which is itself a check that cannot fail
(wiki/testing/quality/tests-that-cannot-fail.md).
No replacement guard: scope purity for future orchestration waves is
already served live by the coordinator's Phase 4 diff review and each
task brief's <out_of_scope>, so a repo-persistent guard keyed to a
transient wave would just recreate the same rot.
tests/orchestrate-insight-emission.bats + tests/orchestrate-review-pass.bats:
25 -> 23 tests, 1 failure -> 0. Full `bats tests/` (env-isolated):
556/556, 0 failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhwvK2TGfsRV9TQW7Xr6dB
* test(launch-session): isolate suite from ambient LO_*/GROUNDWORK_* env (fixes#100)
A worker session running this suite inherits LO_RUN_ID/LO_STATUS_DIR/
LO_TASK_ID (and GROUNDWORK_*) from its own launch, and `env VAR=val`
in a test's `run` line merges with — not replaces — that inherited
environment. Six tests failed under a worker, and worse, a leaked real
LO_STATUS_DIR let the suite overwrite a live run's status file
(t90.json in i8790).
setup() now unsets every LO_*/GROUNDWORK_*/DEV_LOOP_* variable
launch-session.sh or its status-update.sh callee reads; tests that
need a value keep setting it explicitly per-invocation, which
overrides the unset.
A CONTAMINATION GUARD test plants real-looking decoy status/escalation
dirs as ambient env, re-runs the one boundary test that relies solely
on setup()'s isolation as a nested bats process, and asserts both an
unchanged outcome and zero files in the decoys. Negative control
verified 2026-08-14: with the unset block removed, the decoy gains a
zzz.json, reproducing the live contamination.
Verified: 28/28 in launch-session.bats (clean and ambient-env runs),
full suite green (exit 0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) (#108)
* fix(orchestrate): guard cmd_send against unsubmitted [Pasted text] placeholders (#96)
send-prompt.sh's cmd_send could report "delivered" while the prompt was
actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the
worker's input box -- tmux send-keys reports success as soon as the bytes
reach the tty, regardless of whether the CLI consumed them. Field-confirmed
2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on
[Pasted text #4] until one extra Enter unstuck it.
Port the same guard launch-session.sh already uses for the first injection:
after the existing queued_pat check, detect the placeholder in the
post-send pane capture and retry with Enter, bounded to 3 attempts
(LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present
after the bound reports "unconfirmed" (exit 7), never a guessed "delivered".
The exit-code contract and one-token stdout are unchanged.
Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error:
persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still
wins when both indicators are present) via a scripted fake tmux that returns
a different pane capture on each successive call. Verified against a
guard-stripped mutant: the normal/error cases fail without the fix.
bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
* fix(orchestrate): gate status-update.sh session resolution on $TMUX, document failed-phase reset (#97)
A coordinator-shell caller (outside tmux) running status-update.sh got
tmux display-message answering with the server's most-recently-active
session instead of its own -- there is no $TMUX check before consulting
it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION
still wins unconditionally, and behavior inside tmux or with
STATUS_SESSION set is unchanged.
Also document, in SKILL.md's exit-6 question playbook, the reset step
needed after a worker records phase=failed and the coordinator resolves
it via ask-coordinator -- otherwise watch-status.sh keeps counting the
stale failed phase and re-aborts with exit 3 on every subsequent poll.
The reset is a normal status-update.sh write with the observed phase,
not a new phase word. Document STATUS_SESSION for coordinator-side
calls in the Session knobs paragraph.
Sub-item (c) (stale `error` field surviving merges) is deliberately
skipped per plan decision D5 -- nothing reads that field today.
Extends tests/status-update.bats with normal/regression/boundary cases
for the $TMUX gating; full bats tests/ green (560/560).
* feat(wiki): seed gap categories G1-G6 for issue #38
Add 6 sourced, lint-clean wiki pages closing the highest-priority
wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes
(existing api-design category), data-backfill-migrations (existing
operations category), feature-flag-lifecycle (existing deploy category),
and two new categories — backend/common/architecture
(sync-vs-async-integration) and backend/common/realtime
(websocket-sse-lifecycle). Register every page in its domain index with
a load-when trigger, and extend the root INDEX.md backend route-line for
the two new categories per the mechanical index-registration precedent.
G1 is scoped to sync-vs-async-integration only; the other two
categories.md sub-topics (module-boundaries-and-layering,
event-driven-adoption-criteria) are intentionally left out as future
ingest candidates on issue #38, not silently dropped. G7-G10 stay open
on the issue.
Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61
to 64 directive units (coordinator-approved carve-out, scoped to exactly
this one assertion) — the 6 new pages' Do-this/Instead-of rows push the
real corpus count past the number the test had frozen. The stale
assertion still reported "ok" locally on macOS bash 3.2 due to a
[[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the
test; verified against a bash 5.2 (ubuntu-matching) run that it
genuinely fails without this fix, the same CI-only-failure class as
PR #94/§O3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@choiyounggichoiyounggi mentioned this pull request Aug 17, 2026
1 task
choiyounggi added a commit that referenced this pull request Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109)
Rolls up everything merged since 1.6.0:
- #94: review-time wiki routing, four-lens Phase 4 pass, insight emission,
socratic rework, failure-class pages
- #93: enforceable prohibition lint rule, disjoint routing scopes, flush
concurrency
- #102 (#87#90): {ORCH_DIR} path token, watch-status stall gating + reason
surfacing, merge-on-approval
- #105 (#99, #100): stale scope-purity guards deleted, launch-session suite
isolated from ambient LO_*/GROUNDWORK_* env
- #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry,
$TMUX-gated status-update session resolution + failed-phase reset playbook,
wiki gap seed pages G1–G6
Version bump propagates the send-prompt.sh delivery-confirmation fix to
plugin consumers (groundwork references dev-loop by URL; the cache updates
on version change).
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@choiyounggi
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94

Merged
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813
Aug 14, 2026
Merged

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85)#94
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch orch/issues-20260813.

Verification

  • Full bats suite on the merged tree: 521/521 pass, 0 failures
  • wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)
  • Shallow-clone (depth-1) probe: the new commit-purity test skips honestly; runs for real on full clones
  • Review process dogfooded the new pass: two real defects caught and fixed in rework rounds (working-tree purity assertion → commit-anchored; shallow-clone history falsity → --is-shallow-repository guard)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj

dch0202and others added 11 commits August 14, 2026 10:25
Give the wiki's routing protocol a review-time entry point: AGENTS.md's
routing protocol gains step 7, a diff-signal decision table plus a
page-set comparison directive, and both AGENTS.md and INDEX.md's
preambles now name task and diff as the protocol's two inputs.
Steps 1-6 and the Hard rule paragraph are untouched. Adds
tests/review-routing.bats with a negative control proving the new
checks can fail.
Two review-relevant failure classes had no reachable wiki page: a CLI
flag/subcommand/API method that exists locally but not at the execution
site, and two objects written non-atomically with a reader that can
observe the gap. Adds both pages under platforms/toolchains and
backend/common/storage with sourced Do-this tables and edge cases, plus
one review-voice index row each.
Closes#85
Replace Phase 4's one-sentence review method with a fixed pass of four
lenses (plan conformance, wiki re-route via AGENTS.md step 7,
execution-environment reality, multi-object write ordering), each
grounded in a named document, plus templates/review-report.md as the
source for reviews/<task>-rN.md's three-part finding format.
Closes#82.
session-prompt.md §3/§O3 previously forced rework compliance ("Address the
issues...") through an information gap: the coordinator sees the diff but
not the constraint the worker hit. Give the worker the matching half of
i82's Socratic finding format — per blocking finding, fix it or answer its
Question with the concrete reason and leave it, recorded via an in-file
`- **Answer (r{N})**` line; silence on any finding is not a valid
resolution. §O3 additionally requires the worker_done --body to summarize
per-finding outcomes so the coordinator sees the split without opening the
review file. Non-blocking findings are excluded from the obligation.
Also bumps the pre-existing pinned checksum in tests/send-prompt.bats
("the Orca prompt set is byte-identical"), which hashes the exact byte
range covering §O3 and necessarily changed; scoped to the checksum literal
and its precedent-style bump-comment only, per that test's own documented
maintenance convention and coordinator sign-off.
Closes#84.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvxaV9oGPZmpKXh6EsLBh3
…dings
Add the near-miss capture rule to Phase 4: after a rework round's fix is
confirmed by re-review, emit one Insight candidate per fixed
`## Findings` item (never for `## Non-blocking`), using the frozen block
format and 0-3/session cap, with a fenced worked example whose
placeholder trigger/directive keep it from being self-harvested if ever
quoted verbatim.
Also fixes i82's scope-purity test (tests/orchestrate-review-pass.bats):
anchor to the commit that introduced the file instead of live git-status
(avoids false positives from a sibling task's uncommitted files on this
shared branch), and skip honestly on a shallow clone where the adding
commit cannot be resolved truthfully.
Closes#83.
session-prompt.md wraps the §O3 "fix it, or answer its Question" phrase
across two physical lines. The literal-space glob in
session-prompt-rework.bats couldn't match the resulting newline, so the
suite passed locally (bats/eval artifact) but failed on ubuntu bash 5 in
CI (PR #94, not ok 433). Add normalize_ws() and apply it to the two §O3
tests' extracted section before matching; the §3 single-physical-line
structural test keeps raw extraction since it exists to detect embedded
newlines.
@choiyounggi
choiyounggi merged commit 276c921 into mainAug 14, 2026
2 checks passed
@choiyounggi
choiyounggi deleted the orch/issues-20260813 branch August 14, 2026 05:32
choiyounggi pushed a commit that referenced this pull request Aug 14, 2026
… for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
choiyounggi added a commit that referenced this pull request Aug 14, 2026
…ason surfacing, merge-on-approval (#87#90) (#102)
* fix(orchestrate): {ORCH_DIR} absolute-path token for worker-facing orchestration artifacts (#87)
Worker-facing templates referenced briefs/plans/reviews via bare
`.orchestration/...` relative paths, which resolve to nothing once a
worker's cwd is its own worktree. Introduce {ORCH_DIR} (substituted
like {STATUS_DIR}) and convert every such reference in
session-prompt.md (§1-§4, §O1-§O4) and brief.md to it, including the
ad-hoc `$(dirname {STATUS_DIR})/reviews/...` form in §3/§O3. Document
the two-convention rule (orchestration artifacts absolute, repo files
relative) in SKILL.md next to the brief/plan composition text.
Bump the pinned Orca-block cksum in tests/send-prompt.bats to match,
per that test's own same-commit-update convention.
* fix(orchestrate): watch-status.sh reached-target stall-skip + stall-reason surfacing (#88, #89)
A worker already at/above the watched target phase was still stall-checked
and could false-report exit 7 even though its silence was exactly what the
session prompt ordered. The stall check now gates on rank < target_rank;
the dead-worker/liveness check is unchanged and still applies.
When a genuine stall IS reported, classify_stall() reads the pane scrollback
(capture-pane -S -1000) and enriches the exit-7 message with a usage-limit
reset time or chooser-pending state, falling back to the bare message
otherwise. LO_LIMIT_EXTRA additively extends the usage-limit pattern.
Annotations use octal printf escapes (\302\267, \342\200\224) rather than
\xNN hex escapes, since dash (ubuntu CI's /bin/sh) does not interpret \x.
* fix(orchestrate): merge-on-approval dispatch rule + observable worktree base (#90)
A dependent task's worktree previously only received its dependencies'
signatures (Phase 3 step 0 injection), never their merged code, because
merging happened only at Phase 6. Document the gap, adopt merge-on-approval
(merge before returning to ready-set on approval, verified via
git merge-base --is-ancestor) as the dispatch-loop contract, and print each
new worktree's base commit from setup-worktrees.sh so it's checkable.
* fix(orchestrate): keep 'return to step 1 of the dispatch' on one line for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…ession suite from ambient env (#99, #100) (#105)
* test(orchestrate): delete two wave-scoped scope-purity guards (fixes#99)
The #81-#85 wave's per-task scope-purity guards anchored on that wave's
live state: a hardcoded task-file allowlist checked against
`git status --porcelain`, and "the commit that added this file" via
`git log --diff-filter=A`. PR #94 squash-merged the wave, collapsing
the single-file-add commit into a multi-file commit and leaving the
allowlist landmine for any future dirty worktree — the review-pass
guard is now permanently red on main, and the insight-emission guard
is a false-positive trap.
Both guards' consequence (this wave's task touched only its owned
files) is uncomputable now that the wave is over: per
wiki/testing/quality/guard-shape-vs-consequence.md, an uncomputable
consequence narrows the guard's scope, and a finished historical wave
narrows to zero. Deleting outright (not exempting, not skip-on-squash)
avoids an accumulating allow-list and avoids adding a guard that always
skips on main, which is itself a check that cannot fail
(wiki/testing/quality/tests-that-cannot-fail.md).
No replacement guard: scope purity for future orchestration waves is
already served live by the coordinator's Phase 4 diff review and each
task brief's <out_of_scope>, so a repo-persistent guard keyed to a
transient wave would just recreate the same rot.
tests/orchestrate-insight-emission.bats + tests/orchestrate-review-pass.bats:
25 -> 23 tests, 1 failure -> 0. Full `bats tests/` (env-isolated):
556/556, 0 failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhwvK2TGfsRV9TQW7Xr6dB
* test(launch-session): isolate suite from ambient LO_*/GROUNDWORK_* env (fixes#100)
A worker session running this suite inherits LO_RUN_ID/LO_STATUS_DIR/
LO_TASK_ID (and GROUNDWORK_*) from its own launch, and `env VAR=val`
in a test's `run` line merges with — not replaces — that inherited
environment. Six tests failed under a worker, and worse, a leaked real
LO_STATUS_DIR let the suite overwrite a live run's status file
(t90.json in i8790).
setup() now unsets every LO_*/GROUNDWORK_*/DEV_LOOP_* variable
launch-session.sh or its status-update.sh callee reads; tests that
need a value keep setting it explicitly per-invocation, which
overrides the unset.
A CONTAMINATION GUARD test plants real-looking decoy status/escalation
dirs as ambient env, re-runs the one boundary test that relies solely
on setup()'s isolation as a nested bats process, and asserts both an
unchanged outcome and zero files in the decoys. Negative control
verified 2026-08-14: with the unset block removed, the decoy gains a
zzz.json, reproducing the live contamination.
Verified: 28/28 in launch-session.bats (clean and ambient-env runs),
full suite green (exit 0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) (#108)
* fix(orchestrate): guard cmd_send against unsubmitted [Pasted text] placeholders (#96)
send-prompt.sh's cmd_send could report "delivered" while the prompt was
actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the
worker's input box -- tmux send-keys reports success as soon as the bytes
reach the tty, regardless of whether the CLI consumed them. Field-confirmed
2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on
[Pasted text #4] until one extra Enter unstuck it.
Port the same guard launch-session.sh already uses for the first injection:
after the existing queued_pat check, detect the placeholder in the
post-send pane capture and retry with Enter, bounded to 3 attempts
(LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present
after the bound reports "unconfirmed" (exit 7), never a guessed "delivered".
The exit-code contract and one-token stdout are unchanged.
Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error:
persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still
wins when both indicators are present) via a scripted fake tmux that returns
a different pane capture on each successive call. Verified against a
guard-stripped mutant: the normal/error cases fail without the fix.
bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
* fix(orchestrate): gate status-update.sh session resolution on $TMUX, document failed-phase reset (#97)
A coordinator-shell caller (outside tmux) running status-update.sh got
tmux display-message answering with the server's most-recently-active
session instead of its own -- there is no $TMUX check before consulting
it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION
still wins unconditionally, and behavior inside tmux or with
STATUS_SESSION set is unchanged.
Also document, in SKILL.md's exit-6 question playbook, the reset step
needed after a worker records phase=failed and the coordinator resolves
it via ask-coordinator -- otherwise watch-status.sh keeps counting the
stale failed phase and re-aborts with exit 3 on every subsequent poll.
The reset is a normal status-update.sh write with the observed phase,
not a new phase word. Document STATUS_SESSION for coordinator-side
calls in the Session knobs paragraph.
Sub-item (c) (stale `error` field surviving merges) is deliberately
skipped per plan decision D5 -- nothing reads that field today.
Extends tests/status-update.bats with normal/regression/boundary cases
for the $TMUX gating; full bats tests/ green (560/560).
* feat(wiki): seed gap categories G1-G6 for issue #38
Add 6 sourced, lint-clean wiki pages closing the highest-priority
wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes
(existing api-design category), data-backfill-migrations (existing
operations category), feature-flag-lifecycle (existing deploy category),
and two new categories — backend/common/architecture
(sync-vs-async-integration) and backend/common/realtime
(websocket-sse-lifecycle). Register every page in its domain index with
a load-when trigger, and extend the root INDEX.md backend route-line for
the two new categories per the mechanical index-registration precedent.
G1 is scoped to sync-vs-async-integration only; the other two
categories.md sub-topics (module-boundaries-and-layering,
event-driven-adoption-criteria) are intentionally left out as future
ingest candidates on issue #38, not silently dropped. G7-G10 stay open
on the issue.
Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61
to 64 directive units (coordinator-approved carve-out, scoped to exactly
this one assertion) — the 6 new pages' Do-this/Instead-of rows push the
real corpus count past the number the test had frozen. The stale
assertion still reported "ok" locally on macOS bash 3.2 due to a
[[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the
test; verified against a bash 5.2 (ubuntu-matching) run that it
genuinely fails without this fix, the same CI-only-failure class as
PR #94/§O3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@choiyounggichoiyounggi mentioned this pull request Aug 17, 2026
1 task
choiyounggi added a commit that referenced this pull request Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109)
Rolls up everything merged since 1.6.0:
- #94: review-time wiki routing, four-lens Phase 4 pass, insight emission,
socratic rework, failure-class pages
- #93: enforceable prohibition lint rule, disjoint routing scopes, flush
concurrency
- #102 (#87#90): {ORCH_DIR} path token, watch-status stall gating + reason
surfacing, merge-on-approval
- #105 (#99, #100): stale scope-purity guards deleted, launch-session suite
isolated from ambient LO_*/GROUNDWORK_* env
- #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry,
$TMUX-gated status-update session resolution + failed-phase reset playbook,
wiki gap seed pages G1–G6
Version bump propagates the send-prompt.sh delivery-confirmation fix to
plugin consumers (groundwork references dev-loop by URL; the cache updates
on version change).
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@choiyounggi
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94

Merged
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813
Aug 14, 2026
Merged

feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85)#94
choiyounggi merged 11 commits into
mainfrom
orch/issues-20260813

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch orch/issues-20260813.

Verification

  • Full bats suite on the merged tree: 521/521 pass, 0 failures
  • wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)
  • Shallow-clone (depth-1) probe: the new commit-purity test skips honestly; runs for real on full clones
  • Review process dogfooded the new pass: two real defects caught and fixed in rework rounds (working-tree purity assertion → commit-anchored; shallow-clone history falsity → --is-shallow-repository guard)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj

dch0202and others added 11 commits August 14, 2026 10:25
Give the wiki's routing protocol a review-time entry point: AGENTS.md's
routing protocol gains step 7, a diff-signal decision table plus a
page-set comparison directive, and both AGENTS.md and INDEX.md's
preambles now name task and diff as the protocol's two inputs.
Steps 1-6 and the Hard rule paragraph are untouched. Adds
tests/review-routing.bats with a negative control proving the new
checks can fail.
Two review-relevant failure classes had no reachable wiki page: a CLI
flag/subcommand/API method that exists locally but not at the execution
site, and two objects written non-atomically with a reader that can
observe the gap. Adds both pages under platforms/toolchains and
backend/common/storage with sourced Do-this tables and edge cases, plus
one review-voice index row each.
Closes#85
Replace Phase 4's one-sentence review method with a fixed pass of four
lenses (plan conformance, wiki re-route via AGENTS.md step 7,
execution-environment reality, multi-object write ordering), each
grounded in a named document, plus templates/review-report.md as the
source for reviews/<task>-rN.md's three-part finding format.
Closes#82.
session-prompt.md §3/§O3 previously forced rework compliance ("Address the
issues...") through an information gap: the coordinator sees the diff but
not the constraint the worker hit. Give the worker the matching half of
i82's Socratic finding format — per blocking finding, fix it or answer its
Question with the concrete reason and leave it, recorded via an in-file
`- **Answer (r{N})**` line; silence on any finding is not a valid
resolution. §O3 additionally requires the worker_done --body to summarize
per-finding outcomes so the coordinator sees the split without opening the
review file. Non-blocking findings are excluded from the obligation.
Also bumps the pre-existing pinned checksum in tests/send-prompt.bats
("the Orca prompt set is byte-identical"), which hashes the exact byte
range covering §O3 and necessarily changed; scoped to the checksum literal
and its precedent-style bump-comment only, per that test's own documented
maintenance convention and coordinator sign-off.
Closes#84.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvxaV9oGPZmpKXh6EsLBh3
…dings
Add the near-miss capture rule to Phase 4: after a rework round's fix is
confirmed by re-review, emit one Insight candidate per fixed
`## Findings` item (never for `## Non-blocking`), using the frozen block
format and 0-3/session cap, with a fenced worked example whose
placeholder trigger/directive keep it from being self-harvested if ever
quoted verbatim.
Also fixes i82's scope-purity test (tests/orchestrate-review-pass.bats):
anchor to the commit that introduced the file instead of live git-status
(avoids false positives from a sibling task's uncommitted files on this
shared branch), and skip honestly on a shallow clone where the adding
commit cannot be resolved truthfully.
Closes#83.
session-prompt.md wraps the §O3 "fix it, or answer its Question" phrase
across two physical lines. The literal-space glob in
session-prompt-rework.bats couldn't match the resulting newline, so the
suite passed locally (bats/eval artifact) but failed on ubuntu bash 5 in
CI (PR #94, not ok 433). Add normalize_ws() and apply it to the two §O3
tests' extracted section before matching; the §3 single-physical-line
structural test keeps raw extraction since it exists to detect embedded
newlines.
@choiyounggi
choiyounggi merged commit 276c921 into mainAug 14, 2026
2 checks passed
@choiyounggi
choiyounggi deleted the orch/issues-20260813 branch August 14, 2026 05:32
choiyounggi pushed a commit that referenced this pull request Aug 14, 2026
… for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
choiyounggi added a commit that referenced this pull request Aug 14, 2026
…ason surfacing, merge-on-approval (#87#90) (#102)
* fix(orchestrate): {ORCH_DIR} absolute-path token for worker-facing orchestration artifacts (#87)
Worker-facing templates referenced briefs/plans/reviews via bare
`.orchestration/...` relative paths, which resolve to nothing once a
worker's cwd is its own worktree. Introduce {ORCH_DIR} (substituted
like {STATUS_DIR}) and convert every such reference in
session-prompt.md (§1-§4, §O1-§O4) and brief.md to it, including the
ad-hoc `$(dirname {STATUS_DIR})/reviews/...` form in §3/§O3. Document
the two-convention rule (orchestration artifacts absolute, repo files
relative) in SKILL.md next to the brief/plan composition text.
Bump the pinned Orca-block cksum in tests/send-prompt.bats to match,
per that test's own same-commit-update convention.
* fix(orchestrate): watch-status.sh reached-target stall-skip + stall-reason surfacing (#88, #89)
A worker already at/above the watched target phase was still stall-checked
and could false-report exit 7 even though its silence was exactly what the
session prompt ordered. The stall check now gates on rank < target_rank;
the dead-worker/liveness check is unchanged and still applies.
When a genuine stall IS reported, classify_stall() reads the pane scrollback
(capture-pane -S -1000) and enriches the exit-7 message with a usage-limit
reset time or chooser-pending state, falling back to the bare message
otherwise. LO_LIMIT_EXTRA additively extends the usage-limit pattern.
Annotations use octal printf escapes (\302\267, \342\200\224) rather than
\xNN hex escapes, since dash (ubuntu CI's /bin/sh) does not interpret \x.
* fix(orchestrate): merge-on-approval dispatch rule + observable worktree base (#90)
A dependent task's worktree previously only received its dependencies'
signatures (Phase 3 step 0 injection), never their merged code, because
merging happened only at Phase 6. Document the gap, adopt merge-on-approval
(merge before returning to ready-set on approval, verified via
git merge-base --is-ancestor) as the dispatch-loop contract, and print each
new worktree's base commit from setup-worktrees.sh so it's checkable.
* fix(orchestrate): keep 'return to step 1 of the dispatch' on one line for the Phase 4 mechanics assertion
tests/orchestrate-review-pass.bats asserts the phrase as a single substring;
the merge-on-approval edit (#90) wrapped it across two lines, which fails on
ubuntu bash while macOS bash 3.2 under BATS eval false-passes — the same
platform class PR #94 hit in §O3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…ession suite from ambient env (#99, #100) (#105)
* test(orchestrate): delete two wave-scoped scope-purity guards (fixes#99)
The #81-#85 wave's per-task scope-purity guards anchored on that wave's
live state: a hardcoded task-file allowlist checked against
`git status --porcelain`, and "the commit that added this file" via
`git log --diff-filter=A`. PR #94 squash-merged the wave, collapsing
the single-file-add commit into a multi-file commit and leaving the
allowlist landmine for any future dirty worktree — the review-pass
guard is now permanently red on main, and the insight-emission guard
is a false-positive trap.
Both guards' consequence (this wave's task touched only its owned
files) is uncomputable now that the wave is over: per
wiki/testing/quality/guard-shape-vs-consequence.md, an uncomputable
consequence narrows the guard's scope, and a finished historical wave
narrows to zero. Deleting outright (not exempting, not skip-on-squash)
avoids an accumulating allow-list and avoids adding a guard that always
skips on main, which is itself a check that cannot fail
(wiki/testing/quality/tests-that-cannot-fail.md).
No replacement guard: scope purity for future orchestration waves is
already served live by the coordinator's Phase 4 diff review and each
task brief's <out_of_scope>, so a repo-persistent guard keyed to a
transient wave would just recreate the same rot.
tests/orchestrate-insight-emission.bats + tests/orchestrate-review-pass.bats:
25 -> 23 tests, 1 failure -> 0. Full `bats tests/` (env-isolated):
556/556, 0 failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhwvK2TGfsRV9TQW7Xr6dB
* test(launch-session): isolate suite from ambient LO_*/GROUNDWORK_* env (fixes#100)
A worker session running this suite inherits LO_RUN_ID/LO_STATUS_DIR/
LO_TASK_ID (and GROUNDWORK_*) from its own launch, and `env VAR=val`
in a test's `run` line merges with — not replaces — that inherited
environment. Six tests failed under a worker, and worse, a leaked real
LO_STATUS_DIR let the suite overwrite a live run's status file
(t90.json in i8790).
setup() now unsets every LO_*/GROUNDWORK_*/DEV_LOOP_* variable
launch-session.sh or its status-update.sh callee reads; tests that
need a value keep setting it explicitly per-invocation, which
overrides the unset.
A CONTAMINATION GUARD test plants real-looking decoy status/escalation
dirs as ambient env, re-runs the one boundary test that relies solely
on setup()'s isolation as a nested bats process, and asserts both an
unchanged outcome and zero files in the decoys. Negative control
verified 2026-08-14: with the unset block removed, the decoy gains a
zzz.json, reproducing the live contamination.
Verified: 28/28 in launch-session.bats (clean and ambient-env runs),
full suite green (exit 0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
choiyounggi added a commit that referenced this pull request Aug 17, 2026
…status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) (#108)
* fix(orchestrate): guard cmd_send against unsubmitted [Pasted text] placeholders (#96)
send-prompt.sh's cmd_send could report "delivered" while the prompt was
actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the
worker's input box -- tmux send-keys reports success as soon as the bytes
reach the tty, regardless of whether the CLI consumed them. Field-confirmed
2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on
[Pasted text #4] until one extra Enter unstuck it.
Port the same guard launch-session.sh already uses for the first injection:
after the existing queued_pat check, detect the placeholder in the
post-send pane capture and retry with Enter, bounded to 3 attempts
(LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present
after the bound reports "unconfirmed" (exit 7), never a guessed "delivered".
The exit-code contract and one-token stdout are unchanged.
Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error:
persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still
wins when both indicators are present) via a scripted fake tmux that returns
a different pane capture on each successive call. Verified against a
guard-stripped mutant: the normal/error cases fail without the fix.
bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
* fix(orchestrate): gate status-update.sh session resolution on $TMUX, document failed-phase reset (#97)
A coordinator-shell caller (outside tmux) running status-update.sh got
tmux display-message answering with the server's most-recently-active
session instead of its own -- there is no $TMUX check before consulting
it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION
still wins unconditionally, and behavior inside tmux or with
STATUS_SESSION set is unchanged.
Also document, in SKILL.md's exit-6 question playbook, the reset step
needed after a worker records phase=failed and the coordinator resolves
it via ask-coordinator -- otherwise watch-status.sh keeps counting the
stale failed phase and re-aborts with exit 3 on every subsequent poll.
The reset is a normal status-update.sh write with the observed phase,
not a new phase word. Document STATUS_SESSION for coordinator-side
calls in the Session knobs paragraph.
Sub-item (c) (stale `error` field surviving merges) is deliberately
skipped per plan decision D5 -- nothing reads that field today.
Extends tests/status-update.bats with normal/regression/boundary cases
for the $TMUX gating; full bats tests/ green (560/560).
* feat(wiki): seed gap categories G1-G6 for issue #38
Add 6 sourced, lint-clean wiki pages closing the highest-priority
wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes
(existing api-design category), data-backfill-migrations (existing
operations category), feature-flag-lifecycle (existing deploy category),
and two new categories — backend/common/architecture
(sync-vs-async-integration) and backend/common/realtime
(websocket-sse-lifecycle). Register every page in its domain index with
a load-when trigger, and extend the root INDEX.md backend route-line for
the two new categories per the mechanical index-registration precedent.
G1 is scoped to sync-vs-async-integration only; the other two
categories.md sub-topics (module-boundaries-and-layering,
event-driven-adoption-criteria) are intentionally left out as future
ingest candidates on issue #38, not silently dropped. G7-G10 stay open
on the issue.
Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61
to 64 directive units (coordinator-approved carve-out, scoped to exactly
this one assertion) — the 6 new pages' Do-this/Instead-of rows push the
real corpus count past the number the test had frozen. The stale
assertion still reported "ok" locally on macOS bash 3.2 due to a
[[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the
test; verified against a bash 5.2 (ubuntu-matching) run that it
genuinely fails without this fix, the same CI-only-failure class as
PR #94/§O3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
---------
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@choiyounggichoiyounggi mentioned this pull request Aug 17, 2026
1 task
choiyounggi added a commit that referenced this pull request Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109)
Rolls up everything merged since 1.6.0:
- #94: review-time wiki routing, four-lens Phase 4 pass, insight emission,
socratic rework, failure-class pages
- #93: enforceable prohibition lint rule, disjoint routing scopes, flush
concurrency
- #102 (#87#90): {ORCH_DIR} path token, watch-status stall gating + reason
surfacing, merge-on-approval
- #105 (#99, #100): stale scope-purity guards deleted, launch-session suite
isolated from ambient LO_*/GROUNDWORK_* env
- #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry,
$TMUX-gated status-update session resolution + failed-phase reset playbook,
wiki gap seed pages G1–G6
Version bump propagates the send-prompt.sh delivery-confirmation fix to
plugin consumers (groundwork references dev-loop by URL; the cache updates
on version change).
Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q
Co-authored-by: dch0202 <dch0202@infobank.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@choiyounggi