Repository navigation
fix: archive earlier native tool results - #320
Closed
EvanProgramming wants to merge 1 commit into
Closed
EvanProgramming wants to merge 1 commit into
EvanProgramming wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Problem and root cause
Related to #268 (R258). Native turns sent each earlier tool-result body again on later provider requests; the durable journal also restored full bodies on the next turn. This caused cumulative replay even though the provider requires correlated call/reply history.
Change
Keep each call/reply pair and the newest round intact. Replace older reply bodies with bounded references to the existing session-scoped SQLite artifact store, reuse identical scoped artifacts after reconstruction, and offer the artifact reader in the permitted compact inventory. Preserve failure identity, stop if archival fails, and calculate projected history-token estimates from the actual reply. Full outputs remain retrievable subject to existing scope and capability checks. Removing call/reply pairs would break stateless provider history validation; retaining all bodies would retain the regression.
Stacked on #318 (
Evan/v3-deadline-test-stability). This addresses only native execution. The same issue in the legacy adapter is tracked by #319, so the overall R258 release gate remains blocked and this PR does not close #268.Verification
make test: 1,175 tests passed; two Linux Bubblewrap tests skipped on macOS.make check,make lint,make docs-check: passed.Risks and limitations
Older replies now require the existing session-scoped artifact store and
read_tool_artifactpermission for later retrieval. If retention fails, the turn stops rather than discarding results. This is not release approval: the legacy replay, incomplete evaluation records and waivers, and new-candidate platform evidence remain outstanding.