fix(core): fix overflow prefix validation error in read_overflow tool#1882
Merged
fix(core): fix overflow prefix validation error in read_overflow tool#1882
Conversation
…#1868) Overflow notices previously embedded `overflow:{uuid}` causing LLMs to pass the full string to read_overflow, which only accepts bare UUIDs. - Change notice format from `[full output stored as overflow:{uuid} ...]` to `[full output stored — ID: {uuid} ...]` (Option B) - Strip legacy `overflow:` prefix in read_overflow before UUID validation for backwards compatibility (Option A) - Update tool description and ReadOverflowParams doc comment to reflect that bare UUID is expected (Option C) - Update OVERFLOW_NOTICE_PREFIX constant and all tests using old format
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
overflow:prefix inread_overflowtool validation before UUID parsing (backward-compatible, accepts bothoverflow:{uuid}and bare{uuid})overflow:{uuid}toID: {uuid}to eliminate LLM ambiguityRoot Cause
save_overflow()stores a bare UUID. The notice format embedded it asoverflow:{uuid}, which the LLM copied literally when callingread_overflow. UUID validation rejected the prefixed form, causing a failed tool call + wasted retry.Test Plan
overflow_prefix_accepted_and_stripped—overflow:{uuid}input accepted, data retrieved correctlybare_uuid_still_accepted— backward compat: bare UUID still worksinvalid_uuid_with_overflow_prefix_returns_error—overflow:not-a-uuid→InvalidParamscargo +nightly fmt --check✓cargo clippy --workspace --features full -- -D warnings✓cargo nextest run --workspace --features full --lib --bins✓ (5943 passed)Closes #1868