fix(orchestrate): ORCH_DIR path token, watch-status stall gating + reason surfacing, merge-on-approval (#87–#90) - #102
Merged
Merged
Conversation
…chestration 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.
…eason 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.
…ee 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.
… 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
This was referenced Aug 14, 2026
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 free
to 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
Three parallel worker tasks (orchestrate run i8790) closing four field-reported defects from real orchestration runs:
{ORCH_DIR}token (4e76e1e): worker-facing templates referenced.orchestration/briefs|plans|reviews/...as bare relative paths, which resolve to nothing inside a worker worktree. All such references now use the{ORCH_DIR}absolute-path token (substituted at prompt composition, like{STATUS_DIR}); the$(dirname {STATUS_DIR})ad-hoc form in §3/§O3 is gone. Documented convention: orchestration artifacts absolute, repo files worktree-relative.b89d84a): a task at/above the watched target phase is no longer stall-checked (its silence is prompt-ordered; the dead-worker check still applies), and a genuine exit-7 stall message now surfaces the machine-readable reason from the pane scrollback (capture-pane -S -1000):usage limit · resets <time>(extendable viaLO_LIMIT_EXTRA) orchooser pending. Annotations use octal escapes — dash's printf does not interpret\xNN(caught in review r1, pinned by dash-invoked regression tests).27dae2c): documented thatdepsdeliver signatures, not merged code; on approval a task's branch is merged into the integration branch (ff viagit fetch . <br>:<integ>, elsesafe-cleanup.sh merge) and verified withgit merge-base --is-ancestorbefore dependents dispatch; worktrees are created at dispatch time from the current tip, andsetup-worktrees.shnow printsbase=<hash>. This run itself exercised the pattern (t90's worktree contained t87's merged code).Tests
42 new BATS cases (negative gates with negative controls, real git fixtures, dash portability regressions). Integration suite on this branch: 557 pass / 1 fail — the single failure is the pre-existing squash-anchor test tracked as #99, red on
mainbefore this branch.Related issues filed during the run
LO_*ambient env leaks into worker-run test suites and can contaminate live run state (untouched here)Closes #87
Closes #88
Closes #89
Closes #90
🤖 Generated with Claude Code
https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF