fix(hooks): ask the NOW range at push, with the gate's own reader - #3305
Merged
Conversation
gHashTag
enabled auto-merge (squash)
September 5, 2026 13:44
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This was referenced Sep 5, 2026
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.
Refs #3303 — closes two of its six.
Reproduced before acting. A commit whose diff is
CHANGELOG.mdand nothing else passes the whole local barrier at exit 0, withNOW gate PASSEDnaming a neighbour's entry from the day before:now_gatereads thedocs/nowdirectory 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 requiredcheck-now-freshnesscontext 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.shis whattri gates previewshells 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 addis 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.fetchnarrowed to master alone, under which every otherorigin/<branch>answersbad revisionwhatever the truth is.The pointer was wrong too.
tri now checktold the reader thattri hooks now-gateasks 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.