Repository navigation
Bound the finding's free text and refuse oversize tool-call arguments - #65
Merged
shipmill-romamo[bot] merged 2 commits intoOct 9, 2026
Merged
Conversation
finding.rootCause, finding.why and spec.steps[].arguments come from the model's output, which can quote host output, yet the record kept all three unbounded after #57 capped the answer and the raw arguments. rootCause and why now keep at most 8000 characters, keeping the start before a [last N characters cut] mark (D-8, as D-6); the proposed decision ids are still read from the whole line. A tool call whose parsed arguments serialize (json.dumps defaults) to more than 8000 characters is refused before it runs and recorded as an invalid step with empty arguments, and is not remembered for the repeat cache; the trace still keeps the cut start of its raw arguments. The schema bounds both finding fields with maxLength 8000. Fixes #63 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 8000-character limit on a call's parsed arguments counted each non-ASCII character as its six-character \uXXXX escape, so a Cyrillic argument was refused at about 1300 characters. Serialize with ensure_ascii=False so the limit counts characters, as D-8 says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shipmill-romamo
Bot
deleted the
fix/63-bound-finding-and-step-arguments
branch
October 9, 2026 17:44
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
Bounds the last three unbounded pieces of model text in the investigation record, per D-8 as chosen on #63.
finding.rootCauseandfinding.whykeep at most 8000 characters (FINDING_TEXT_LIMIT), keeping the start before a[last N characters cut]mark through the existing_head_text(as D-6). The cut happens where_findingbuilds the Finding, so the proposed/unrecorded decision ids are still read from the wholeproposedline_run_callrefuses a call whose parsed arguments serialize to more than 8000 characters (STEP_ARGUMENTS_LIMIT, measured withjson.dumps(arguments, ensure_ascii=False), so non-ASCII text counts in characters, not escapes). It is recorded as aninvalidstep with empty arguments, exactly like the non-JSON case; the tool does not run and the repeat cache is not filled. The model is told the arguments are too long and nothing rantoolCalls[].argumentsstill keeps the cut start of an oversize call (_call_textunchanged)maxLength: 8000onfinding.rootCauseandfinding.why, plus descriptions;steps[].argumentsgets a description only (no schema rule can bound an object's serialized size, so code enforces it)_arguments_problemhelperTests
{}andinvalid, the model is told why, and the trace keeps the marked start of the raw text. Saved records validate against the schemarepeatedproposedline is still foundrootCause/whyand refuses 8001uv run ruff check .,uv run mypy,uv run pytest(full suite, 496 passed),uv run cloudfall config validate --project config/examplesall passFixes #63
🤖 Generated with Claude Code