Skip to content

release(v9.0.1): wave-parallel isolation:worktree + generator→evaluator firewall + dogfood63 hardening - #97

Merged
aimsise merged 3 commits into
mainfrom
impl/dogfood62-criticals-v9.0.1
Jun 27, 2026
Merged

release(v9.0.1): wave-parallel isolation:worktree + generator→evaluator firewall + dogfood63 hardening#97
aimsise merged 3 commits into
mainfrom
impl/dogfood62-criticals-v9.0.1

Conversation

@aimsise

@aimsise aimsise commented Jun 27, 2026

Copy link
Copy Markdown
Owner

v9.0.1 — wave-parallel isolation:worktree + generator→evaluator firewall

Fixes the three criticals the v9.0.0 first real wave-parallel dogfood surfaced, plus four refinements from the v9.0.1 re-dogfood (dogfood63). Non-breaking: every new default is metric-only / kill-switched, and parallel=off stays byte-identical to v9.0.0.

FIX-1 — wave-parallel executes (isolation:"worktree" redesign)

v9.0.0 wave-parallel fell back to serial (the executor was spawned at repo-root cwd → EnterWorktree rejected). Phase-0 spikes settled the mechanism: the Task tool has no cwd param, but isolation:"worktree" is native and bases the worktree on the orchestrator's HEAD. The scheduler now spawns each ticket-executor with isolation:"worktree" + MAIN_REPO; the executor self-creates the .simple-workflow symlink first; the orchestrator checks out the local-only ap-integration/<parent> branch in its own main checkout and merges completed worktree-agent-<id> branches there (no dedicated integration worktree). A worktree-capability pre-flight falls back to byte-identical serial on an unsupported host.

FIX-2 + FIX-3 — generator→evaluator→audit firewall

A .agent_type PreToolUse identity gate denies a review/evaluator subagent the git add/commit/mv/push + pipeline-skill + phase-advancement vectors; the inline-git commit authorization is re-keyed from a forgeable phases.ship.status flag to a non-forgeable /ship-issued .ship-commit-nonce. Ships metric-only behind SW_REVIEW_FIREWALL_MODE / SW_STATE_ADVANCE_GUARD_MODE. Per-agent tools: allowlists can't close the Bash vector (Phase-0 S3), so the hook is the sole mechanism.

dogfood63 hardening (re-dogfood, all low/medium, self-recovered)

AC-8 PASSED decisively; AC-6 ran with zero firewall false-trips. Four refinements: (a) nonce gate tolerates a co-located : > nonce && git commit (PreToolUse-timing false-trip fix; bare commit still blocked); (b) codified no-remote post-loop landing (--ff-only advance + divergence fallback); (c) SubagentStop guards emit a main_checkout_root resolution marker, unit-tested through a worktree symlink (closes the AC-8 owed item); (d) implementer must isolate build/test tooling installs to the workspace (no --break-system-packages system mutation).

Verification

test-skill-contracts 914/914 (new CT-FIX1-SPAWN-ISOLATION/SYMLINK/PREFLIGHT/NOREMOTE-LANDING, CT-FIX2-, CT-FIX3-, CT-FIX4-ENV-ISOLATION; CT-WORKTREE-1/2/3/8/9 rewritten; CT-MODE-13/14, DECONTAM, EV-MODEL all green); pre-bash 26/26; scout-checkpoint 29/29 + impl-checkpoint 23/23 (T-PAR-9 worktree-symlink resolution); state-transition 21/21; pre-skill 9/9 (new); path-consistency 145/145; run-all.sh ALL PASSED; shellcheck -S error clean. plugin.json 9.0.1 == newest CHANGELOG [9.0.1].

Phase-0 spikes S1–S5 + the dogfood63 forensic eval drive every mechanism. Owed (follow-up): a live review-agent deny gates the metric-only → on knob promotion (the clean run produced no breach). See CHANGELOG.md [9.0.1].

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mw2bH4wbEPeebXsvSG6rWe

