Repository navigation
spec(tri/pr): preflight -- the rules a PR must pass before it opens (Closes #10219) - #10220
Merged
Merged
Conversation
…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>
Contributor
gHashTag
enabled auto-merge (squash)
October 18, 2026 04:47
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10219
Refs #10190
What
specs/tri/pr/preflight.t27is 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.
dupesdiffsdupe_scan.pyon the branch against the same scan on a clean origin/master worktree, so master's own copies are not charged to the branch.suiteandledgersfail only on rows for a changed spec.keptcounts indentedtestblocks too.Included: the generated Rust (
gen/rust/tri/pr/preflight.rs), the seal, anddocs/now/2026-10-18-pr-preflight.md.Measured (Railway lab)
--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.
specs/queen/lotus.t27trios-git/src/stage.t27bridge.t27reset_queue.t27; suite PASShslm.t27, inheritedown_model.t27; dupes, ledgers PASSWhere the preflight differs from CI, it is stricter. A missing seal fails it, and CI has no seal check. CI's
cli-triand "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 incli/tri/src/prcheck.rs. The publisher gate is 30 lines intools/queen/publish.py; it runs the preflight before_commit_push_and_open, and its--self-testpasses. Both were built and replayed on the lab. lefthook refuses to commit them for two reasons:tools/policy/foreign-exceptions.txton master.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.jsonrow 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