Skip to content

fix(core): restore JIT tool reference injection after overflow SQLite migration#1826

Merged
bug-ops merged 2 commits intomainfrom
1818-jit-overflow-ref-fix
Mar 15, 2026
Merged

fix(core): restore JIT tool reference injection after overflow SQLite migration#1826
bug-ops merged 2 commits intomainfrom
1818-jit-overflow-ref-fix

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

  • OVERFLOW_NOTICE_PREFIX pointed to the old file-path format ([full output saved to) while PR feat(core): migrate tool overflow storage from disk to SQLite #1782 changed the actual notice to [full output stored as overflow:{uuid} — causing extract_overflow_ref() to always return None and JIT references to never be injected
  • Updated OVERFLOW_NOTICE_PREFIX and its doc comment to match the current SQLite format
  • Updated all five pruning sites to emit [tool output pruned; use read_overflow {uuid} to retrieve] so the agent can call read_overflow {uuid} to recover pruned content
  • Updated tests in summarization.rs and context/mod.rs to use the new UUID-based format

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace --features full -- -D warnings passes (0 warnings)
  • cargo nextest run --workspace --features full --lib --bins — all 5790 tests pass
  • Three previously failing tests now pass: prune_tool_outputs_preserves_overflow_reference, prune_stale_tool_outputs_preserves_overflow_reference_in_tool_output, prune_stale_tool_outputs_preserves_overflow_reference_in_tool_result

Closes #1818

… migration

OVERFLOW_NOTICE_PREFIX was pointing to the old file-path format
('[full output saved to') while the actual overflow notice format
changed in PR #1782 to '[full output stored as overflow:{uuid}'.
As a result, extract_overflow_ref() always returned None and the JIT
reference was never injected into pruned tool outputs.

- Update OVERFLOW_NOTICE_PREFIX to match current SQLite overflow format
- Update extract_overflow_ref() doc comment (UUID instead of path)
- Update all five JIT reference sites to emit
  '[tool output pruned; use read_overflow {uuid} to retrieve]'
- Update tests in summarization.rs and context/mod.rs to use new format

Closes #1818
@github-actions github-actions bot added bug Something isn't working documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate size/M Medium PR (51-200 lines) and removed bug Something isn't working labels Mar 15, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 15, 2026 14:39
@github-actions github-actions bot added the bug Something isn't working label Mar 15, 2026
@bug-ops bug-ops merged commit 5b67ac5 into main Mar 15, 2026
15 checks passed
@bug-ops bug-ops deleted the 1818-jit-overflow-ref-fix branch March 15, 2026 14:56
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(core): JIT tool reference injection broken after overflow migration to SQLite

1 participant