feat(runner+cli): run-attempt receipts + madp report (issue #5 proposals 6+7) - #10
Merged
Merged
Conversation
There was a problem hiding this comment.
Confidence Score: 4/5
Summary
Adds gitignored run-attempt receipts and a read-only madp report evidence index; ledger authority preserved and all new tests pass. Low risk, but one claim-leak edge case in launch needs fixing.
Important Files Changed
| File | Overview |
|---|---|
| src/multi_agent_dialogue/runner.py | Writes in-flight receipt before launch; finalizes outcome and claim-cleanup state |
| src/multi_agent_dialogue/engine.py | build_report derives per-turn evidence index with digest recomputation |
| src/multi_agent_dialogue/cli.py | New report subcommand, exit 1 on mismatch |
| examples/fakes/bin/fake-worker | FAKE_SLEEP_SECONDS knob for kill-canary fixture |
| docs/technical-reference.md | Documents report command and receipt semantics |
| tests/test_cli.py | Report CLI tests and SIGKILL mid-turn canary |
| tests/test_real_contracts.py | Receipt lifecycle and build_report tests |
| tests/test_provenance_recovery.py | Adds report to the expected CLI surface |
askclaw-vesper
force-pushed
the
feat/run-receipts-and-report
branch
from
August 20, 2026 06:06
48388fc to
e06b8ec
Compare
…osals 6+7) Run-attempt receipt (redesigned per review): every run --launch writes a receipt under the gitignored work/run-attempts/ recovery namespace — in-flight BEFORE any process starts (argv digest only, never the plaintext argv; runner pid; start time), finalized on outcome (completed/failed, exit status, claim-cleanup state). Never committed, never read by acceptance logic. Kill canary: a launch killed mid-turn leaves an in_flight receipt, an untouched ledger (init commit only), and an unadvanced schedule. madp report (redesigned per review): derives the evidence index on demand from the accepted commits and raw files — per-turn commit SHA, recorded vs recomputed digests, provider/model/session, probed CLI version. Never committed; acceptance/validation never read it. A tampered evidence file is flagged by report AND independently by validate.
- receipt start is best-effort (never holds a claim hostage); filename token gains pid + random suffix so fast release-and-retry cannot overwrite a prior receipt; - build_report guards malformed state records (missing file keys) and non-dict cli_version instead of crashing — tampering is flagged, not fatal to the report; - tests: run_all_turns moved to the shared fixture base (no inherited re-run); the kill canary kills the process group and drains the pipes, so no sleeping fake-worker is orphaned.
askclaw-vesper
force-pushed
the
feat/run-receipts-and-report
branch
from
August 20, 2026 06:12
e06b8ec to
ad896a3
Compare
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements issue #5, proposals 6 and 7 (both redesigned per the dialogue's own constraints). Stacked on #9 — merge order: #9, then this.
Proposal 6 — run-attempt receipt (recovery-namespace only)
Every
run --launchwrites arun-attempt-receiptJSON underwork/run-attempts/(Git-ignored → never the ledger):outcome: in_flight, round/actor,argv_sha256(digest only — the plaintext argv embeds the briefing), runner pid, start timestamp.completed/failed, exit status, claim-cleanup state (claim-consumed-by-completion/claim-released/claim-retained-blocked/release-failed), detail.Canary (from the proposal): a launch killed (
SIGKILL) mid-turn via a sleeping fake worker leaves anin_flightreceipt,completed_turns: [],turn_index: 0, and exactly one commit (init) —test_killed_mid_turn.Proposal 7 —
madp report(derived, never committed)madp report DIRderives the evidence index on demand: per-turn commit SHA, recorded vs recomputed digests (artifact + evidence),completed_via, provider/model/session, probed CLI version. Read-only: never committed, never read by acceptance/validation.Canary (from the proposal): tampering one evidence file flips
report.okfalse with anevidence digest mismatchANDvalidate --require-gitfails independently (test_tampered_evidence_is_flagged_by_report_and_validate);test_report_is_read_onlyproves no commit, no worktree touch.Tests
reportexit codes; kill canary.scripts/verify.py→{"ok": true}.