fix(ship): preserve checkpoints across device changes - #57
Draft
ronheichman wants to merge 2 commits into
Draft
ronheichman wants to merge 2 commits into
ronheichman wants to merge 2 commits into
Conversation
Match durable file objects across device changes only when the existing content guard also matches. Keep exact legacy identities valid and replay ambiguous rotated copies from their beginning. Built with Codex
Require exact file identity for legacy unguarded rotated checkpoints. Keep cross-device matching available when a content guard validates the offset. Built with Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Version 1 checkpoints include a platform identity with device and file-object components.
A durable volume remount can change only the device component. Ship then replays acknowledged records.
Legacy positive-offset checkpoints can lack a content guard. Device-portable rotation matching without a guard skipped new prefixes in the regression.
What
The checkpoint schema remains version 1. Existing state files need no rewrite.
Destination changes, truncation, replacement, changed guards, and ordinary inode reuse still trigger safe replay.
No HTTP batch splitting behavior changes in this pull request.
An adversarial inode collision with identical guarded bytes can still match. The bounded guard is not proof of whole-file identity.
Delivery remains at least once. Receivers must tolerate duplicates after ambiguous outcomes.
Deployment context is inferred from the public v0.2.0 source pin. No deployed binary was inspected directly.
Original red baseline
This command ran with the original tests against unchanged
f0778c09dc48281aa93a3887d05096c0a1f3f9f7.Original green
This original focused run included replacement, truncation, destination, and inode-reuse coverage.
Follow-up red
The new restart and rotation regression ran three times against
e5cd748427b4fe366b3535a2365cad1eb3e6057d.Follow-up green
The same regression ran three times after the fix.
The final focused checkpoint suite passed at
f0b3c0eb7c37a2602e7ecf438e5e00c167187bac.Full verification
All Linux CI commands passed locally with Go 1.26.6 at the final SHA.
Coverage was 84.6 percent. Every configured fuzz target passed for 30 seconds using these commands.
Hosted checks are absent. The final CI run completed with
action_requiredand zero jobs.Native Windows and macOS execution remains unverified. Both test binaries cross-compile locally, which does not verify native execution.
Combined patch verification
Temporary integration used upstream main
f0778c09dc48281aa93a3887d05096c0a1f3f9f7, HTTP 413 head70074dd34ead15466ed6974fc475d67b01bae068, and this headf0b3c0eb7c37a2602e7ecf438e5e00c167187bac.Both patches applied cleanly. The combined focused regressions and
go test -race ./...passed.Built with Codex