Skip to content

fix: archive earlier native tool results - #320

Closed
EvanProgramming wants to merge 1 commit into
Evan/v3-deadline-test-stabilityfrom
Evan/v3-native-result-archival
Closed

EvanProgramming wants to merge 1 commit into
Evan/v3-deadline-test-stabilityfrom
Evan/v3-native-result-archival

Conversation

@EvanProgramming

Copy link
Copy Markdown
Owner

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.
  • Agent, subagent, and TUI workflow acceptance: passed.
  • Wheel and sdist installation smoke: passed outside the checkout.
  • Native runtime probe: the old result body is no longer replayed, the reference remains stable after reconstructing history, and the scoped artifact can be read.
  • Docker build and persistence smoke: running; exact-commit CI and six-platform release evidence remain pending.

Risks and limitations

Older replies now require the existing session-scoped artifact store and read_tool_artifact permission 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.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@ghfind-review ghfind-review Bot added review: high ghfind author score; see https://ghfind.com area: context Canonical conversation history, compaction, and context efficiency area: memory Memory retrieval, storage, scope, and turn snapshots bug Something isn't working labels Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: context Canonical conversation history, compaction, and context efficiency area: memory Memory retrieval, storage, scope, and turn snapshots bug Something isn't working review: high ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant