Skip to content

feat(tri): tri gates preview -- ask each blocking context its own question - #3015

Merged
gHashTag merged 3 commits into
masterfrom
loop/preview-parity
Sep 3, 2026
Merged

feat(tri): tri gates preview -- ask each blocking context its own question#3015
gHashTag merged 3 commits into
masterfrom
loop/preview-parity

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 3, 2026

Copy link
Copy Markdown
Owner

The measurement

Four contexts can block a merge here. Last pass gave check a local preview that reads the gate's own subject. Measured for the other three:

required context the gate's subject local reader before this PR
check the docs/now/ entry the change adds (shape) tri now check — added last pass
check-now-freshness the diff adds an entry dated in the window three readers, all correct
validate every tracked JSON parses (ratcheted) none, of any kind
check-linked-issue the pull request title and body a proxy over the last commit

validate had no local reader at all. Planted a syntax error into a tracked JSON: check_json_parses.py exits 1, and scripts/verify.sh, scripts/pre-commit and tri hooks pre-commit say nothing about JSON — verify.sh reports seal, warnings, test, gate-preview and reseal, and none of the five is this.

check-linked-issue reads a different subject, and a different vocabulary. Both CI gates run (Closes?|Fixes?|Resolves?|Refs?|Updates?)\s*#[0-9]+. tri hooks l1-check ran (Closes|Fixes|Resolves|Reference)\s+#(\d+) — wrong in both directions at once: it missed Refs, which Law L1 names and which this repository writes on nearly every commit, and it invented Reference, which neither gate accepts. It also demanded whitespace where the gates allow none.

Over the last 20 commit messages on master: the local vocabulary matched 4 references, the gates' matched 33.

That is why tri hooks pre-commit has 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:

  • checktools/check_now_entry_shape.py --check-files <added entries>
  • check-now-freshnessbash scripts/ci/now-sync-gate-diff.sh with the range it reads in CI
  • validatepython3 tools/check_json_parses.py
  • check-linked-issue → the pattern read out of issue-gate.yml, applied to this branch's PR title and body

Reading 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, never PASS.

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 empty docs/now/ set is a FAIL in this command and an OK in tri now check, and that is deliberate — the gate's own words on an empty set are "FAIL: this change adds no docs/now/ entry", and tri now check runs mid-work where there is nothing to judge.

tri hooks l1-check now runs the gates' vocabulary, character for character — including the quirk that Fixes? is Fixe plus an optional s, so Fix #1 is 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

check result
cargo test -p tri 458 passed, 0 failed
mutation: Proxy counts as a pass red
mutation: Unavailable counts as a pass red
mutation: transcribe the pattern instead of reading it red
mutation: restore the old L1 vocabulary red (2 of 8)

The first mutation run reported ok. 0 passed; 458 filtered out for every mutant — cargo test takes 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 only passed where a red run splits the total across passed and failed.

Refs #2994

🤖 Generated with Claude Code

…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>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 10:04:28 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 11
PRs with All Checks Green 1
READY 0
FAILING 11
PENDING 0

Seal Status

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

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
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>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 10:05:30 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 11
PRs with All Checks Green 1
READY 0
FAILING 11
PENDING 0

Seal Status

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

…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>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 10:07:19 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 11
PRs with All Checks Green 1
READY 0
FAILING 11
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=1b52250fc530 != 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 merged commit c5c964c into master Sep 3, 2026
36 checks passed
@gHashTag
gHashTag deleted the loop/preview-parity branch September 3, 2026 10:18
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.

1 participant