Repository navigation
fix(utils): honor loop repeat thresholds above ten - #290
Open
xyi74976-del wants to merge 2 commits into
Open
xyi74976-del wants to merge 2 commits into
xyi74976-del wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
Description
Explicitly configuring
LoopDetector(max_repeats=12)never detects a repeated tool call: history is capped at ten entries, so the requested window cannot be reached. Retain at least the configured window while keeping history bounded and preserving the ten-entry floor. The workflow's default threshold is unchanged.Related Issues
No linked issue. This is separate from the empty status-probe history pollution fixed in #177.
Changes Made
Validation
Python 3.12 with the official CI lock and editable package:
tests/test_tui_input_safety.py::test_ctrl_c_clears_a_draft_before_it_interrupts. It also fails after restoring all four changed files to the clean upstream baseline.pre-commit run --all-files --show-diff-on-failure: all six automatic hooks passed; a Go module mirror was needed to install actionlint.uv pip check: installed dependencies compatible.localStorage; no frontend changes were made.Windows/native Desktop and browser end-to-end checks were not run. No live model calls were needed.
Checklist
Additional Notes
Implementation and tests are AI-assisted. The independent review found no blocking code issues; it does not represent human review or upstream CI approval.