Memory contracts: MP1–MP6
Score each gate 0 (absent/wrong), 1 (materially prompted), 2 (independently correct with evidence and limits), or 3 (also handles fresh cases and alternatives). Every gate needs at least 2. Aggregate scores cannot waive an ownership or failure-preservation gap.
- MP1 — Ownership: diagram the owner, initialized elements, allocation and borrowed pointers; explain why owner copies and stale aliases are invalid.
- MP2 — Arithmetic: derive the element-count bound, preserve planner output on rejection, and demonstrate small-limit and near-limit cases without giant allocation.
- MP3 — Failure preservation: fault an initial and later growth request; retain data/length/capacity and show successful recovery afterward.
- MP4 — Lifetime and cleanup: use an index across growth, reacquire from the new owner, show live-allocation accounting, repeated destroy and reuse. No stale-pointer evaluation in passing code.
- MP5 — Diagnostic evidence: reproduce warning-clean and supported ASan/UBSan builds, show a relevant regression failing before repair, and distinguish logical checks from instrumentation.
- MP6 — Transfer and integrity: after at least a day, predict a fresh failure schedule, justify a rejected design, explain peak storage and callback assumptions, and disclose help.
Repair failed gates and recheck changed cases. Keep dates and outputs. Read the calibration key after an independent attempt. Passing this packet does not replace the semester’s required safety/fuzzing/platform evidence.