feat(D4+D5): executor-owned artifact targets + cognitive-stage mutation boundary #317

Merged
conductor merged 1 commits from d4d5-artifact-contract into master 2026-09-10 00:00:05 +01:00
Owner

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).

## 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).
conductor added 1 commit 2026-09-09 23:58:27 +01:00
feat(D4+D5): executor-owned artifact targets + cognitive-stage mutation boundary (closes #298 scope)
CI Pipeline / best-practices (push) Successful in 6s
CI Pipeline / documentation (push) Successful in 3s
Auto-label / priority-gate (pull_request) Skipped
Auto-label / auto-label (pull_request) Successful in 3s
CI Pipeline / canary (push) Successful in 34s
CI Pipeline / lint (push) Successful in 42s
CI Pipeline / type-check (push) Successful in 30s
CI Pipeline / unit-tests (push) Successful in 58s
CI Pipeline / gitea-offline (push) Successful in 15s
CI Pipeline / best-practices (pull_request) Successful in 3s
CI Pipeline / documentation (pull_request) Successful in 3s
CI Pipeline / lint (pull_request) Successful in 38s
CI Pipeline / canary (pull_request) Successful in 31s
Spec gate (headless) / spec-gate (pull_request) Successful in 6s
CI Pipeline / required-checks (push) Successful in 1s
CI Pipeline / type-check (pull_request) Successful in 30s
CI Pipeline / unit-tests (pull_request) Successful in 53s
CI Pipeline / gitea-offline (pull_request) Successful in 15s
CI Pipeline / required-checks (pull_request) Successful in 1s
Auto-version and Release / release (pull_request) Successful in 37s
a997a0ae4c
D4 — ARTIFACT TARGET CONTRACT IS EXECUTOR-OWNED:
- _declared_artifact_path(stage): absolute path computed from artifact_dir +
  STAGE_ARTIFACT_FILES[stage]; injected verbatim into every worker prompt
  (APPLICABILITY/ADVERSARIAL/SYNTHESIS/INNOVATION/OUTWARD/QUALIFY)
- Worker never derives its own path — producer and consumer share one
  authoritative output location (the B3-v2 root cause: worker's prompt said
  research/issue-162/ but executor's artifact_dir was research/issue-162-b3v2/)
- Acceptance: nonstandard artifact_dir (issue-162-b3v2) now gets the correct
  path injected

D5 — COGNITIVE_STAGE_MUTATION_BOUNDARY:
- mutation_boundary.py: capture_worktree_state (status porcelain + HEAD)
  before cognitive stages; verify_no_source_mutation after; new changes
  outside declared artifact paths → UNAUTHORIZED_STAGE_MUTATION
- HEAD movement detected (cognitive stages must never commit)
- allowed paths: declared artifact + telemetry + consumed markers
- Wired into execute(): cognitive stages only (ISSUE/IMPLEMENT skip);
  failure → STAGE_FAILED, no advancement
- Tests: clean stage passes; source mutation detected → FAILED + no
  advancement + mutation visible for human review

BLE001 narrowed in mutation_boundary (git errors are OSErrors).

1164 tests pass; ruff clean.
gitea-actions Bot added the buginfrastructure labels 2026-09-09 23:58:35 +01:00

🤖 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>
conductor merged commit 1917b46bef into master 2026-09-10 00:00:05 +01:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: conductor/rune#317