pr-schema-gate: an exit-0 validator that printed UNCHECKED is not a clean run - #469
Merged
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a8f9e190-f368-4b38-a49b-254f93bf27ad) |
…lean run A PR description was written to GitHub after the validator printed "UNCHECKED: PR body rules not checked (drafter-core not installed)" and exited 0. check_body_file returned "clean" on exit 0 without reading the output lines it had already collected. Also adds the always-loaded rule this enforces: a command can succeed and still answer from a degraded source. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtqAxtTmdoRE7CD5BXdGbp Change-Id: I02517d067693d20cac52b5f67ddde1e7bbe6b563
EdbertChan
force-pushed
the
stack/EdbertChan/fix/unchecked-is-not-clean/pr-schema-gate-exit-0-validator-printed-unchecked--02517d06
branch
from
September 12, 2026 06:35
3561b7d to
c4e55c0
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5989d203-b0d8-4155-981a-01119d777863) |
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Summary
The PR-text gate now speaks up when a validator exits 0 without actually checking anything.
Tonight a PR description went to GitHub after the validator printed
UNCHECKED: PR body rules not checked (drafter-core not installed)and exited 0. The gate saw exit 0 and said nothing, so an unchecked body read as a checked one.The gate already had an
uncheckedoutcome for this exact situation; the exit-0 branch just never looked at the output it had already collected. It does now, and a matching rule says the same thing for any tool that can answer from a degraded source.Review Claim
An exit-0 validator run that prints an unchecked or skipped marker is reported as unchecked, not clean.
Review Lane
behavior
Review Unit
engine-runtime
Safety Invariant
The hook stays advisory: this path routes into the existing
uncheckedmessage and blocks nothing. A genuine exit-0 pass with no marker still reports clean, pinned by the negative test.Slice Rationale
One claim, one hook, plus the always-loaded rule it enforces. The prose and the code ship together so the rule is not documented without a check behind it.
Non-goals
Test Plan
Test Plan
python3 -m unittest test_advisory -k exit_zero_with_an_uncheckedagainstorigin/main's detect.py —AssertionError: 'could not check' not found in '',FAILED (failures=1), exit 1python3 -m unittest discover -s engine/hooks/pr-schema-gate/tests -vwith the fix —Ran 99 tests … OK, exit 0python3 engine/skills/make-pr/scripts/preflight.py --base origin/main—unit engine-runtime: 3 file(s),ok preflight passed, exit 0Revert Plan
Revert Plan
git revert <sha>🤖 Generated with Claude Code
https://claude.ai/code/session_01DtqAxtTmdoRE7CD5BXdGbp
Note
Low Risk
Advisory-only hook behavior fix with unit tests; no blocking paths or validator selection changes.
Overview
pr-schema-gate no longer treats a validator that exits 0 as a clean pass when its stdout/stderr says the PR body was never checked (e.g.
UNCHECKED: … not installed). Those runs now use the existing unchecked advisory path with a message that the validator exited 0 without checking.The hook scans collected validator output with
VACUOUS_PASS_RE(UNCHECKED,SKIPPED,not installed,no rules loaded) before returning clean. A genuine pass with no such markers stays silent; tests cover the false pass and the negative case.engine/CLAUDE.core.mdadds a matching evidence rule: exit 0 and printed data are not enough when a tool can answer from a cache, replica, or offline mode—show stderr/exit code or name the source, and re-read after restarts.Reviewed by Cursor Bugbot for commit c4e55c0. Bugbot is set up for automated code reviews on this repo. Configure here.