Skip to content

fix(orchestrate): ORCH_DIR path token, watch-status stall gating + reason surfacing, merge-on-approval (#87–#90) - #102

Merged
choiyounggi merged 6 commits into
mainfrom
orch/issues-87-90
Aug 14, 2026
Merged

fix(orchestrate): ORCH_DIR path token, watch-status stall gating + reason surfacing, merge-on-approval (#87–#90)#102
choiyounggi merged 6 commits into
mainfrom
orch/issues-87-90

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

Three parallel worker tasks (orchestrate run i8790) closing four field-reported defects from real orchestration runs:

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 main before this branch.

Related issues filed during the run

Closes #87
Closes #88
Closes #89
Closes #90

🤖 Generated with Claude Code

https://claude.ai/code/session_01TmjpSq96p3LFaMsNJM4eAF

dch0202 and others added 6 commits August 14, 2026 15:56
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment