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

dch0202 and 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 main Aug 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>
Sign up for free to 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