hook(diu-stop): scope the unverified marker to its own paragraph - #383
Conversation
One `UNVERIFIED:` anywhere in a reply silenced every other check in that
reply, so a hedge in the opening line let an unhedged causal claim three
paragraphs later through untouched. The marker now excuses the paragraph it
sits in, exactly like a backtick or a fence.
The prove-it nudge also stops firing on a marker that names its blocker
("cannot verify: no network"), which is the documented use, and keeps firing
on one that names nothing. The block text now says the prefix is for a check
that cannot run and has to name why.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ
Change-Id: I11fd3df007c88b3751292e581fd337b98b9ebaf1
4 tasks
Owner
Author
|
This pull request is part of a Mergify stack:
|
2 tasks
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_ca545818-1826-42e5-a704-aa096ac78095) |
Owner
Author
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
One
UNVERIFIED:anywhere in a reply silenced every other check in that reply.A hedge in the opening line therefore let an unhedged causal claim three paragraphs later through untouched. That is how one marker turned into a mute for a whole message, and it happened in the session that motivated this.
The marker now excuses the paragraph it sits in, exactly like a fence, keeping main's newer rule that inline code only counts when it looks like command output.
The prove-it nudge also stops firing on a marker that names its blocker, which is the documented use, and keeps firing on one that names nothing. The block text now says so.
Before and After
The same three-paragraph reply (a marker that names its blocker in the first paragraph, then an unhedged "because" claim in the third) was piped as
{"last_assistant_message": ...}intopython3 engine/hooks/diu-stop/claude_stop_check.pyon the base commit a420fc8 and on this PR's commit 2438709. Before, the hook only nudged about the marker and missed the claim; after, it catches the claim and drops the nudge.Review Claim
The marker excuses its own paragraph rather than the whole message, and a marker with no named blocker still draws the prove-it nudge.
Review Lane
behavior
Review Unit
tooling-policy
Safety Invariant
The paragraph loop, the output-shape test for inline code, and every existing pattern are untouched; the change removes one early return and adds the marker to the same per-paragraph skip that fences already use. All 77 tests in the hook's suite pass, including the ones that pin the older behavior for a single-paragraph reply.
Slice Rationale
One hook, one behavior, on top of the cap fix it needs to be green.
Non-goals
Does not judge whether the evidence beside a claim is real, does not change the word-count gate, and does not touch the sibling hedge hook that reads the same marker.
Test Plan
Test Plan
python3 -m unittest discover -s engine/hooks/diu-stop/tests— 77 tests, OKFAILED (failures=2)) and pass afterpython3 scripts/check_no_new_comments.py --base origin/main— okRevert Plan
Revert Plan
git revert <sha>🤖 Generated with Claude Code
https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