Repository navigation
Hook: the on phrase may have words after it, and a missed phrase gets a note (T194) - #54
Merged
Merged
Conversation
… a note (T194) The on phrase at the start of a message may go on with a space and more words, as long as its line has no "?" and the next word is not "off". "autopilot on" and the off rules are unchanged. When the owner's message starts with a mode word and no rule reads it, the hook adds one note for the chief that names the phrases, so a miss is never silent: this session's hook state stayed off for two days after such a miss. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…e answer for one or two spaces, full-width question mark (T194 round 1) Fixes the four findings of cycle 1 on PR 54: - F-R703-2 / R702-1: the question guard after the greedy space run re-scanned the line at each backtrack step (quadratic: the mode phrase + 1 MB of spaces + "x?" held the hook over 100 s). Both lookaheads now sit before the run. Probe: 16 ms on the branch, 14.5 ms on the parent, for 1 MB of spaces; 2.8 ms and 2.7 ms for 1 MB of words. - F-R703-1 / R702-2: the off guard sat after the run, so two spaces + "off-topic" turned the mode on while one space did not. The guard before the run gives one answer. Only the exact off word blocks; "offline" turns the mode on, and the comment says so. - F-R703-3: the question guard reads the full-width "?" too (G68). - R702-5: the "off-topic" test row's reason now says why it passes; rows added for two spaces + "off-topic", "offline", the full-width "?" and the exact off word after two spaces. The 1 MB padding test gets two owner first-line cases. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Owner
Author
|
Repair round 1 (R705), commit bec5e2f: the four cycle-1 findings, one commit, two files (
Checks (fake |
This was referenced Oct 6, 2026
This was referenced Oct 6, 2026
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.
Finding
Spike R694 (T181) found that this session's installed hook state stayed
{"given":false,"autopilot":false}since 2026-10-04 22:52 UTC. The owner's first message was the on phrase followed by more words in the same sentence. The on rule's end test asked for punctuation or a line end right after the phrase, so no rule applied, and nothing told the chief for two days.Design choice
Docs
The hook's header comment, the README's "What to say" paragraph and "What's new" list, and the
sage-helpskill's sentence on the phrases.Evidence
psandkillon PATH:"sage mode continue on sage project with remote control on" gives "sage mode off, autopilot off", not "sage mode on, autopilot off", and the six note casesdo not get the note.npm run build(built 30 files),npm run check(all checks pass),npm test(449 tests, 449 pass, 0 fail).🤖 Generated with Claude Code
Closes #63 (sage task T194).