Skip to content

fix(hooks): ask the NOW range at push, with the gate's own reader - #3305

Merged
gHashTag merged 1 commit into
masterfrom
now-gate-asks-the-diff
Sep 5, 2026
Merged

fix(hooks): ask the NOW range at push, with the gate's own reader#3305
gHashTag merged 1 commit into
masterfrom
now-gate-asks-the-diff

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Refs #3303 — closes two of its six.

Reproduced before acting. A commit whose diff is CHANGELOG.md and nothing else passes the whole local barrier at exit 0, with NOW gate PASSED naming a neighbour's entry from the day before:

$ git diff --cached --diff-filter=A --name-only | grep -c '^docs/now/'
0
$ tri hooks pre-commit ; echo $?
NOW gate PASSED: 2026-09-04-the-notice-fires-on-my-own-publish.md (2026-09-04)
tri hooks pre-commit: PASSED
0

now_gate reads the docs/now directory listing. The commit is not one of its inputs, and 165 in-window entries sit on master, so the directory is fresh whatever the change does. The required check-now-freshness context then refuses the range — a full CI round spent on a question that could have been asked locally.

The correct reader already existed and was reachable from nothing. scripts/ci/now-sync-gate-diff.sh is what tri gates preview shells out to; grep -rn 'gates preview' .githooks/ scripts/ .github/workflows/ returns 0. This calls that script rather than re-implementing the question — a sixth vocabulary is how the previous five drifted.

Push and not commit, deliberately. The gate asks about a RANGE, and a branch may legitimately add its entry in a later commit than the code (tri now add is naturally run after the work). Refusing at commit time would block that; at push the range is the same object CI reads.

A base that will not resolve is could-not-run, never a pass. This worktree has been seen carrying remote.origin.fetch narrowed to master alone, under which every other origin/<branch> answers bad revision whatever the truth is.

The pointer was wrong too. tri now check told the reader that tri hooks now-gate asks whether an entry is REQUIRED. It does not, and cannot. Fixed to name the command that does.

Controls, both sides, plus live. A range with no entry exits 1 naming the reason; the same range with one added exits 0. And this PR's own push went through the new hook, which passed naming this PR's entry.

@gHashTag
gHashTag enabled auto-merge (squash) September 5, 2026 13:44
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 13:45:02 UTC

Summary

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=ffccfa1a71cf != 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 5, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@gHashTag
gHashTag merged commit 48f2d2e into master Sep 5, 2026
30 checks passed
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