fix(runtime): retain possible-effects observations on failure - #111
Draft
danielkov wants to merge 2 commits into
Draft
fix(runtime): retain possible-effects observations on failure#111danielkov wants to merge 2 commits into
danielkov wants to merge 2 commits into
Conversation
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.
Summary
Retain bounded possible-effects observations across child ACP execution and live root sessions, including detached fork abandonment. Store conservative snapshots in version-4 fatal diagnostics while preserving native tool outcome classification.
Motivation
Related to #48. A failed or cancelled prompt can already have emitted output or invoked tools; losing those observations hides uncertainty from diagnosis.
Impact
This remains a draft, preparatory implementation. Parent-visible typed failure, cancellation, and background metadata still require compatible upstream transport releases. These facts do not establish replay safety and introduce no automatic session recovery.
Technical details
Local observations are cumulative within one live session owner, not exclusive to the failing prompt or reconstructed from persisted history. Local execution receipts reflect actual invocation entry and terminal return; ACP lifecycle statuses remain reports. False means only not observed, and failure snapshots always declare incomplete observation. The bounded metadata excludes prompts, assistant text, tool arguments/results, and provider payloads.
Startup and prompt-preparation failures retain their recording owner without duplicate receipts. Cleanup or flush errors that replace a driver error receive a separate finalization diagnostic. An acknowledged fork handoff assigns recording responsibility to either the caller or detached owner, retaining observations if delivery is abandoned.
Readers retain legacy missing-effects defaults and version-3 effects compatibility while rejecting malformed fields, unknown sources, and false completeness claims. Parent-side observation records are distinct diagnostics, not reconstructed child fatal identities.