Skip to content

D238 — a record known unsound is voided, and nothing is kept from it - #434

Merged
napkinstack-agent[bot] merged 1 commit into
mainfrom
d238-void-record
Nov 18, 2026
Merged

napkinstack-agent[bot] merged 1 commit into
mainfrom
d238-void-record

Conversation

@napkinstack-agent

Copy link
Copy Markdown
Contributor

Closes #429.

Why

On #429's project, two attests shared one build folder for half an hour, so every record made in that window was unsound. A later nstack attest on the same commit, base and engine kept the module checks of one of those records (D223). The e2e never ran again, and a verifier caught it only by comparing the evidence's date and hash. Nothing could mark a record bad; avoiding the reuse depended on an operator remembering --again.

What

flowchart LR
  V["nstack attest --void C --reason why"] --> L["a line in C's note:<br/>who, when, why, voids = every run's time"]
  L --> R1["latest(C): never a voided run;<br/>the void when all are"]
  L --> R2["D223: never keeps from a voided run,<br/>on C or through another commit's record"]
  L --> R3["pr-check A2: a voided head, or one keeping<br/>a voided run, is refused until attested again"]
  L --> R4["T4's relief: never from a voided run"]
Loading

Legend: what one void line changes for each reader of the notes.

  • The void names its runs (voids, their times) instead of relying on order. A run with a clock ahead, or one brought in later by a merge of notes, is never brought back.
  • The void is published like a record. It passes the same identity rule (nstack attest records and pushes whatever git identity the checkout has #235): the record's guard, now shared as _publishable. Its reason is unplaced, like the record's paths.
  • The void checks its own effect. It fails when the remote's notes cannot be read, checks after writing that it is now the record, and fails when it is not pushed. The forge's status turns to voided when a token may write it.
  • A re-attest after a void keeps nothing from it, and keeps its evidence.
  • CLI: --void takes --reason, and neither goes with --again, --body-file or --labels.
  • Docs: 07-governance.md §7, INSTALL.md and the CLI help. Register row D238.
  • Not taken: a date before which nothing is kept. It would be a second, global setting that voids sound records too.

Tests

  • Red on main:
    • a voided record kept on its commit;
    • a check kept from it through another commit.
  • The verifier's scenarios, each now a test:
    • a head that kept a check from the voided run is refused by A2, and the next attest runs it;
    • re-attesting the voided commit gives a sound run to keep from, never the old one;
    • a run with a clock ahead stays voided;
    • a run another clone kept on the same commit before seeing the void is not kept again;
    • a void never publishes an identity the project does not show;
    • the CLI combinations are refused.
  • pr-check reads a voided head as voided until it is attested again.
  • Oracle: platform tests OK. Fitness compliant. test_attest.py and test_pull_request.py: 187 passed.
  • Independent verifier, two passes.
    • The first pass found two blockers, both reproduced: a head that had kept a check from the voided run still passed A2, and re-attesting the voided commit brought its old run back through another record. It also found medium issues: identity, clock skew, lost evidence, an unpushed void that said success.
    • The model was redesigned: explicit voids list, with latest and every reuse reading it.
    • The second pass confirmed both blockers fixed. It found one concurrency case (_kept on the same commit), now fixed with its own test.

🤖 Generated with Claude Code

Closes #429.

Agent-Session: nstack-os-d238

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot requested a review from a team as a code owner November 18, 2026 10:53
@napkinstack-agent
napkinstack-agent Bot merged commit 10fc323 into main Nov 18, 2026
3 checks passed
@napkinstack-agent
napkinstack-agent Bot deleted the d238-void-record branch November 18, 2026 11:02
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.

A record known to be unsound is kept by the next attest (D223), and nothing can void it

1 participant