Skip to content

Cite the cat-mode rule by quote, not line number, and test the quote exists - #1384

Closed
EdbertChan wants to merge 1 commit into
stack/EdbertChan/reflect/prove-it-hooks-20261009/flag-absence-capability-claims-unverified-shaped--6f50c350from
stack/EdbertChan/reflect/prove-it-hooks-20261009/cite-cat-mode-rule-quote-line-num-test-quote--3661d7e5
Closed

EdbertChan wants to merge 1 commit into
stack/EdbertChan/reflect/prove-it-hooks-20261009/flag-absence-capability-claims-unverified-shaped--6f50c350from
stack/EdbertChan/reflect/prove-it-hooks-20261009/cite-cat-mode-rule-quote-line-num-test-quote--3661d7e5

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

A checker quotes a house rule when it blocks a reply: a hedge is a reason to verify, never a place to stop.

The problem: the notices cited that rule by line number, and the number was wrong. Line numbers also go stale at once.

The fix: the notices now quote the rule itself. Two new checks confirm the quote exists in the rule file and that no checker cites a line number.

Review Claim

Checker notices cite the house rule by its words, and the words are checked against the real rule file.

Review Lane

behavior

Review Unit

engine-runtime

Safety Invariant

Each change only affects when a checker warns about or blocks a reply. Checkers never edit files or run commands, and each change adds tests that fail before and pass after.

Slice Rationale

This slice comes last: it only fixes how the rule is cited. It touches the same checker as the earlier slices but changes no trigger or release logic, so it stands alone.

Non-goals

  • Does not change when the checker warns or blocks.
  • Does not edit the rule file itself.
  • Does not touch the other checkers.

Measured

Command: source scripts/test/hermetic_env.sh; python3 engine/hooks/unverified-tag-ledger/tests/test_hooks.py with this commit's tests and the parent's checker code (base) versus this commit's checker code (head).

  • base: unverified-tag-ledger: Ran 61 tests, FAILED (failures=1)
  • head: unverified-tag-ledger: Ran 61 tests, OK

Test Plan

Test Plan
  • source scripts/test/hermetic_env.sh; python3 engine/hooks/unverified-tag-ledger/tests/test_hooks.py -> Ran 61 tests, OK
  • python3 scripts/ci/check_hook_test_coverage.py engine/hooks/unverified-tag-ledger -> check_hook_test_coverage: OK (1 hook(s) checked)
  • New cases: the quoted phrase exists in the rule file (stays silent), and a cited line number would be reported (fires).

Revert Plan

Revert Plan
  • Safe to revert? Yes
  • Revert command: git revert <merge commit of this PR>
  • Post-revert steps: None
  • Data migration? No

🤖 Generated with Claude Code


Note

Low Risk
Copy and test-only changes to rule citations; block/reminder logic and triggers are untouched.

Overview
unverified-tag-ledger block/reminder copy no longer cites cat-mode/SKILL.md:269. User-facing strings and module docs now point at cat-mode/SKILL.md and embed the rule text ("a hedge is a trigger to verify, never a place to stop") so citations stay correct when the skill file moves.

Tests were updated to assert on that phrase instead of a line number. Two guards were added: the phrase must appear in corpus/skills/cat-mode/SKILL.md, and hook .py/.md sources must not contain SKILL.md:<digits> again.

No change to when the hook blocks, logs tags, or injects reminders—only how the house rule is quoted.

Reviewed by Cursor Bugbot for commit 9ab4785. Bugbot is set up for automated code reviews on this repo. Configure here.

@EdbertChan
EdbertChan added this pull request to stack #1385 October 13, 2026 04:39
@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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: 57ccd366-65d9-4206-a494-f2341ea0b31c)

@mergify

mergify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

…exists

The hooks cited cat-mode/SKILL.md:269, but the phrase is at line 166 of the
repo's corpus/skills/cat-mode/SKILL.md. Tests now check the quoted phrase in
that file and that no hook source cites a line number.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Change-Id: I3661d7e5e3b3714ef1532b9b4022f232652f1713
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/reflect/prove-it-hooks-20261009/cite-cat-mode-rule-quote-line-num-test-quote--3661d7e5 branch from 41d92c9 to 9ab4785 Compare October 13, 2026 10:30
@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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: 3b84fe94-7378-4b81-a5e4-9be129ae90d3)

@EdbertChan

Copy link
Copy Markdown
Owner Author

Landed on main as #1402 (same commit, rebased onto main). Closing this one; GitHub's stack refused to merge or retarget it.

@EdbertChan EdbertChan closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant