test(orchestrator): end-to-end dedup pause/upload/resume corruption tests#3003
test(orchestrator): end-to-end dedup pause/upload/resume corruption tests#3003ValentaTomas wants to merge 2 commits into
Conversation
…ests Byte-exact verification of the full memfile-dedup artifact pipeline (memfd dedup + inputEmpty merge, header merge, zstd frame compression, V4/V5 serialization with frame-table trimming, resume resolution through trimmed tables) across multi-generation chains, with and without O_DIRECT drain. Also documents the one dedup-only corruption amplification found: a divergent local parent cache is baked into the snapshot as a wrong parent mapping, which the non-dedup path is immune to.
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit 131e083. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Code Review
No critical findings or feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Investigation context (EN-978)
Part of the resume-corruption investigation. These tests exercise the full production artifact pipeline for memfile dedup and verify byte-exact restores after every generation:
NewCacheFromMemfdDeduped(compare + block-granularinputEmptymerge + packed drain, with and without O_DIRECT)CloneForUpload+ ancestor BuildData propagation (full frame tables, V3 sentinel), V4 and V5SerializeHeader->DeserializeBytes(which sparse-trims ancestor frame tables)GetShiftedMapping+ trimmedFrameTablelookups, the same path the chunker uses8-generation chains with hugepage-granular FC-bitmap semantics (identical rewrites, zero writes, balloon-REMOVE blocks, reverts to ancestor content), all dedup budget combinations. All pass, which exonerates the dedup transform itself (compare classification, packing, header merge, serialization, directIO drain) for the corruption flavor — the bug, if dedup-gated, is not in this pipeline.
dedup_divergent_parent_test.godocuments the one dedup-only amplification mechanism found: the compare trusts the pause node's local chunker view of the parent, so any local-vs-authoritative divergence becomes a durably wrong parent mapping in the snapshot (the non-dedup path stores guest bytes verbatim and is immune). Checkable on a victim chain via the headerChecksumfields.Companion fixes: #3001 (hinting drain), #3002 (REMOVE alignment). Findings are not yet confirmed as the EN-978 root cause; these tests pin down what it is not and where to look next.