Skip to content

Python: preserve nested A2UI snapshot provenance and result order - #3

Draft
ranst91 wants to merge 1 commit into
fix/cold-native-approval-resumefrom
fix/pni719-native-replay-provenance
Draft

ranst91 wants to merge 1 commit into
fix/cold-native-approval-resumefrom
fix/pni719-native-replay-provenance

Conversation

@ranst91

@ranst91 ranst91 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Motivation & Context

Nested A2UI renders finish before their generator, but saved snapshots moved the generator result next to its declaration. Replay then treated a later nested render as a separate surface.

Description & Review Guide

  • What are the major changes? Record parentToolCallId at the actual render-subagent invocation and preserve tool-result emission order in terminal and safe-point snapshots.
  • What is the impact of these changes? Public snapshots retain the relationship across serialization and cold hydration. No private continuation state is exported and no ancestry is inferred for older histories.
  • What do you want reviewers to focus on? Canonical IDs/results and safe-point parent declarations. A fresh wrapper retry test covers save/cold restore; 1,801 AG-UI tests pass, with source Pyright and changed-file Ruff checks passing.

Stacked on PNI715 52d6e198c, including PNI711 bf82841e7. Parent integration should cherry-pick only this PR's commit onto that existing stack. Fresh real-provider/browser validation remains with the parent task.

Related Issue

PNI-719, child of PNI-706.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: Codex implemented and locally tested the source, regression tests, and documentation. This draft awaits human review; the human attestation is not checked on their behalf.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed upstream issue
  • This is not a breaking change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant