Repository navigation
fix(rules): name a repeat violation instead of calling it uncertain - #32
Merged
Merged
Conversation
A hit still at or above the act bar was told to the user as uncertain once the block budget was spent, and two rules that share an id shared one probability. The notice now says the rule was already raised, and each question key keeps its own score. Co-authored-by: Pedro Guimarães <0x7067@users.noreply.github.com>
ruff format --check rejects the already-raised notice because it runs past the 100-character line length. Co-authored-by: Pedro Guimarães <0x7067@users.noreply.github.com>
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Re-trigger cubic
Escalation was reassigning a duplicate rule's question key, and a rule the subject filter skipped could inherit the other rule's score. Stop notices claimed a rule was already raised when the session cap or a continuation held a different rule back. The hook entry compares realpaths so a symlinked launch still runs. Co-authored-by: Pedro Guimarães <0x7067@users.noreply.github.com>
oxlint requires a blank line between the held-reason ternary and the withheldNotice call. Co-authored-by: Pedro Guimarães <0x7067@users.noreply.github.com>
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.
Why
A rule check that is sure, and then goes quiet, feels broken. After two blocks on the same rule and file, the next act-band hit was shown as
uncertain about. The agent was not told, and you could not tell a shrug from a spent budget.Two instruction bullets that slug to the same id also shared one probability. The question key was already unique. The verdict map was not, so the later rule's score replaced the earlier one and both citations used it.
The catch rate stays 17 of 29 planted violations blocked on the v0.23.0 rescore. Changing the questions or the 0.80 bar without a new run would widen a guard
VISION.mdsays to measure first. This change does not touch either.Scope
withheldNoticeinsrc/rules.tsandwithheld_noticeinscripts/rules.py. On an edit, a later act-band hit for that rule and file says it was already raised. A flag-band hit staysuncertain about.claude-jev-afk0.6.1).assignQuestionKeysruns on the full in-scope list and keeps those keys for the escalation call. An unasked duplicate scores 0.actForreads the question key, then the rule id.invokedDirectlycompares realpaths, so a symlinked launch still runsmain.Tradeoffs
PreToolUse blocking on Claude Code would stop the write, which is what AFK already does. The edit-phase evidence is read from disk after the write. Moving the hook would change what Jev sees, and that needs a measured run.
The Stop notice does not record which rule ids were cited. The session cap is one counter. The sentence describes the cap instead of inventing a per-rule history.
Blast Radius
Claude Code still blocks an edit rule at most twice per file, and Stop still blocks at most twice per session. A missing key still prints nothing and exits 0. Duplicate-id rules now keep separate scores, including on the escalation pass.
Verification
withheld_noticeandcollect_verdictswere called directly. A 0.91 edit hit with an empty acting list returnsalready raised this session. A 0.62 hit still returnsuncertain about. A Stop hit returns the session-cap sentence and does not say already raised.Two rules with id
samekeep keyssameandsame-2after a secondassign_question_keyson only the second rule. An answer present only forsameleavessame-2at 0.act_foronsame-2uses asame-2calibration row when present, and thesamerow otherwise.A direct launch and a symlink to
src/rules.tsboth append arules-errorrow for non-JSON stdin.ruff format --check,ruff check, andnode --experimental-strip-types --checkpassed for the changed TypeScript.check_no_comments.pyandcheck_no_stubs.pypassed. No live key, so the third block in a real session was not driven.Summary by cubic
Names a rule that repeats after its block budget is spent "already raised this session" instead of "uncertain about", and keeps separate probabilities for rules that share an id.
uncertain aboutnotice; act-band hits (≥0.80) past the budget say the rule was already raised. The agent is still not told again, and blocking still happens at most twice per session.claude-jev0.29.0 and@claude-jev/afk-adapter0.6.1,src/rules.tscan be imported without runningmain, and the entry check compares realpaths so a symlinked launch still runs.Written for commit 8b57e76. Summary will update on new commits.