feat(ADAPT-9): artifact authority + retry authority #309

Merged
conductor merged 2 commits from adapt9-artifact-authority into master 2026-09-09 20:52:46 +01:00
Owner

ADAPT-9: artifact authority + retry authority (closes #298)

Branch adapt9-artifact-authority, commit cbe0d61. Bounded exactly to the two authority problems — no ResearchProcess cleanup round.

1. Artifact authority:

  • _resolve_worker_artifact(): the declared stage artifact file (STAGE_ARTIFACT_FILES) is the sole canonical channel
  • stdout JSON extraction demoted to LEGACY_COMPATIBILITY_ONLY behind allow_stdout_fallback=False (canonical default OFF, proven by test; marked NOT CANONICAL — REMOVE AFTER legacy tests rewritten)
  • prose stdout + missing file → STAGE_FAILED, error=ARTIFACT_MISSING — the nasty case from #163 is structurally impossible: plausible stdout JSON claiming success with no artifact file → FAILED, no advancement, no accepted artifact
  • stdout prose + valid file → PASS (single authority, precedence test)
  • all four MiMo-cognitive stages (APPLICABILITY/ADVERSARIAL/INNOVATION/SYNTHESIS) rewired to the shared helper

2. Retry authority:

  • retry = new attempt/event ID; no .consumed_ deletion exists anywhere in scripts/* (verified by grep)
  • failed attempt cannot advance the tree
  • duplicate delivery of a COMPLETED event → DUPLICATE no-op
  • failed-attempt history retained after successful retry (assertion on stage_history)
  • acceptance sequence proven: FAILED → retry → GATE_FAILED → retry → COMPLETED → duplicate delivery = 3 genuine attempts retained, 1 duplicate no-op, exactly one ADVERSARIAL advancement

The nasty acceptance tests from the handoff, both present:

  • stdout: "OUTWARD completed successfully {...plausible JSON...}" + missing file → FAILED, ARTIFACT_MISSING, no advancement
  • stdout: ordinary prose + valid artifact file → PASS

No new persistence layer: the existing task_tree.json + STAGE_ARTIFACT_FILES model carries everything.

6 tests; full suite 1158 passed; ruff clean. Note: StageExecutor holds its own tree instance from the persisted dir — tests assert on ex.tree for post-execute state.

Ratification limitation 2 CLOSED. Epic #284: 4/5 limitations closed; #288 is an accepted limitation (no work). Foundation ready: forge healthy, timing persistent, provenance inspectable, artifacts single-authority, retries append-only. #290 ADAPT-1 next.

## ADAPT-9: artifact authority + retry authority (closes #298) Branch `adapt9-artifact-authority`, commit cbe0d61. Bounded exactly to the two authority problems — no ResearchProcess cleanup round. **1. Artifact authority:** - `_resolve_worker_artifact()`: the declared stage artifact file (STAGE_ARTIFACT_FILES) is the sole canonical channel - stdout JSON extraction demoted to **LEGACY_COMPATIBILITY_ONLY** behind `allow_stdout_fallback=False` (canonical default OFF, proven by test; marked NOT CANONICAL — REMOVE AFTER legacy tests rewritten) - prose stdout + missing file → **STAGE_FAILED, error=ARTIFACT_MISSING** — the nasty case from #163 is structurally impossible: plausible stdout JSON claiming success with no artifact file → FAILED, no advancement, no accepted artifact - stdout prose + valid file → PASS (single authority, precedence test) - all four MiMo-cognitive stages (APPLICABILITY/ADVERSARIAL/INNOVATION/SYNTHESIS) rewired to the shared helper **2. Retry authority:** - retry = new attempt/event ID; **no .consumed_* deletion exists anywhere in scripts/** (verified by grep) - failed attempt cannot advance the tree - duplicate delivery of a COMPLETED event → DUPLICATE no-op - failed-attempt history retained after successful retry (assertion on stage_history) - acceptance sequence proven: FAILED → retry → GATE_FAILED → retry → COMPLETED → duplicate delivery = 3 genuine attempts retained, 1 duplicate no-op, exactly one ADVERSARIAL advancement **The nasty acceptance tests from the handoff, both present:** - stdout: "OUTWARD completed successfully {...plausible JSON...}" + missing file → FAILED, ARTIFACT_MISSING, no advancement - stdout: ordinary prose + valid artifact file → PASS No new persistence layer: the existing task_tree.json + STAGE_ARTIFACT_FILES model carries everything. 6 tests; full suite 1158 passed; ruff clean. Note: StageExecutor holds its own tree instance from the persisted dir — tests assert on ex.tree for post-execute state. **Ratification limitation 2 CLOSED. Epic #284: 4/5 limitations closed; #288 is an accepted limitation (no work). Foundation ready: forge healthy, timing persistent, provenance inspectable, artifacts single-authority, retries append-only. #290 ADAPT-1 next.**
conductor added 1 commit 2026-09-09 20:46:08 +01:00
feat(ADAPT-9): artifact authority + retry authority (closes #298)
CI Pipeline / best-practices (push) Successful in 5s
CI Pipeline / documentation (push) Successful in 3s
CI Pipeline / lint (push) Failing after 30s
Auto-label / priority-gate (pull_request) Skipped
CI Pipeline / canary (push) Successful in 35s
Auto-label / auto-label (pull_request) Successful in 3s
CI Pipeline / type-check (push) Successful in 30s
CI Pipeline / gitea-offline (push) Successful in 15s
CI Pipeline / unit-tests (push) Successful in 59s
CI Pipeline / best-practices (pull_request) Successful in 3s
CI Pipeline / documentation (pull_request) Successful in 3s
CI Pipeline / lint (pull_request) Failing after 26s
CI Pipeline / canary (pull_request) Successful in 31s
Spec gate (headless) / spec-gate (pull_request) Successful in 6s
CI Pipeline / gitea-offline (pull_request) Successful in 14s
CI Pipeline / required-checks (push) Successful in 1s
CI Pipeline / type-check (pull_request) Successful in 31s
CI Pipeline / unit-tests (pull_request) Successful in 57s
CI Pipeline / required-checks (pull_request) Successful in 1s
cbe0d61500
Two problems, bounded exactly:

1. ARTIFACT AUTHORITY — the declared structured artifact file is truth;
   stdout is observability only.
   - _resolve_worker_artifact(): reads the declared stage artifact file
     (STAGE_ARTIFACT_FILES) as the sole canonical channel
   - stdout JSON extraction demoted to LEGACY_COMPATIBILITY_ONLY behind
     allow_stdout_fallback=False (canonical default: OFF — proven by test);
     marked 'NOT CANONICAL — REMOVE AFTER legacy tests rewritten'
   - prose stdout + missing file → STAGE_FAILED, error=ARTIFACT_MISSING
     (no advancement, no accepted artifact) — the nasty case from #163
     is now structurally impossible
   - stdout prose + valid file → PASS (file wins; single authority —
     precedence test included)
   - both APPLICABILITY and ADVERSARIAL/INNOVATION/SYNTHESIS resolution
     paths rewired to the shared helper

2. RETRY AUTHORITY — attempt/event identity is append-only.
   - retry = new attempt/event ID (never marker deletion; no marker
     deletion exists anywhere in scripts/)
   - failed attempt cannot advance the tree
   - duplicate delivery of a COMPLETED event → DUPLICATE no-op
   - failed attempt history retained after successful retry
   - acceptance sequence proven: FAILED → retry → GATE_FAILED → retry →
     COMPLETED → duplicate delivery = 3 genuine attempts retained,
     1 duplicate no-op, exactly one advancement

Note: StageExecutor constructs its own tree from the persisted dir — tests
must assert on ex.tree for post-execute state.

6 tests. Full suite 1158 passed; ruff clean.
gitea-actions Bot added the infrastructure label 2026-09-09 20:46:17 +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 added 1 commit 2026-09-09 20:50:22 +01:00
chore(ci): resync dependency lock — pyright 1.1.412 → 1.1.413 (third recurrence; TUNE candidate: scheduled lock refresh or resolution pinning)
CI Pipeline / best-practices (push) Successful in 8s
CI Pipeline / gitea-offline (push) Successful in 16s
CI Pipeline / type-check (push) Successful in 33s
CI Pipeline / lint (push) Successful in 36s
CI Pipeline / unit-tests (push) Successful in 1m10s
CI Pipeline / lint (pull_request) Successful in 35s
CI Pipeline / best-practices (pull_request) Successful in 3s
CI Pipeline / documentation (pull_request) Successful in 4s
CI Pipeline / canary (pull_request) Successful in 30s
CI Pipeline / gitea-offline (pull_request) Successful in 15s
CI Pipeline / documentation (push) Successful in 3s
Spec gate (headless) / spec-gate (pull_request) Successful in 7s
CI Pipeline / unit-tests (pull_request) Successful in 53s
CI Pipeline / type-check (pull_request) Successful in 32s
CI Pipeline / required-checks (pull_request) Successful in 1s
CI Pipeline / canary (push) Successful in 30s
CI Pipeline / required-checks (push) Successful in 1s
Auto-version and Release / release (pull_request) Successful in 37s
9c78b3d294

🤖 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 5da36bf296 into master 2026-09-09 20:52:46 +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#309