v1.2.0 — orchestrate: production hardening (substrate choice, cleanup, timeouts, verified delivery) - #33
Merged
Merged
Conversation
added 9 commits
August 5, 2026 16:32
Production hardening of the orchestrate skill: a substrate choice the user must answer, run-scoped cleanup with --dry-run, per-phase deadlines and a tmux stall detector, verified prompt delivery, and the guardrails allowlist that stops legitimate coordination writes from escalating. Also gitignores .worktrees/ — this skill creates its worker worktrees there, so a plain `git add -A` in the main checkout commits them as gitlinks.
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.
Four changes asked for after a production-readiness review, built and verified by running
orchestrateon the tmux substrate — which is also the path that needed the work, since it had a quarter of the Orca path's test coverage.What changed
① Orca no longer wins by default. Phase 3 said Orca was "the default when Orca is present, not optional", so a detected Orca was delegated to without the user ever being told. Now a non-zero
orca-detect.shstill goes to tmux silently, but exit 0 produces a choice the user must answer — Orca (native trust-screen handling, event-driven waits, native liveness) vs tmux (mid-flight steering viasend-prompt.sh, no extra dependency) — folded into the Gate 1 turn so it costs no extra round trip. No default, no remembered choice, no environment override.② Cleanup that finds what a dead run left behind.
safe-cleanup.shgains a run-scopedsweep,--dry-runon every destructive verb, andgit worktree prune. The split is deliberate: read-onlylist-orphansis unscoped (it can see another run's leftovers), destructivesweepis scoped toLO_RUN_IDand REFUSEs without one — a sweep that can remove more than the old code had to be harder to trigger, not easier. Unregistered.worktrees/directories are reported, never deleted (they may hold uncommitted work).③ Timeouts, and the third worker state.
watch-status.shgains per-phase deadlines. Newtmux-worker-stalled.shgives the tmux path the ALIVE-but-stuck answer the Orca path already had (0 progressing / 1 stalled / 2 unknown; unknown is never treated as stalled). The signal was chosen by measurement —#{window_activity}was rejected because it is byte-driven and fooled by TUI repaint, the same traplastOutputAtset on the Orca side, and the rejected candidate is pinned in a test.④ Prompt delivery you can branch on. New
send-prompt.sh—send(delivered / queued / session-gone as distinct outcomes),wait(bounded wait for pickup),state(read-only, one token).launch-session.shnow confirms the prompt was actually submitted: exit 0 means "launched and submission confirmed", and the new exit 5 means "sent but could not confirm", distinct from exit 4 "the REPL never came up".Plus
worker-guardrails.shemitsrules.worktree_escape.allowPaths: [".orchestration"], the dev-loop half of choiyounggi/groundwork#2.The field evidence this was built from
Every item above came from running the skill, not from reading it:
launch-session.shprintedok: prompt injectedwhile the prompt sat unsubmitted as[Pasted text #1 +1 lines]for 45 minutes — one extra Enter ran it; two sibling workers launched seconds earlier were fineworktree_escapeescalations, each aborting the whole watch (exit 5) for a legitimate status/plan writeallowPathsemissionlo-testtmux session orphaned for over a day, invisible tokill-sessionssweep/list-orphansThe submission failure is intermittent and its cause is not proven — length (500–2000 chars) and Enter-delay (0 / 0.2 / 1s) were both tested in a plain shell and did not reproduce it. The fix is designed against the symptom, and the not-proven part is recorded as such rather than asserted.
Verification
npx bats tests/— 307/307, was 183. Every exit code measured on its own, never through a pipe.sh -n; new tests invoke them withsh, notbash, so the#!/bin/shshebang is actually exercised.test-quality-auditorcross-called on the largest test file → PASS, with four negative controls proving the assertions can fail.self-test.shstill 10/10 with the new worker sandbox config..worktrees/is now gitignored — this skill creates its worker worktrees there, so a plaingit add -Ain the main checkout commits them as gitlinks (which happened once while preparing this branch and was reverted).Tag
v1.2.0after merge.🤖 Generated with Claude Code