fix(watchdog): avoid descriptive stop-intent false positives - #455
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Fix a Codex hook-mode false positive where descriptive review prose such as
Running the candidate scanner ...was treated as an explicitly selected next tool action, causing an unnecessaryGitHub Delivery recovery 1/3continuation at an otherwise valid final stop.Root cause
The broad stream watchdog intentionally treats imperative-looking
Running/Executingclauses as tool-emission signals so it can detect repeated narration stalls. Stop-hook logic incorrectly reused any newly observed broad signal as proof that the assistant had selected an immediate next action.That conflated descriptive gerunds with explicit commitments. The first correction then became too strict in the opposite direction: it no longer recovered for standalone commitments such as
I will run ..., and it only scanned line starts, missing commitments after terminal sentences on the same line.Fix
No further action is authorized. Let me read ...is still contradictory and must recoverRunning ...clauses to finalize normallyTDD
RED-first regression reproduced the 2026-09-16 incident while preserving the broad stream signal. Existing terminal-stop regressions exposed the over-strict first implementation, including standalone
I will run ...and same-line post-terminal commitments.On the current head, canonical repository checks and Node 22 compatibility are green. Dependency Review and Windows trace bins are also green; CodeQL is still running.
Scope
Two files only: the Stop-hook implementation and the incident regression test. No merge is performed by this PR.