fix(orchestrate): resolve open issues #168 #169 #170 - #176
Merged
Conversation
…recovery Adds a new named script so an auto-mode coordinator can clear a guardrails escalation record and deliver the verdict to the waiting worker in one pre-approved call, without any bare `rm`. Registers it as a 4th rule in install-permission-rules.sh and wires it into SKILL.md's Preflight, pasteable JSON snippet, exit-5 playbook, and O4 escalation-clear bullet. Fixes #168.
…#170) archive_scratch() enumerated untracked files with `ls-files --others` (no --exclude-standard), which swept gitignored dependency trees like node_modules/ into the teardown archive — issue #170's measured 512MB/12,519-file hang. Switch enumeration to --exclude-standard and collect the intentionally-excluded scratch (.claude/, info/exclude'd by worker-guardrails.sh) via an explicit SCRATCH_WHITELIST, dir-level cp -Rp, guarded by `git check-ignore` so it isn't double-archived when not actually ignored. Dry-run output format is unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GCxnCrbK53T38YHZXduXXy
Empty diff enumeration now exits 2 (unknown, stderr empty-range:<range>) instead of exiting 0 pass. A single-ref arg (no "..") switches test-floor.sh to working-tree mode, diffing the ref against the working tree and counting untracked files as newly-added, so review-time measurement (before the worker commits) actually sees the work. SKILL.md's Phase 4 floor invocation is switched from the range form to the single-ref form accordingly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HJx7SqJdXYJyAZoMcdRHgh
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.
Fixes #168, fixes #169, fixes #170 — the three open orchestrate-skill defects, built via a dev-loop orchestration run (3 parallel worker sessions, per-task plan/review/audit, integration review green).
#168 — exit-5 escalation recovery is now a pre-approvable named script
skills/orchestrate/scripts/resolve-escalation.sh: clears the escalation record(s) for a task by.taskIdand optionally delivers the coordinator's verdict via the siblingsend-prompt.shin the same pre-approved call. stdoutcleared=<n> delivered=<0|1>, exits 0/2/3/6/127, clear-then-deliver ordering.install-permission-rules.shnow installs/checks four path rules + an autoMode sentence naming the script; old 3-rule installs upgrade in place (old sentence left untouched).tests/resolve-escalation.bats(11 cases incl. delivery stub + source-text wiring);tests/install-permission-rules.batsextended (24 total green).#169 — test-floor.sh can no longer pass vacuously on an empty range
unknown, stderrempty-range:<range>) instead of a greenpassthat measured nothing...) now means working-tree mode: tracked diff vs the ref plus untracked files counted as added — matching review time, when workers have not committed yet.A...B/A..Brange behavior is byte-identical to before.'<integ>...HEAD'to'<integ>'with the rationale inline.tests/test-floor.bats+6 cases (21 green), including the issue's A-vs-B inversion repro.#170 — teardown no longer archives gitignored dependency trees
archive_scratch()enumerates withls-files --others --exclude-standard, sonode_modules/etc. (the measured 512MB/12,519-file hang) never enter the archive..claude), dir-levelcp -Rp, guarded bygit check-ignoreto prevent double-archiving; copy-before-delete invariant and dry-run output format preserved.tests/safe-cleanup.bats+5 cases (55 green).Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_019E2mpaSu6jP8FgdscnsWn7