protocol(doc-gate): preflight checks the committed RANGE — --staged was vacuous - #91
Merged
Merged
Conversation
…was vacuous Self-reported violation and its prevention. PR #80 (Vulkan, merged 5397e91) landed EIGHT commits that touched src/ and tests/ without updating docs/STATUS.md and docs/BENCHMARKS.md in the same commit, reddening documentation-checkpoint for that push range: 9579f94, ba5ea0c, 196ea46, e32c5ed, 3bfa1f1, 34a3efe, 2c86f79, f4738bb. Each deferred its doc update into a following record(...) commit. WHY IT PASSED LOCALLY, which is the part worth fixing. check-doc-checkpoint.py --staged inspects the STAGED paths, so it is VACUOUS when nothing is staged -- and nothing is staged after `git commit`, which is exactly when agent-preflight.sh runs it. The gate reported OK on every one of those commits while checking literally nothing. CI is diff-scoped over the pushed range and checks each commit independently, so the failure only surfaced on main, where a diff-scoped range can never be re-covered by a later run. Preflight now runs --base origin/main --head HEAD whenever the branch is ahead. That check is deliberately OUTSIDE the --staged block: my first attempt nested it inside, which reproduces the identical hole one level up, since --staged is precisely the flag you are not passing when the range is unchecked. Verified two ways -- it prints "ok doc-checkpoint range" here, and pointed at the #80 range it raises 20 errors naming every offending commit. workflow.md carries the same instruction with the reason. NOT REPAIRED BY REWRITING HISTORY: main had already moved (#86 landed on top) and other sessions branch from it, so force-pushing to regroup eight commits' files would cost more than the defect. Substance was never wrong -- STATUS, BENCHMARKS and FEATURES on main all describe the shipped state with the llvmpipe-only and no-speed-number caveats intact. What was violated is the per-COMMIT granularity that keeps a bisect landing on a commit whose docs match its code. Rule restated where it is enforced: a feature commit carries its OWN STATUS/BENCHMARKS update; when the numbers are not yet known the honest line is pending/void with the reason, which is what the gate's own message asks for. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Claude Code:claude-opus-5 [Claude Code]
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.
Self-reported protocol violation from PR #80, and the gate change that prevents it recurring.
What went wrong
PR #80 (Vulkan) landed eight commits that touched
src/andtests/without updatingdocs/STATUS.mdanddocs/BENCHMARKS.mdin the same commit, sodocumentation-checkpointfailed for that push range onmain:9579f94e,ba5ea0cf,196ea46f,e32c5ed3,3bfa1f12,34a3efe6,2c86f79e,f4738bb8Each deferred its doc update into a following
record(...)commit.Why it passed locally — the part actually worth fixing
check-doc-checkpoint.py --stagedinspects the staged paths. It is therefore vacuous when nothing is staged — which is the normal state aftergit commit, and exactly whenagent-preflight.shruns it. The gate reported OK on every one of those commits while checking literally nothing.CI is diff-scoped over the pushed range and checks each commit independently, so the failure only appeared on
main— where, by that job's own design, a diff-scoped range is never re-covered by a later run.The fix
agent-preflight.shnow runs--base origin/main --head HEADwhenever the branch is ahead of main, reproducing CI's verdict locally in seconds.That check sits outside the
--stagedblock, deliberately. My first attempt nested it inside, which reproduces the identical hole one level up:--stagedis precisely the flag you are not passing when the range goes unchecked. Caught by the gate catching my own commit, which is the best evidence it works.Verified two ways:
ok doc-checkpoint rangeon this branch;075b9f21..0be5d457) it raises 20 errors naming every offending commit.workflow.mdcarries the same instruction with the reason, so the next series doesn't rediscover it.What is not being done
History is not being rewritten.
mainhad already moved (#86 landed on top) and other sessions branch from it, so force-pushing to regroup eight commits' files would cost more than the defect is worth.The substance was never wrong. STATUS, BENCHMARKS and FEATURES on
mainall describe the shipped Vulkan state accurately, with the llvmpipe-only and no-speed-number caveats intact. What was violated is the per-commit granularity that keeps a bisect landing on a commit whose docs match its code, and stops a half-landed series from leaving the public surface describing something that doesn't exist.Recorded in the state log rather than quietly left, since that range stays permanently gate-failed.
Unrelated pre-existing red
agent-recordwas already failing onmainat4cfeee13, before the #80 merge —check-fusion-consistencyonminimax_h3_video_vae_device. Verified onorigin/mainitself. Not from this work, and not addressed here.🤖 Generated with Claude Code