Repository navigation
fix(runtime): preserve tool evidence under context pressure - #1289
Merged
Merged
Conversation
Contributor
|
This pull request is merged. |
This was referenced Nov 13, 2026
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.
Capability assessment: Updated: Context-pressure recovery preserves unique tool evidence through the existing complete-input summary and session-artifact surfaces; model choice, policy, User Runner and MOI boundaries are unchanged. See docs/design/context-window-management.md.
Summary
When summary generation failed or was unavailable, a long tool task could lose unique confirmed results behind a fixed compaction marker. A regression against the base reproduces this with one human request and 32 paired tool receipts. Pressure now permits exact-result deduplication, a validated complete-input semantic summary, or an authorized durable history artifact; otherwise the existing typed context-window error preserves the source history.
Remove lossy result clipping, dropped-round summary retries, repeated mechanical stages, server-local canonical microcompaction and unused configuration/state plumbing. Keep ordinary instructions, current tool pairs, active controls and semantic mailbox/child-result evidence. Carry existing history artifact handles through later successful summaries deterministically, and recover the exact dedup target even after the live tail is replaced.
Related issue
Refs #1016, #1249, #1261, #1100, #1119.
The remaining external and performance acceptance criteria are not auto-closed by this PR.
Change type
User and compatibility impact
Unique results remain available when optional summarization fails. The model retains normal tool/model recovery choices and receives truthful current-reader guidance. No schema, dependency, lifecycle status or MOI consumer contract changes.
The existing history artifact format caps the full public snapshot at 4 MiB. If it cannot be stored/read under the current admission, history is preserved and existing context-limit handling applies. Reader pages are bounded, but the current store loads the complete artifact per read. Pressure recovery uses the existing artifact transaction/readback and may require more than one net-reducing pass; raw provider usage remains telemetry, not an invented post-rewrite measurement.
Architecture and complexity delta
compact_strategyplumbing andmax_ptl_retries.Verification
9dc06cd33011ce940c7cb8d8d2ba09bacb53eab0. Final cumulative reviewed diff:2d87ebe9d11d81ec6dc3bd651efa0cb85137969a2895c6cdd12286b0dccaaeaf; CI-fixture correction commit5e6a12751e395361d363b77d99e970781fd29c5c.cargo fmt --all -- --check,git diff --check: pass.astra-runtime,astra-turn-core,astra-cli, all targets,--no-deps -- -D warnings): pass; final test-only edits rechecked in runtime.cargo nextest run --locked --manifest-path Cargo.toml -p astra-runtime --profile cipasses all 6,048 selected cases; 194 opt-in cases are excluded. The final correction only changes the ignored DB fixture; the offline selection and production are unchanged. Four compaction integration targets retain 21 passing cases, including two dedicated history-copy accounting tests./chat/stream: 9 SQL-budget scenarios pass with 17–19 total statements and successful observer completion. Post-provider context-limit preservation of answer/usage/tool facts also passes.-Zsanitizer=thread -Cforce-frame-pointers=yes,--test-threads=2for runtime. Core source is byte-identical to its sanitizer-tested snapshot. No suppressions. Production is unchanged by the fixture-only CI correction; owner concurrency and SQL evidence is reused.recovered_validation_user_facing_completion: one bounded replay on the unchanged original commit and same model passed all hard criteria, including the unchanged 0.85 hard judge. The earlier rejection had no captured reason; this pass does not claim to explain it or replace post-push CI.gpt-6.1-terra/max, taskexecution_design, session01a1c30a-db65-71b0-a05c-e465e9dc17bb; final reviewed source has no material blocker. Validation gates are reconciled before publication. CI is not awaited or asserted passed.Final checklist