Skip to content

protocol(doc-gate): preflight checks the committed RANGE — --staged was vacuous - #91

Merged
localai-bot merged 1 commit into
mainfrom
row/BACKEND-VULKAN-DOCGATE
Aug 7, 2026
Merged

protocol(doc-gate): preflight checks the committed RANGE — --staged was vacuous#91
localai-bot merged 1 commit into
mainfrom
row/BACKEND-VULKAN-DOCGATE

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

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/ and tests/ without updating docs/STATUS.md and docs/BENCHMARKS.md in the same commit, so documentation-checkpoint failed for that push range on main:

9579f94e, ba5ea0cf, 196ea46f, e32c5ed3, 3bfa1f12, 34a3efe6, 2c86f79e, f4738bb8

Each deferred its doc update into a following record(...) commit.

Why it passed locally — the part actually worth fixing

check-doc-checkpoint.py --staged inspects the staged paths. It is therefore vacuous when nothing is staged — which is the normal state after git commit, and 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 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.sh now runs --base origin/main --head HEAD whenever the branch is ahead of main, reproducing CI's verdict locally in seconds.

That check sits outside the --staged block, deliberately. My first attempt nested it inside, which reproduces the identical hole one level up: --staged is 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:

workflow.md carries the same instruction with the reason, so the next series doesn't rediscover it.

What is not being done

History is not being rewritten. 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 is worth.

The substance was never wrong. STATUS, BENCHMARKS and FEATURES on main all 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-record was already failing on main at 4cfeee13, before the #80 merge — check-fusion-consistency on minimax_h3_video_vae_device. Verified on origin/main itself. Not from this work, and not addressed here.

🤖 Generated with Claude Code

…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]
@localai-bot
localai-bot merged commit f65237e into main Aug 7, 2026
10 of 11 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.

2 participants