Trace dump and restore at the pool API boundary #1388
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.48) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 526 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.375
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1388"
general
weight: 0.35
davidhewitt
Summary
Record
dumpandrestorefrom the pool API entry point through the reply. Each call uses the active app span when available. The call owns its span across worker replacement, so a failed dump retry stays with the original operation. The spans report success, error, or cancellation with OpenTelemetry status and provider-owned metadata.The snapshot spans measure individual API calls. The session remains the parent of the
run codespan, which coversFeedand its resume turns through the final result. This keeps a suspended execution and its callbacks together when the caller resumes under a different app span.restorecloses when the call returns. Its childloadspan carries any resumed execution and callbacks. Restore failures use the fixed OpenTelemetry status messagerestore failedto keep host paths and snapshot contents out of the span. Dump failures include bounded error text. Raw forwarding retains turn timing and snapshot size metrics.Validation
<!-- This is an auto-generated description by cubic. -->
---
Summary by cubic
Records
dumpandrestoresnapshot spans at the pool API boundary, so their duration covers initial session configuration and the relay's durable acknowledgement. The spans parent from the app context active at the call and carry through worker replacement, so a retried dump still reports on the original operation.restorecloses when the call returns even if the restored execution suspends; its childloadspan stays open across suspensions and parents their callback spans.SnapshotSpanguard that rides the turn and records the outcome on drop; Python and Node snapshot APIs capture the active app span as the parent.Dumpspan and its per-turn attributes;restoreerrors report a generic message so host paths and payload details stay out of the status. Spans report success, error, or cancellation; errors carry a 64KB-capped status message and worker exception logs stay children of the snapshot span.monty.*outcome and truncation attributes; the configured provider owns vendor-specific metadata such aslogfire.level_num. Raw forwarding turns create no snapshot span, andmonty.turn.durationandmonty.snapshot.bytesmetrics are unchanged.<sup>Written for commit 55d6306ee61558b5056f5d5fb666c80d6c1048ff. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/pydantic/monty/pull/1388?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/pydantic/monty/1388?returnTo=https%3A%2F%2Fgithub.com%2Fpydantic%2Fmonty%2Fpull%2F1388&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->