Skip to content

spec(tri/pr): preflight -- the rules a PR must pass before it opens (Closes #10219) - #10220

Merged
gHashTag merged 3 commits into
masterfrom
claude/blissful-keller-3fb581
Oct 18, 2026
Merged

gHashTag merged 3 commits into
masterfrom
claude/blissful-keller-3fb581

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10219
Refs #10190

What

specs/tri/pr/preflight.t27 is the pre-PR preflight as data. It holds 11 rules (changes, base, check, tests, seal, types, dupes, ledgers, suite, census, kept), 4 verdicts (PASS, FAIL, UNREAD, NOT RUN) and every message. The exit code comes from the spec: 0 when every rule passes, 1 when any rule FAILs, 2 when evidence is unreadable. The spec reads framed command output (@@ preflight <step> <entry> <exit> <len>). A frame whose length does not hold is UNREAD, never PASS.

Only a branch's own defects fail it. dupes diffs dupe_scan.py on the branch against the same scan on a clean origin/master worktree, so master's own copies are not charged to the branch. suite and ledgers fail only on rows for a changed spec. kept counts indented test blocks too.

Included: the generated Rust (gen/rust/tri/pr/preflight.rs), the seal, and docs/now/2026-10-18-pr-preflight.md.

Measured (Railway lab)

  • test-report: 19 tests, 19 pass, 0 FAIL, 0 vacuous; 1 comptime invariant.
  • seal --verify: all hashes MATCH.
  • dupe_scan.py --like: nothing in this file is written elsewhere.

Replay

The replay ran on the lab with the parked glue: PR head, origin/master merged in, full run including the corpus ratchet.

PR preflight (exit 1 on every PR) own-defect CI failures
#8879 suite, kept, dupes FAIL on specs/queen/lotus.t27 Corpus ratchet; 12 of 26 tests deleted
#9548 suite, ledgers, seal FAIL on trios-git/src/stage.t27 Corpus ratchet (stage.t27 gen-verilog), t27b UNLISTED
#9463 dupes FAIL (build_level, flat_index, indent, is_ascii copies), ledgers, seal duplicate-bodies, t27b UNLISTED
#9485 base FAIL: add/add conflict with master on bridge.t27 not mergeable
#10056 ledgers, seal FAIL on reset_queue.t27; suite PASS t27b UNLISTED; its Corpus ratchet red is hslm.t27, inherited
#10185 seal FAIL on own_model.t27; dupes, ledgers PASS its duplicate-bodies and t27b reds are inherited

Where the preflight differs from CI, it is stricter. A missing seal fails it, and CI has no seal check. CI's cli-tri and "documented t27c subcommands" checks fall outside the spec's rules.

Not in this PR: the glue (#10190 stays open)

tri pr preflight [--quick] is 38 lines in cli/tri/src/prcheck.rs. The publisher gate is 30 lines in tools/queen/publish.py; it runs the preflight before _commit_push_and_open, and its --self-test passes. Both were built and replayed on the lab. lefthook refuses to commit them for two reasons:

  • own-language: neither file is in tools/policy/foreign-exceptions.txt on master.
  • foreign-budget: check_budget refuses any net growth of hand-written foreign lines (owner rule 2026-10-09), and no label lifts it.

Landing the glue needs an owner decision: exceptions for those files plus an offsetting deletion of hand-written foreign lines, or a t27-native way to run commands. Until then, nothing calls this spec.

This PR also has no t27b_expectations.json row for the new spec. t27b's JIT runs only on arm64 and the lab is x86_64, so the row is left for the tool to write after an arm64 run measures it.

🤖 Generated with Claude Code

gHashTag and others added 3 commits October 18, 2026 11:16
…WIP, Refs #10190)

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

specs/tri/pr/preflight.t27 owns every rule, verdict and message: changes,
base, check, tests, seal, types, dupes, ledgers, suite, census, kept. Only a
branch's own defects fail it: dupes is compared with a clean origin/master
scan, suite and ledgers fail only for a changed spec. 19 tests, 0 vacuous.
Generated Rust and seal included.

The `tri pr preflight` glue (prcheck.rs, publish.py) is parked: neither file
is in master's foreign-exceptions list and check_budget refuses any net
growth of hand-written foreign lines. It was built and replayed on the lab;
docs/now/2026-10-18-pr-preflight.md has the replay and what landing it needs.

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 04:46:53 UTC

Summary

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

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

Seal Status

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

@gHashTag
gHashTag enabled auto-merge (squash) October 18, 2026 04:47
@gHashTag
gHashTag merged commit 3e4fd43 into master Oct 18, 2026
25 of 30 checks passed
gHashTag added a commit that referenced this pull request Oct 18, 2026
…Closes #10233)

Since #10220 the parser discarded 7 tokens of
use tri::test::report::opens_with; -- the path stops at the keyword
test -- and the suite's parse-no-discard phase failed on master.
preflight now builds a private opens_with on the span_is it already
imports from tri::lab::receipt; the four call sites are unchanged.
Seal and gen/rust are regenerated by t27c on the Railway lab.

Lab, master fdb6b28 + this change: parse-complete reports nothing
discarded, test-report 19/19 with 0 vacuous (same as before), and
check_seal_coverage.py: OK, 2514 seals, 2392 hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 18, 2026
…Closes #10233) (#10234)

* spec(tri/pr): preflight -- drop the use path through the keyword test (Closes #10233)

Since #10220 the parser discarded 7 tokens of
use tri::test::report::opens_with; -- the path stops at the keyword
test -- and the suite's parse-no-discard phase failed on master.
preflight now builds a private opens_with on the span_is it already
imports from tri::lab::receipt; the four call sites are unchanged.
Seal and gen/rust are regenerated by t27c on the Railway lab.

Lab, master fdb6b28 + this change: parse-complete reports nothing
discarded, test-report 19/19 with 0 vacuous (same as before), and
check_seal_coverage.py: OK, 2514 seals, 2392 hold.

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

* ledger(t27b): list preflight and the two suite_ledger_steward specs as pass (Refs #10233)

t27b-native-ratchet is red on master and on #10185 with UNLISTED 3:
specs/ci/suite_ledger_steward.t27, specs/jobs/suite_ledger_steward.t27
and specs/tri/pr/preflight.t27 pass on the reference and t27b but the
ledger does not name them. Same shape as #10214.

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

* ledger(t27b): list spec_graph_fold as pass (Refs #10233)

#10228 added specs/t27f/spec_graph_fold.t27; t27b-native-ratchet on
#10234 reports it UNLISTED (reference and t27b pass it).

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

* ledger(t27b): list specs/t27f/hot.t27 as pass (Refs #10233)

Master drift from #10235: t27b-native-ratchet run 39100342521 reports
UNLISTED 1 for exactly this spec.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

spec(tri/pr): preflight rules, verdicts and messages (spec half of #10190)

1 participant