Repository navigation
fix(analysis): complete rage-loop detection and avoid false positives (#34) - #38
Draft
ClaudiaFang wants to merge 2 commits into
Draft
ClaudiaFang wants to merge 2 commits into
ClaudiaFang wants to merge 2 commits into
Conversation
5 tasks
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
Finish the existing Rage Loop detector end-to-end for #34 (part of #31). Firstsun and b08x already shared the same detector source, so this PR avoids copying duplicate code.
Fixes
tool_calls: '[]'values no longer count as repeated tool invocations. Ignore trivial short messages and non-monotonic timestamps.input_tokensandtotal_tokensusage shapes.rage-loopto JSON Schema category enum (already present in prompt constants but missing from the schema).Compatibility
rage-loopdistinct fromrepeated-mistakes: repetitive failures without saturated context must not be categorized as rage loop by the heuristic.Validation checklist (keep Draft until complete)
Refs #31 and #34.
Source: https://github.com/b08x/code-insights/blob/development/cli/src/analysis/loop-detector.ts