Switch dumps to use `CBOR` instead of `postcard` #913
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 302 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.342
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #913"
general
weight: 0.35
rewitt94
Switch dumps to use cbor via
minicborso we can use serde default features and reorder fields without needing to bump the dump version and invalidate old dumps.See this claude artifact for discussion.
<!-- This is an auto-generated description by cubic. -->
---
Summary by cubic
Switches session dumps from
postcardto CBOR viaminicbor-serde, so derived structs serialize as maps keyed by field name and enums by variant name. Adding, removing, or reordering fields or variants no longer breaks loading of existing dumps, and byte arrays are written as CBOR byte strings (viaserde_bytes) instead of one integer per byte.DUMP_VERSIONnow only bumps when the meaning of stored data changes (e.g. opcodes).postcardis dropped, and#[serde(default)]fallbacks that only served pre-13 dumps are removed since those dumps are rejected on load. Keys without a heap identity hash by stable name instead of enum discriminant (module functions by module-qualified name), since dict and set entries persist their hash in dumps; the fingerprint tests read serde variant names back from the encoding, and a fixture test pins dump compatibility.Breaking Changes
DUMP_VERSIONgoes from 12 to 13, so dumps written before this PR are rejected;MIN_SUPPORTED_DUMP_VERSIONnow equals 13.DumpError::Payloadanddump()'s error wrap the codec's errors in newDumpDecodeError/DumpEncodeErrortypes so the public API does not name the codec.Migration
dump_v13.bin) andcrates/monty/tests/dump_compat.rspin compatibility: a layout change at version 13 needs a#[serde(alias)]or#[serde(default)], or a bump plusUPDATE_DUMP_FIXTURE=1to regenerate the fixture.<sup>Written for commit 693112afbb117a25a7b86d57fb756f3ed224c94d. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/pydantic/monty/pull/913?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="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->