Files
rune/tests
Nick 31a3d42535 fix(D5.1-D5.3): mutation boundary tightening — content fingerprints, explicit per-stage allowlist, all-terminal-path verification
D5.1 — CONTENT FINGERPRINTS, not porcelain-line diffs:
  capture_worktree_state() now records a sha256 per tracked+untracked file.
  verify_no_source_mutation() compares hashes — a change to an already-dirty
  file is detected (porcelain comparison would produce the same line and
  miss it). require_clean_worktree() added for baseline methodology.

D5.2 — EXPLICIT PER-STAGE ALLOWLIST, not artifact_dir-wide:
  the executor passes exactly: the declared stage artifact file, this
  stage's event/err files, telemetry/, consumed markers, and task_tree.json
  (executor-owned — advance() writes it, not the worker). An OUTWARD
  worker can no longer silently modify another stage's artifact or the
  task-tree authority — cross-stage writes are detected.

D5.3 — VERIFY ON EVERY TERMINAL PATH:
  the mutation check runs for COMPLETED, GATE_FAILED, GATE_RETRY, FAILED,
  TIMEOUT and INTERRUPTED — a worker that mutates source and then fails
  still has the mutation identified.

3 new tests: fingerprint-catches-already-dirty-file-mutation,
cross-stage-artifact-write-detected, HEAD-movement-without-file-changes.

1168 tests pass; ruff clean.
2026-09-10 00:13:06 +01:00
..