feat(tri): tri gates preview -- ask each blocking context its own question - #3015
Merged
Conversation
…stion Four contexts can block a merge here. One of them, `check`, gained a local preview last pass. Measured for the other three: * `validate` had NO local reader of any kind. A broken tracked JSON turns it red while verify.sh, scripts/pre-commit and tri hooks pre-commit say nothing about JSON. * `check-linked-issue` reads the PULL REQUEST title and body. The only local stand-in, tri hooks l1-check, reads the last COMMIT -- a different subject. On #3013 the PR body carried the reference and the squashed commit did not. * And the vocabularies disagreed. Both CI gates run (Closes?|Fixes?|Resolves?|Refs?|Updates?)\s*#[0-9]+; the local check ran (Closes|Fixes|Resolves|Reference)\s+#(\d+) -- missing Refs, which Law L1 names and this repository writes, and inventing Reference, which neither gate accepts. Over the last 20 commits on master: 4 matches against 33. The command delegates every row and reads the issue pattern OUT of issue-gate.yml rather than transcribing it, so a fifth vocabulary cannot appear. PROXY and UNAVAILABLE are printed and are never counted as passes. Refs #2994 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
date -u -d yesterday is GNU-only; on BSD it prints 'illegal option -- d' and under set -e the gate exits 1. A contributor on a Mac could not ask this gate its question, and the failure was indistinguishable from a refusal -- which is how tri gates preview first reported a false FAIL for this context. scripts/pre-commit and scripts/verify.sh already carry the two-form lookup; this is the same one. CI is Linux, so the first form still decides there. Refs #2994 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-09-03 10:05:30 UTC
Summary
Seal Status
|
…tion run over an empty set 439: validate had NO local reader; check-linked-issue reads the PR body while the local stand-in reads the last commit; and the vocabularies disagreed 4 against 33 over the last 20 master commits. Plus: the freshness gate itself could not run on macOS, and that failure is indistinguishable from a refusal. 440: cargo test takes a substring, so 'preview_tests|l1_' matched nothing and four mutation kills were scored over an empty sample, every line reading ok. The guard must sum passed AND failed. Refs #2994 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-09-03 10:07:19 UTC
Summary
Seal Status
|
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.
The measurement
Four contexts can block a merge here. Last pass gave
checka local preview that reads the gate's own subject. Measured for the other three:checkdocs/now/entry the change adds (shape)tri now check— added last passcheck-now-freshnessvalidatecheck-linked-issuevalidatehad no local reader at all. Planted a syntax error into a tracked JSON:check_json_parses.pyexits 1, andscripts/verify.sh,scripts/pre-commitandtri hooks pre-commitsay nothing about JSON —verify.shreports seal, warnings, test, gate-preview and reseal, and none of the five is this.check-linked-issuereads a different subject, and a different vocabulary. Both CI gates run(Closes?|Fixes?|Resolves?|Refs?|Updates?)\s*#[0-9]+.tri hooks l1-checkran(Closes|Fixes|Resolves|Reference)\s+#(\d+)— wrong in both directions at once: it missedRefs, which Law L1 names and which this repository writes on nearly every commit, and it inventedReference, which neither gate accepts. It also demanded whitespace where the gates allow none.That is why
tri hooks pre-commithas been exiting 1 on ordinary commits, which I misattributed twice to probe commits before measuring it.And on this PR's own predecessor, #3013: the PR body carries the reference (gate passes) while the squashed commit message has none by the old rule. Two subjects, one label.
What was built
tri gates preview [--base <rev>]asks each required context its own question, by its own implementation:check→tools/check_now_entry_shape.py --check-files <added entries>check-now-freshness→bash scripts/ci/now-sync-gate-diff.shwith the range it reads in CIvalidate→python3 tools/check_json_parses.pycheck-linked-issue→ the pattern read out ofissue-gate.yml, applied to this branch's PR title and bodyReading the pattern from the workflow rather than transcribing it is the point: there were already two vocabularies, and a third would have been mine. If the pattern cannot be found the row is
UNAVAILABLE, neverPASS.Three readings are printed and none of them is a pass:
FAIL,PROXY(no pull request here, so the commits were read — a different subject, said out loud),UNAVAILABLE. An emptydocs/now/set is aFAILin this command and anOKintri now check, and that is deliberate — the gate's own words on an empty set are "FAIL: this change adds no docs/now/ entry", andtri now checkruns mid-work where there is nothing to judge.tri hooks l1-checknow runs the gates' vocabulary, character for character — including the quirk thatFixes?isFixeplus an optionals, soFix #1is rejected while the gate's own comment beside that regex promises "Fix(es)". Mirrored rather than silently widened: a blocking rule's vocabulary is the owner's to change.Controls
cargo test -p triProxycounts as a passUnavailablecounts as a passThe first mutation run reported
ok. 0 passed; 458 filtered outfor every mutant —cargo testtakes a substring, not the alternation I passed it, so four "kills" were measured over an empty set. Re-run with the two filters separately and a guard that refuses a sample under 8. That guard then misfired once, counting onlypassedwhere a red run splits the total acrosspassedandfailed.Refs #2994
🤖 Generated with Claude Code