aimsise and others added 3 commits June 27, 2026 04:31
…tor firewall (dogfood62 FIX-1/2/3)

Fixes the three criticals the v9.0.0 first real wave-parallel dogfood surfaced.

FIX-1 (wave-parallel executes): redesign the per-ticket worktree mechanism around
the platform's native isolation:"worktree" Task parameter (the prior manual
`git worktree add` + cwd-at-spawn path was unreachable -- Phase-0 S1: the Task tool
has no cwd parameter). The scheduler spawns each ticket-executor with
isolation:"worktree" + MAIN_REPO=<abs>; the executor self-creates the
.simple-workflow -> main-checkout symlink as its first step. The orchestrator
advances the cross-wave base by checking out the local-only ap-integration/<parent>
branch IN its own main checkout and merging each completed worktree-agent-<id>
branch there (no dedicated integration worktree -- a branch cannot be checked out
in two worktrees; S5 validated isolation:worktree bases on the orchestrator HEAD).
A worktree-capability pre-flight runs before the integration checkout; on an
isolation-unsupported host it deletes the parallel_mode: line (persisting the
downgrade so resume does not re-thrash) and falls back to byte-identical serial
(SW_PARALLEL_WORKTREE_PREFLIGHT_MODE, default on, unknown->on). CT-WORKTREE-1/2/3/8/9
rewritten + CT-FIX1-SPAWN-ISOLATION/SYMLINK/PREFLIGHT.

FIX-2 (generator->evaluator firewall, Bash + Skill): re-key the inline-git-commit
authorization from the forgeable phases.ship.status proxy to a non-forgeable
.ship-commit-nonce file /ship writes before its Step-3 commit (unconditional, not
knob-gated); deny git add/commit/mv/push from a review agent (git worktree exempt)
+ namespaced pipeline-skill invocation from a review agent (new
hooks/pre-skill-contract-guard.sh). The .agent_type identity gate (Phase-0 S2:
native in the PreToolUse payload) + unconditional simple-workflow: strip is the
sole mechanism (S3: tools: allowlists don't enforce Bash-subcommand granularity).
SW_REVIEW_FIREWALL_MODE, default metric-only.

FIX-3 (phase-state write-authority): pre-state-transition.sh detects every
advancement (not just status:skipped) identity-free, and Detection 4 denies a
review/evaluator agent (all six, bare + namespaced, incl ticket-evaluator) writing
an advancement; the Bash mirror (Detection 3) gains current_phase/overall_status +
bare ship. Fail-open-on-empty (orchestrator/generators always allowed).
SW_STATE_ADVANCE_GUARD_MODE, default metric-only.

All firewall guards are autopilot-context-gated (no regression on a normal git
commit), fail-open (exit 0; a block is decision JSON), silent on missing jq. Every
new default is kill-switched; parallel=off stays byte-identical to v9.0.0.

Verification: test-skill-contracts 912/912 (CT-MODE-13/14 green), pre-bash 24/24,
state-transition 21/21 [(a)-(f) + pending->completed canary ALLOW], pre-skill 9/9
(new), path 145/145, run-all ALL PASSED, shellcheck -S error clean (3 hooks),
hooks.json valid, DECONTAM 0. Adversarial: FIX-1 read-only review GO-WITH-NOTES
(5/5 claims survive, pre-flight-ordering edge fixed); FIX-2/3 4-lens panel all
SURVIVE (0 blocker, 2 minor fixed: property-CT token-boundary + stale header).
Phase-0 spikes S1-S5 (headless claude -p, CC 2.1.191).

Owed (gates the metric-only->on knob promotion, a follow-up): re-dogfood AC-6
(firewall mechanical) + AC-8 (parallel end-to-end + SubagentStop under an
isolation worktree).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mw2bH4wbEPeebXsvSG6rWe
…-remote landing + SubagentStop observability + env-isolation)

