Repository navigation
Add durable private state and verified data-only recovery - #272
Closed
MichaelWave369 wants to merge 2 commits into
Closed
MichaelWave369 wants to merge 2 commits into
MichaelWave369 wants to merge 2 commits into
Conversation
This was referenced Sep 30, 2026
Owner
Author
|
Superseded by merged consolidation PR #291. The reviewed implementation/evidence lineage is preserved on |
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.
JSONL writes could interleave, truncated rows were silently skipped, memory retries could race, and publication of an older receipt could expose a newer pending revision. The candidate serializes and syncs acknowledged writes, detects incomplete or logically corrupt state, and keeps older receipt publication tied to its exact revision.
phi-state backup/verify/restorecaptures private, versioned data into fresh directories. Restore verifies hashes and canonical records before writing; it excludes configuration, credentials, claims and indexes and archives historical effect/approval authority outside active paths. Explicit incomplete-tail recovery preserves original bytes without replaying uncertain operations. Unknown schemas are held. The packaged XDG state root is shared by CLI/runtime processes; legacy roots require explicit data-only migration.Validation: 18 new durability/recovery tests; the focused selection passed 37 tests, Ruff and mypy (
--ignore-missing-imports, 304 modules). Full GitHub CI passed all four lanes, including 2,126 Python tests with 6 skips. Latest CI is green at48707cef6a2fd4058f7885724ab56712fe1a68fa, and the installed-package/live UEFI image lane passed sidecar restart, actual greeter relogin and two boots. Installed storage and abrupt virtual restart remain the distinct #273 gate; hardware power-loss behavior is not claimed. An earlier local full run had 18 environment failures (restricted AF_UNIX/Wayland and unavailable bubblewrap preflight); remote CI resolved the platform-verification gap without silently skipping those tests.POSIX permissions and terminal review do not isolate malicious processes with the same UID. Backups are unencrypted and hashes establish integrity, not authenticity. Stacked on #271. See
docs/os/STATE_RECOVERY.mdand the implementation register. No authority or adapter is promoted and this PR does not publish a supported OS release.