Repository navigation
fix(runtime): scope tool-call identities and report persistence failures - #1099
Merged
XuPeng-SH merged 15 commits intoOct 21, 2026
Merged
Conversation
This was referenced Oct 21, 2026
XuPeng-SH
force-pushed
the
fix/tool-call-invocation-identity
branch
from
October 21, 2026 08:43
44e26dc to
e1d3ce7
Compare
added 12 commits
October 21, 2026 21:50
Remove the vulnerable root forwarding dependency and centralize the existing public-root TLS policy across WebSocket and proxy consumers. Port SQLx callers to upstream owned SQL types while preserving bound values, schema authority and cancellation-safe transaction ownership. Exercise actual TLS rejection and database encoding boundaries. Correct two stale fixtures at the canonical acceptance and HTTP routing owners.
XuPeng-SH
force-pushed
the
fix/tool-call-invocation-identity
branch
from
October 21, 2026 14:45
e1d3ce7 to
7784e70
Compare
XuPeng-SH
commented
Oct 21, 2026
XuPeng-SH
left a comment
Collaborator
Author
There was a problem hiding this comment.
Commit review for 1af249616a11128ffadc6c919f84abf01b6b63e6 (relative to c6cdf6cff683f96149c6184357ed3e22ec4bad66): no actionable findings. The committed cancelling lifecycle now owns reconciliation independently of ACK latency; scheduled and in-flight reads share one operation slot, and stale responses remain fenced by binding and snapshot checks. The added cases cover fast ACK, terminal ACK, missing assistant message, transient status-read failure, and overlapping Stop operations. Exact-source local evidence: 817 Web tests, typecheck, affected-file lint, production build, and two additional deterministic Stop interleavings passed. No full-CI completion is claimed here.
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: Unchanged: Execution profiles and User Runner boundaries remain accurate. Invocation identity, canonical outcomes and Web observation/control ownership stay within their existing Runtime and Web owners.
Summary
Repeated provider tool-call IDs could collapse execution receipts across rounds and collide during terminal persistence. Freeze invocation-scoped IDs at model acceptance, reject malformed batches before effects, and restore provider IDs only through the existing outbound history projection, including structural cache annotations. Canonical persistence failures reach existing fanout/cancellation paths while preserving partial answers.
Web now retains one genuine parser projection and one selected chat/session/root/assistant observer binding. Only explicit matching root terminal receipts establish completion; interrupted POST recovery uses bounded GET attachment without replaying the turn. Stop uses that same binding end to end: stale requests cannot cancel a successor, and delayed ACKs, refreshes, reconciliation and rollback cannot overwrite a successor or newer root facts. Resume ordering, upstream-error separation and bounded retry ownership retain their existing fixes.
The PR also removes quadratic bounded gap insertion, bounds plan-review correlation, updates TLS/SQLx contracts, and reports typed/private-safe harness failures through existing criteria/progress. Required judgment and exact execution predicates remain strict.
Related issue
Closes #1093. Related #988 remains open: its historical incident and live-cache attribution have not been established as the identity collision fixed here.
Change type
User and compatibility impact
Partial answers survive observation loss and canonical failure. Waiting/blocked/paused runs retain controls; terminal runs settle from Runtime receipts. No EOF-success fallback, automatic POST replay, execution alias store or alternate lifecycle path remains.
The Web Stop endpoint requires
sessionId,runIdand explicit nullableassistantMessageId. Missing/malformed bindings return 400; a binding changed before Runtime admission returns 409 with zero cancellation calls. Cancellation already dispatched continues against its captured root. Runtime-only roots use null assistant and cannot complete another message by fallback. All current callers are updated; no chat-ID-only compatibility overload remains.Safe harness progress uses v5 with its strict reader updated together. Actual predicate values, unexpected JSON keys and private error text stay out of public artifacts. Deployment defaults, database schema, authentication, sandbox and User Runner boundaries do not change.
Architecture and complexity delta
astra-core::net; HTTP retains native-plus-bundled roots and normal certificate/hostname validation.Recovery after Stop follows committed eligible selection, including reconciliation after a pending cancellation is rejected. The existing retry owner preserves its budget and latest cursor; the Stop handle retires at this one-shot handoff. Shared public controls cover stale status reads, pending running/waiting/blocked/input-queued outcomes, paused/terminal controls, exhausted budget, and subsequent ordinary observation without reentry. Cancellation status reconciliation also follows the committed owned
cancellinglifecycle, including roots without an assistant message. HTTP acknowledgement latency never decides whether reconciliation starts:cancelPendingdescribes only the bounded ACK wait. The existing operation-local timer reserves both the scheduled and physically in-flight cycle, so rerenders cannot duplicate requests. Response and error branches no longer start their own reconciliation. No additional retry state or execution path is introduced.Verification
Final correction:
1af249616a11, based on rebased7784e70c21and frozenmain@b232c4a570. The requested rebase was verified already up to date. Rust/SDK/dependency/configuration inputs are unchanged by the Stop correction.4026692a8dcf.-D warnings, format/repository checks, 152/152 Python contracts, native 1698/1698 units + 9/9 real-MatrixOne groups, and actual instrumented-std TSan 1698/1698 units + 9/9 DB groups. Strict existing 30 s/60 s profiles, zero retries, no suppressions or application deadline/thread changes. No applicable JavaScript event-loop race detector exists; deterministic asynchronous interleavings validate the changed Web paths, and Rust TSan is not represented as JavaScript race coverage.4b587f00996ebe5c05a73eaef105ef241e876414, with three existing allowed warnings and no new ignore. Applicable unchanged SDK 34, TLS/SQLx/MOI and other source-bound evidence remains valid.Actual
gpt-6.1-sol/xhighproduced the design and admission amendment and performed the final overall review of design, implementation, tests and docs. No unresolved material source/design/test/documentation blocker remains after the completed correction and re-review. This is ordinary feature-branch delivery approval, not a claim of overall live readiness.Remaining live evidence
The latest completed live evidence is from predecessor
c6cdf6cff683: 18/18 passed, exit 0, terminationfinished, with exact artifact commit verified. Completed live job. The final Web-only correction does not change Runtime, SDK, harness, dependencies or criteria. No new live run or CI wait is claimed for the final commit. This passing run does not establish the cause of earlier Work failures or historical cache attribution; #988 remains open.Final checklist