feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) - #94
Merged
Conversation
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.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 14, 2026
Closed
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>
This was referenced Aug 14, 2026
Closed
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five-issue batch strengthening dev-loop's code review, orchestrated in parallel worker sessions (Orca substrate) on integration branch
orch/issues-20260813.AGENTS.mdrouting protocol gains step 7: a review entry that routes from the diff (6-row signal table) and reports the page-set difference vs the plan;INDEX.mdpreamble states the two inputs. (cebe298)platforms/toolchains/flag-availability-at-the-execution-siteandbackend/common/storage/multi-object-write-ordering, with index rows in review voice. (1f1b853)templates/review-report.mdwith the three-part finding format. (8e586e7)## Findingsdefect emits an ★ Insight candidate (frozen format, harvest path verified end-to-end);## Non-blockingnever emits. (e043269)Answer (r{N})in-file convention; Orca-set checksum pin bumped per the file's own convention. (c9b391f)Verification
wiki-lint-prohibitions: 61 directives / 61 compliant / 0 violations (AGENTS.md, INDEX.md clean)--is-shallow-repositoryguard)🤖 Generated with Claude Code
https://claude.ai/code/session_01GqFgBhKeZrHRZekmgLTbSj