The v9.0.1 re-dogfood (test_simple_workflow63, a 3-ticket wave-parallel run
with the firewall knobs on) PASSED AC-8 decisively (truly-concurrent wave-0
spawn, isolation worktrees, git-proven cross-wave integration, 61 product
tests, normal_completion) and AC-6 with zero firewall false-trips on legit
review activity. It surfaced four low/medium findings, all self-recovered in
the run, hardened here:

(a) Nonce same-command false-trip (FIX-2 refinement). /ship combined the
Step-2.5 `: > .../.ship-commit-nonce` write and the Step-3 `git commit` in one
&& chain; PreToolUse inspects the whole command before the `: >` runs, so the
nonce was absent on disk -> false-block (1 of 3 ship paths). The nonce gate
(pre-bash-contract-guard.sh) now also scans $COMMAND for a co-located
active-tree nonce write and treats it as present; a bare `git commit` (no such
write) is still blocked. ship/SKILL.md documents both forms. NOT a FIX-1xFIX-2
path mismatch (the retry from the worktree PWD succeeded -> write+check resolve
the same file via the symlink). CT-FIX2-NONCE-COLOCATED.

(b) No-remote main-advance (FIX-1 refinement). With no remote there are no
per-ticket PRs to carry the integrated work, so the orchestrator improvised a
`git checkout main && git merge --ff-only ap-integration/<parent>`. The
post-loop now codifies this: no-remote -> ff-only-advance the start ref to the
integrated tip (with a divergence fallback that leaves the work on
ap-integration + warns, never a forced merge commit); with a remote ->
restore-only (PRs are the landing surface). CT-FIX1-NOREMOTE-LANDING.

(c) SubagentStop main_checkout_root resolution (AC-8 owed item). The relocated
checkpoint guards resolve the phase-state via the orchestrator-written absolute
main_checkout_root; subagent transcripts do not capture hook stderr, so the
resolution was unverifiable from the dogfood. scout/impl-checkpoint-guard.sh
now emit a behaviour-neutral `main_checkout_root resolution` marker, unit-tested
end-to-end through a worktree `.simple-workflow` symlink (T-PAR-9 + non-vacuity
control in test-scout/impl-checkpoint-guard.sh).

(d) Build/test tooling isolation (eval-sandbox). A wave-0 executor installed
pytest into the system interpreter via --break-system-packages, persisting on
the host. agents/implementer.md now requires tooling installs to be isolated to
the workspace (venv / project-local / container) and forbids mutating a shared/
global/system toolchain that persists outside the workspace (agnostic: the
operative property is persists-outside-the-workspace; examples illustrative).
CT-FIX4-ENV-ISOLATION.

The metric-only->on knob promotion stays a follow-up (the clean run produced no
breach, so the live review-agent deny path is still owed).

Verification: test-skill-contracts 914/914 (+CT-FIX1-NOREMOTE-LANDING,
CT-FIX2-NONCE-COLOCATED, CT-FIX4-ENV-ISOLATION), pre-bash 26/26, scout-checkpoint
29/29 (+T-PAR-9), impl-checkpoint 23/23 (+T-PAR-9), state-transition 21/21,
pre-skill 9/9, path 145/145, run-all.sh ALL PASSED, shellcheck -S error clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mw2bH4wbEPeebXsvSG6rWe
Two assigned-but-unused variables from the FIX-3 implementation tripped CI's `shellcheck --severity=warning` (local checks had used `-S error`, which is errors-only): TRANSCRIPT_PATH in pre-state-transition.sh (the FIX-3 plan added it speculatively; Detection 4 uses only AGENT_TYPE) and STATE_ADV in test-state-transition-guard.sh (the test uses PS_ADV). Both removed; the tree-prepare side effect is preserved. shellcheck --severity=warning now clean on hooks/*.sh + tests/*.sh; test-state-transition-guard.sh 21/21.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mw2bH4wbEPeebXsvSG6rWe
@aimsise
aimsise merged commit 3bca947 into main Jun 27, 2026
2 checks passed
@aimsise
aimsise deleted the impl/dogfood62-criticals-v9.0.1 branch June 27, 2026 07:58
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