Carry time already slept across session dumps #1292
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.44) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 254 lines diff across 3 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.332
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #1292"
general
weight: 0.35
rewitt94
Restoring a dump reset
max_total_sleepusage to zero: the pool'sSessionBudget::forgetclearedsleep_usedon load and the wire had no field to carry it, contradicting the snapshot docs.The interpreter's
ResourceTrackernow records each capped system sleep as the sandbox requests it (serialized with#[serde(default)], so older dumps load with nothing slept) and refunds it when the host aborts the call. Workers report the total asChildEvent.total_sleep_micros(tag 31) and the WASM component astotal-sleep-micros; the pool and the JS wasm transport adopt it from aLoadreply. The sleep a restored suspension re-announces is already in that total, so it is checked against the limit without being charged again.<!-- This is an auto-generated description by cubic. -->
---
Summary by cubic
Restoring a dump no longer resets
max_total_sleepusage — the time a session already slept now travels in the dump and is adopted from theLoadreply.The interpreter records each capped system sleep as the sandbox requests it, refunds it when the host aborts the call or abandons the pending REPL call, and serializes it into dumps (older dumps load with zero slept). On restore, the parent removes the sleep the dump is suspended on from the adopted total and charges it again, so it is counted once; a dump that records no sleep charges that pending sleep in full.
<sup>Written for commit bb84182bd1d64ca6d5a4337b0c9bb9c55ae5062e. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/pydantic/monty/pull/1292?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>
<!-- End of auto-generated description by cubic. -->