Repository navigation
Conversation
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.
Parked 2026-11-10: outside the core daemon slice.
Restore authorized snapshot plaintext into a fresh, owner-only, read-only Git mirror. The reader validates the archive before staging, reserves explicit work/store capacity, imports and verifies self-contained bundles, and publishes with atomic no-replacement semantics. Local history, branches, shallow boundaries and working diffs survive. Execute permission follows Git's owner-execute bit, preserving clean diffs for group-only permissions. Excluded tracked files stay absent without appearing deleted; genuine deletions remain visible.
This layer follows archive-plan #171. It exposes the library API needed by the next snapshot CLI consumer; it adds no user restore command.
check_git().awaitrefuses unsupported platforms or unavailable/denied Git before a request. Linux and macOS require Git 2.29+. Paseo keeps itshost-tools=onprerequisite.Restore uses a private staging area, fixed bounded Git commands, full object integrity/inventory checks, explicit cancellation with cleanup, and owner-only 0400/0500 output. Each store serializes restores. Filesystem free space and configured budgets both gate admission; free space does not reveal an emptyDir quota. Callers cancel the token and await completion instead of aborting the future. Delivered local copies remain after grant expiry.
Validation:
just cipassed full workspace all-target Clippy in 10m10s, then stopped at a noninteractive pnpm dependency refresh. Fresh worktree dependencies are installed. Desktop/web, security-review, file-size, Tauri formatting and mobile analysis checks pass. The remaining native broad gate phases are pending compiler availability. This draft does not claim the broad gate is green.The PR carries two already-reviewed prerequisites without rewriting published history: #168 Docker-context fix
1a1d563deas129d5f3f4, and #170 encrypted-frame fix119b065ccas5e471aa9a. It also carries the #168 producer owner-execute fixe094c955eas6a3d89561. Their owning PRs remain authoritative.The diff has 1,651 changed lines: 209 carried prerequisite lines, and 1,442 for this layer including 529 realistic test lines. The bounded archive parser was already split into #171. The remaining staging, Git validation, cleanup and atomic publication form one filesystem safety boundary; splitting them would expose an incomplete restore API.
Independent final-source and mode-fix reviews pass. A normal production image build and its complete packaging/scanner suite pass with the actual Sprig inspector and corrected producer. Human integrated testing remains pending. Draft status is preserved; no deployment or review attestation.