fix(gate): the CI gate calls the verb it claimed to mirror — closes #278, #260, #284 - #291
Open
thrillmot wants to merge 1 commit into
Open
fix(gate): the CI gate calls the verb it claimed to mirror — closes #278, #260, #284#291thrillmot wants to merge 1 commit into
thrillmot wants to merge 1 commit into
Conversation
…ck out the base ref
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Stacked on #287 — it consumes the
--base/--headrange mode that PR adds. Merge #287 first; this retargets todevautomatically.The template's own header said it "mirrors the local
logmind check-decisionspre-commit hook." It did not mirror it — it reimplemented it in bash, and the copy had drifted five ways:*.mdwholesale in the exclusioncase[skip-logmind]readTHRESHOLD: "20", never readcommit_line_thresholdThe gate now invokes the verb and the bash decides nothing, so all five die at once — rather than five patches inviting a sixth drift.
The base-ref checkout is load-bearing, not incidental
The workspace is
github.event.pull_request.base.sha, never the merge ref. That matters because the verb readsgit.commit_line_thresholdfrom the checkout — so a merge-ref workspace would let a pull request raise its own threshold in the diff under judgement.Proven live in a scratch repo. A PR setting
commit_line_threshold: 10000in its own diff:✓ 30 lines changed (below 10000-line threshold)— passes⚠ 30 lines changed…, exit 1That is SPEC §6.3 — a gate is never satisfiable by the change it judges. Without the base-ref checkout, the config threshold added in #287 would itself have been a new self-service escape. Found by the build agent, and it is the single most important line in this diff.
Shape
actions/checkout@v7at the base sha,fetch-depth: 0git fetch --no-tags origin +refs/pull/N/head— the range needs the head commit, which for a fork PR is on no branch herethrillmade/setup-logmind@v1.0.0— a pinned release, never built from the PR's checkout; a PR that can rebuild the binary can rewrite its own gatelogmind check-decisions --base "$BASE_SHA" --head "$HEAD_SHA", three::error::lines,exit 1permissions:drops tocontents: readalone — deleting the PR-title read removed the only consumer ofpull-requests: read.Deliberately NOT done
logmind's own
.github/workflows/check-decisions.ymlis not regenerated here.setup-logmindinstalls the latest release, and--base/--headexists only on the unmerged parent — regenerating now turns logmind's own gate red on every PR, including this one.The same ordering binds every consumer: the fleet cannot take this template until a release carries the verb. That is now a documented prerequisite on #257 alongside #288 and #289.
Tests
TestCheckDecisionsTemplate_V4_LivePRTitle→…_V5_CallsTheVerb, pinning the marker, the verb invocation, and each of the five defects as a must-not-contain — scanned against a comment-stripped body so the header can still name what it removed. Added toTestWorkflowTemplates_UseSetupLogmindActionand…SetupLogmindStepsCarryToken.Rendered through a real
logmind init, parsed with PyYAML, andactionlint(with shellcheck) exit 0. Full suite exit 0, all 21 packages.Two findings recorded, not fixed
To skip this check: git commit --no-verify— a local-hook hint that is meaningless at the gate and reads as an escape §3.4 forbids. Lives in the parent branch under a byte-identical-output contract.check-decisions.ymlis already drifted: no version marker,checkout@v7vs the old template's@v6. No lockstep pair-diff test exists for it — onlyTestRegenTimelineWorkflow_LockstepWithTemplate. Worth adding when it is regenerated.