Skip to content

fix: honest witness --once exit; participate erasure ergonomics - #12

Merged
mellowcroc merged 1 commit into
mainfrom
fix/witness-once-and-participate-ergonomics
Aug 20, 2026
Merged

fix: honest witness --once exit; participate erasure ergonomics#12
mellowcroc merged 1 commit into
mainfrom
fix/witness-once-and-participate-ergonomics

Conversation

@mellowcroc

Copy link
Copy Markdown
Collaborator

Fixes #10 and #11 (both found driving the scripts against real ceremonies on 2026-08-20).

#10witness watch --once false positive. A single check that found the phase open exited 0, differing from a real observation only in prose — so 07-role-witness-watch.sh (which runs under set -e and prints its summary after the command) reported "saw the Relay closure notification" when no closure existed. --once now exits non-zero with no closure observed: <phase> is still open; the script's success message is thereby gated by set -e with no script change needed. Runbook documents the exit contract.

#11 — participate ergonomics (all three parts):

  1. DESTROYED prompt → stdout, so the tee'd participate log contains it and log-watching automation can respond (previously stderr-only: invisible in the transcript, we had to inject input via /proc/<pid>/fd/0).
  2. Same-second erasure race removed without weakening the rule: destroyed_at is read against the candidate's attestation.json contributed_at and pushed to the next whole second when they'd collide (tiny-circuit contributions complete in <1 s, previously guaranteeing destroyed_at must be strictly after contributed_at unless the operator deliberately paused). proof-tool's strict-ordering validation is untouched; parse failures fall back to the old behavior. Unit-tested (normal case, same-second case, missing/corrupt metadata fallbacks).
  3. Failed attempts archive instead of stranding: 04-role-participate.sh moves a failed attempt's outputs to RUN_ROOT/failed/<phase>-<participant>-<timestamp>/ on exit, so require_fresh_path passes on retry; nothing is deleted, the local candidate is preserved, and the operator is told exactly where it went.

witness watch --once (issue #10): a single check that found the phase still
open exited 0 with only a textual difference from a real observation, so
scripts gated on the exit status reported 'saw the closure notification'
when no closure existed. A witness's next step is signing a receipt about
what they observed; observing nothing must be distinguishable. --once now
exits non-zero with 'no closure observed' when the phase is open, and the
role runbook documents the exit contract.

participate (issue #11):
- The DESTROYED prompt moved from stderr to stdout so a logged or tee'd
  transcript of the run contains it and automation watching the transcript
  can respond to it.
- destroyed_at is now stamped strictly after the candidate's contributed_at
  at whole-second resolution, waiting out the shared second when the
  contribution completed and was confirmed within it (the tiny circuit
  contributes in under a second, which previously guaranteed
  'destroyed_at must be strictly after contributed_at' unless the operator
  deliberately paused). The strict ordering rule itself is unchanged; the
  timestamp is read from the candidate's attestation.json and any parse
  failure falls back to the previous behavior.
- 04-role-participate.sh archives a failed attempt's outputs to
  RUN_ROOT/failed/<phase>-<participant>-<timestamp>/ so the fresh-path
  checks pass on retry without hand-deleting undocumented paths; nothing is
  deleted and the local candidate is preserved.

Closes #10. Closes #11.
@mellowcroc
mellowcroc force-pushed the fix/witness-once-and-participate-ergonomics branch from 3542607 to 542ebae Compare August 20, 2026 17:14
@mellowcroc
mellowcroc merged commit d4c43ca into main Aug 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

witness watch --once reports success when no closure exists

1 participant