Injected verbatim into ALL worker prompts (OUTWARD/APPLICABILITY/ADVERSARIAL/INNOVATION/SYNTHESIS/QUALIFY)
Worker never derives its own path — producer and consumer share one authoritative output location
Root cause of B3-v2's 3 APPLICABILITY failures: executor artifact_dir was research/issue-162-b3v2/ but the prompt told the worker research/issue-162/ — a second source of truth
D5 — COGNITIVE_STAGE_MUTATION_BOUNDARY:
mutation_boundary.py: capture_worktree_state (porcelain + HEAD) before; verify_no_source_mutation after
New changes outside declared artifact paths → UNAUTHORIZED_STAGE_MUTATION → STAGE_FAILED, no advancement
HEAD movement detected (cognitive stages must never commit)
Wired into execute() for cognitive stages only (ISSUE/IMPLEMENT exempt)
Tests: clean stage passes; source mutation → FAILED + no advancement + mutation visible for review
B1-v2's leak is now structurally prevented: the worker that tried to fix the bug during OUTWARD research would be caught by the mutation boundary before its edits could be mistaken for legitimate stage output.
1164 tests pass; ruff clean; lint baseline held (BLE001 narrowed).
## D4 + D5: executor-owned artifact targets + cognitive-stage mutation boundary
Branch `d4d5-artifact-contract`, commit a997a0a.
**D4 — ARTIFACT TARGET CONTRACT IS EXECUTOR-OWNED:**
- `_declared_artifact_path(stage)`: absolute path = artifact_dir + STAGE_ARTIFACT_FILES[stage]
- Injected verbatim into ALL worker prompts (OUTWARD/APPLICABILITY/ADVERSARIAL/INNOVATION/SYNTHESIS/QUALIFY)
- Worker never derives its own path — producer and consumer share one authoritative output location
- Root cause of B3-v2's 3 APPLICABILITY failures: executor artifact_dir was `research/issue-162-b3v2/` but the prompt told the worker `research/issue-162/` — a second source of truth
**D5 — COGNITIVE_STAGE_MUTATION_BOUNDARY:**
- `mutation_boundary.py`: capture_worktree_state (porcelain + HEAD) before; verify_no_source_mutation after
- New changes outside declared artifact paths → UNAUTHORIZED_STAGE_MUTATION → STAGE_FAILED, no advancement
- HEAD movement detected (cognitive stages must never commit)
- Wired into execute() for cognitive stages only (ISSUE/IMPLEMENT exempt)
- Tests: clean stage passes; source mutation → FAILED + no advancement + mutation visible for review
**B1-v2's leak is now structurally prevented:** the worker that tried to fix the bug during OUTWARD research would be caught by the mutation boundary before its edits could be mistaken for legitimate stage output.
1164 tests pass; ruff clean; lint baseline held (BLE001 narrowed).
🤖Headless spec gate (non-blocking, #204 first slice)
Spec-gate agent produced no text output — check runner logs.
Deterministic floors still govern the merge
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.
🤖 **Headless spec gate (non-blocking, #204 first slice)**
Spec-gate agent produced no text output — check runner logs.
<details><summary>Deterministic floors still govern the merge</summary>
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.</details>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
D4 + D5: executor-owned artifact targets + cognitive-stage mutation boundary
Branch
d4d5-artifact-contract, commita997a0a.D4 — ARTIFACT TARGET CONTRACT IS EXECUTOR-OWNED:
_declared_artifact_path(stage): absolute path = artifact_dir + STAGE_ARTIFACT_FILES[stage]research/issue-162-b3v2/but the prompt told the workerresearch/issue-162/— a second source of truthD5 — COGNITIVE_STAGE_MUTATION_BOUNDARY:
mutation_boundary.py: capture_worktree_state (porcelain + HEAD) before; verify_no_source_mutation afterB1-v2's leak is now structurally prevented: the worker that tried to fix the bug during OUTWARD research would be caught by the mutation boundary before its edits could be mistaken for legitimate stage output.
1164 tests pass; ruff clean; lint baseline held (BLE001 narrowed).
🤖 Headless spec gate (non-blocking, #204 first slice)
Spec-gate agent produced no text output — check runner logs.
Deterministic floors still govern the merge
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.