Skip to content

t27b: ledger rows carry the host-free verdict key; bless rewrites only rows that moved (Closes #8186) - #8218

Draft
gHashTag wants to merge 4 commits into
masterfrom
claude/t27b-bless-by-key-2
Draft

gHashTag wants to merge 4 commits into
masterfrom
claude/t27b-bless-by-key-2

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #8186. Step 3 of verdict reuse, epic #8095 (t27b epic #6063). Builds on #8208 (merged).

The three rules (decided on #8186), in .t27 first

  • The ledger stores the host-free key. specs/tri/t27b/verdict_key.t27 adds ledger_key(spec, generated, output, runner, zig). It is the t27b: key reference verdicts by the generated code, not the t27c binary (Closes #8176) #8208 verdict key without the host part. Its own LEDGER_SCHEMA (3) means it can never equal a cache key, and a spec t27c cannot generate is keyed by a "not generated" marker, not by the t27c binary. The host stays only in the reference cache. 10 tests.
  • Bless rewrites a row only when its key, verdict or blocker moved. specs/tri/t27b/steward.t27 adds bless_writes. A row where nothing moved stays byte for byte.
  • Bless only from a source that carries keys. bless_source_ok refuses a run unless every row the reference passes carries a key, instead of guessing.
  • 9 tests and the invariant bless_never_guesses_from_a_keyless_source. The test report gives steward 137/137 and verdict_key 10/10 (Railway lab).

Glue (generated code plus thin I/O)

  • t27b keys <dir> --reference <t27c> prints the ledger key per file (21 s for 1707 specs on the lab, all distinct, stable across runs).
  • Corpus records carry "key". On the lab, the corpus keys equal the keys output on 96 of 96 records.
  • The lab publishes the key per row (lab.py).
  • tri t27b ratchet --bless keeps unmoved rows and refuses a keyless source.

Host-free, measured

The ledger key from an aarch64 t27c (cross-built, run under qemu) is compared with the key from an x86_64 t27c on the same tree: so far 400 of 400 compared rows are equal. That is the claim that lets x86_64 lab rows bless an aarch64 CI ledger. The final count follows in a comment.

Budget

Foreign lines: blockers.rs 14, main.rs 16, lab.py 13, t27b.py 13, t27b_rules.py 2, and the test 14 once #8216 lands: 72 of 80.

Order

Draft until #8216 (the test's own-language exception, #8214) merges. Then the test commit lands here and auto-merge goes on. After this merges, the lab needs a redeploy before bless works. The first keyed bless rewrites every row once, to add the key.

🤖 Generated with Claude Code

gHashTag and others added 4 commits October 9, 2026 21:00
…y rows that moved (Closes #8186)

Step 3 of verdict reuse (epic #8095). verdict_key.t27 gains ledger_key, the
verdict key without the host part. steward.t27 gains bless_source_ok (bless
refuses a source without a key on every row the reference passes) and
bless_writes (a row is rewritten only when its key, verdict or blocker moved).
t27b gets a `keys` subcommand, corpus records and lab rows carry the key, and
tri t27b ratchet --bless keeps unmoved rows byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…8214)

Step 3 of verdict reuse (#8186) makes bless refuse a keyless source; the
test that drives it must change with the rule. Budget 40/80 still applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-09 14:51:23 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 45
PRs with All Checks Green 5
READY 0
FAILING 45
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 45 + 0 + 0 = 45, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=557cd271f4e3 != 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).

This was referenced Oct 9, 2026
@gHashTag

Copy link
Copy Markdown
Owner Author

Parking this branch under the 2026-10-09 foreign-budget shrink rule (hand-written non-t27 line count may not grow; no exception and no label lifts it -- specs/policy/own_language.t27). Not closing: the work is blocked, not dead.

Why the base is unusable as-is: the two-dot diff vs master is ~1495 files of unrelated working-tree noise (inherited Pair type reds, stray specs) -- the poisoned-branch disease of 2026-10-09. The real commits are 08de493a2 (LEDGER_SCHEMA=3 host-free verdict key across specs/tri/t27b/verdict_key.t27 + gen + bless-by-key logic in scripts/tri_loop/t27b.py) and a55554b88 (foreign-exceptions entry, closes #8214).

Clean rebuild attempt (branch claude/t27b-bless-by-key-3 from fresh master 1830512a2): the spec applies cleanly (its base is byte-identical to master), only the seal conflicts -- and then the lefthook foreign-budget gate refuses the commit:

Unblock paths (either one):

  1. Pair the rebuild with a port of >= 48 hand-written foreign lines to .t27 in the same diff -- the rule's prescribed remedy. Nothing in the bless domain is big enough to port (observed/ledger_counts/honest/anomalies are already spec-driven plumbing), so the port has to come from elsewhere in cli/t27b or scripts/tri_loop.
  2. Owner decision to waive for this glue.

Preserved state: the fully-resolved cherry-pick is staged in steward worktree blesskey3-20261010T0912 (bless-by-key-rebuild-resolved.patch + the commit message next to it). Seals for both verdict_key.t27 and steward.t27 need lab regen before any push. Refs #8186.

This was referenced Oct 10, 2026

This branch has not been deployed

No deployments
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.

t27b ledger rows carry the reference verdict key; bless rewrites only rows whose key or verdict moved

1 participant