Skip to content

fix(core): fix overflow prefix validation error in read_overflow tool#1882

Merged
bug-ops merged 2 commits intomainfrom
fix/1868-read-overflow-prefix
Mar 15, 2026
Merged

fix(core): fix overflow prefix validation error in read_overflow tool#1882
bug-ops merged 2 commits intomainfrom
fix/1868-read-overflow-prefix

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 15, 2026

Summary

  • Strip overflow: prefix in read_overflow tool validation before UUID parsing (backward-compatible, accepts both overflow:{uuid} and bare {uuid})
  • Change overflow notice format from overflow:{uuid} to ID: {uuid} to eliminate LLM ambiguity
  • Update tool description to clarify bare UUID is expected

Root Cause

save_overflow() stores a bare UUID. The notice format embedded it as overflow:{uuid}, which the LLM copied literally when calling read_overflow. UUID validation rejected the prefixed form, causing a failed tool call + wasted retry.

Test Plan

  • overflow_prefix_accepted_and_strippedoverflow:{uuid} input accepted, data retrieved correctly
  • bare_uuid_still_accepted — backward compat: bare UUID still works
  • invalid_uuid_with_overflow_prefix_returns_erroroverflow:not-a-uuidInvalidParams
  • 6 existing tests updated to use new notice format (context, summarization, agent tests)
  • cargo +nightly fmt --check
  • cargo clippy --workspace --features full -- -D warnings
  • cargo nextest run --workspace --features full --lib --bins ✓ (5943 passed)

Closes #1868

…#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
@github-actions github-actions bot added documentation Improvements or additions to documentation rust Rust code changes bug Something isn't working core zeph-core crate size/M Medium PR (51-200 lines) labels Mar 15, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 15, 2026 21:55
@bug-ops bug-ops merged commit c09a370 into main Mar 15, 2026
20 checks passed
@bug-ops bug-ops deleted the fix/1868-read-overflow-prefix branch March 15, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(tools): read_overflow rejects id with overflow: prefix — LLM copies format literally

1 participant