fix(snapshot): bound APFS checkpoint cutover - #76
Merged
Conversation
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.
Summary
clonefilefor an all-or-nothing APFS checkpoint with no byte-copy fallbackVerdict and overlap
The outage is still present on canonical
mainafter #72 and #75. PR #60'swhole-root checkpoint work was already extracted into #72; its remaining broad
lifecycle and local-source changes do not remove the post-quiesce whole-root
hashing and SQLite discovery cost. This PR is a focused checkpoint/cutover fix
and does not absorb target-readiness preflight, runtime packaging, restart
protocol, or startup migration work.
Canonical invariant:
Performance
Same deterministic fixture on base and head:
node_modulesand build trees plus secret, browser, plugin,SQLite, sidecar, symlink, and unknown future-owner state
5d8ef1184f34e8ae8f2fccec87f14f9b31e9184capfs-clone-v17eb8e05414033e2bdc7537f83983c7f8b0fb517aapfs-clone-v1The final head reduces the unavailable interval by 94.9%. An independent
recursive
copyfilecontrol still takes 54.083927s with zero copied bytes,confirming the improvement comes from atomic hierarchy cloning and removing
whole-root content verification from the stopped window.
Validation
cargo check --all-targets --lockedcargo test --locked(complete macOS suite)cargo test --locked store::checkpoints::testscargo test --locked --test env_snapshot_testscargo test --locked --test upgrade_command_testsfull-copy-v1, secret mode0600, symlink target,browser/plugin/generated content, and SQLite quick-check
post-capture mutation isolation, and corrupt SQLite failure before any
quiesce command while the service remained running
Focused regressions cover:
generated trees, unknown future state, symlinks, modes, SQLite WAL/SHM
Remaining risk
APFS cutover no longer scales with generated byte volume or whole-tree hashing,
but atomic directory cloning and the metadata rewalk still depend on namespace
count and filesystem pressure. Linux, non-APFS, cross-filesystem, and clone
failure paths intentionally retain the honest size-dependent full-copy outage.
No agent transcript is included.