Skip to content

Two of five ledgers announced a stale entry and exited zero - #2923

Merged
gHashTag merged 2 commits into
masterfrom
stale-ledger-entries-fail
Aug 29, 2026
Merged

Two of five ledgers announced a stale entry and exited zero#2923
gHashTag merged 2 commits into
masterfrom
stale-ledger-entries-fail

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Yesterday a stale ledger entry — a line still excusing a spec that had been
fixed — was found because the corpus ratchet went red and named it. That is
luck, and luck does not generalise.

Asked deliberately this time: plant a line naming a spec that passes, so the
line is false by construction, and run each gate.

ledger stale entry planted
tools/seal_baseline.txt FAILS
tools/conflict_markers_baseline.txt FAILS
docs/reports/suite_expectations.json FAILSUNEXPECTED PASS
tools/specs_generate_baseline.txt NOTE, exit 0
tools/verilog_width_baseline.txt note, exit 0

Two of five announced the defect and returned success. A line outliving its debt
could live there forever — gate green, note scrolling past. Both now fail, with
the repair named in the message.

tri ledgers audit

A gate whose subject is other gates: it plants the false line itself and demands
each one fail.

  planting a line about   specs/account/auth.t27
  it passes, so every planted line is FALSE by construction

      caught    tools/specs_generate_baseline.txt
      caught    tools/seal_baseline.txt
      caught    tools/conflict_markers_baseline.txt
      caught    tools/verilog_width_baseline.txt

  ledgers audited   4
  stale entry caught 4
  stale entry MISSED 0

Run against the pre-fix gates it reports MISSED 2 and exits 1. Both
directions were run.

Two properties worth copying:

  • It refuses to start on a dirty ledger — it rewrites and restores what it
    touches, and a restore would discard uncommitted work.
  • The planted line names a spec the compiler accepts today, looked up at run
    time. A hardcoded name would rot into a line that is true, and the audit
    would quietly stop testing anything.

Controls

control expected got
planted entry, check_specs_generate.py exit 1 FAIL: 1 spec(s) … now generate
planted entry, check_verilog_widths.py exit 1 FAIL: 1 ledgered spec(s) …
no planted entry, both exit 0 exit 0
both gates' --self-check still pass pass
tri ledgers audit on pre-fix gates MISSED 2, exit 1 reproduced
tri ledgers audit after caught 4, exit 0 reproduced

3 unit tests in ledgers.rs (every template names a spec; no two ledgers share
a gate; substitution keeps the path).

A correction

Memory said four ledgers name specs by path. The sweep found five, plus
one keyed by line hash. A count written while chasing something else is a
sample, not a census.

Gates, run locally

specs generate 0 (and --self-check 0) · verilog widths 0 (and --self-check
0) · specs parse 0 · conflict markers 0 · seal coverage 0 · seals fresh 0 ·
types ratchet 0 · skill check 0 · ledgers audit 0 · cargo test -p tri 0 ·
rustfmt --check cli/tri/src/ledgers.rs 0.

bootstrap/src/compiler.rs is untouched, so FROZEN_HASH does not move.

Refs #2864

Yesterday a stale ledger entry -- a line still excusing a spec that had been
fixed -- was found because the corpus ratchet went red and named it. That is
luck. Asked deliberately this time: plant a line naming a spec that PASSES, so
the line is false by construction, and run each gate.

  seal_baseline.txt              FAILS
  conflict_markers_baseline.txt  FAILS
  suite_expectations.json        FAILS   -- "UNEXPECTED PASS"
  specs_generate_baseline.txt    NOTE, exit 0
  verilog_width_baseline.txt     note, exit 0

Two of five announced the defect and returned success, so a line outliving its
debt could live there forever: the gate green, the note scrolling past. Both
now fail, with the repair named in the message.

Controls both ways for each: with the planted entry, exit 1; without it, exit
0; and both gates' own `--self-check` still passes.

  tri ledgers audit

plants the false line itself and demands each gate fail -- a gate whose subject
is other gates. Checked the same way: run against the PRE-FIX gates it reports
`stale entry MISSED 2` and exits 1; against the fixed ones, `caught 4`, exit 0.
Both were run.

Two properties worth copying. It refuses to start on a dirty ledger, because it
rewrites and restores what it touches. And the planted line names a spec the
compiler accepts TODAY, looked up at run time -- a hardcoded name would rot into
a line that is true, and the audit would quietly stop testing anything.

The sweep also corrected the note that started it: memory said four ledgers name
specs by path, and there are five, plus one keyed by line hash. A count written
while chasing something else is a sample, not a census.

Refs #2864

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 29, 2026 23:40
…s-fail

# Conflicts:
#	.claude/skills/ci-gates/SKILL.md
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 23:43:25 UTC

Summary

Status Count
Total Open PRs 9
PRs with Failing Checks 7
PRs with All Checks Green 2
READY 0
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=82e020cf95b2 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit e42458b into master Aug 29, 2026
28 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.

2 participants