Skip to content

Bind durable attempts to snapshot contents - #557

Draft
JusterZhu wants to merge 2 commits into
justerzhu-persist-attempt-snapshot-bindingfrom
justerzhu-durable-snapshot-content-identity
Draft

JusterZhu wants to merge 2 commits into
justerzhu-persist-attempt-snapshot-bindingfrom
justerzhu-durable-snapshot-content-identity

Conversation

@JusterZhu

@JusterZhu JusterZhu commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Bind each durable attempt and its exact installation/snapshot paths to a deterministic manifest of directory entries, file lengths, and SHA-256 contents. Persist the manifest identity in journal v2 and carry SnapshotManifestHash through the process contract to the current Core consumer.
  • Fail closed on missing, changed, added, or mismatched content and manifest identity; legacy v1 bound records remain pinned and cannot be promoted or verified. Preserve the default legacy path and existing backup overloads.
  • Add actual Client backup → IPC → child apply coverage and a Windows Native AOT publish/run CI exercise.

Validation

  • dotnet test tests\CoreTest\CoreTest.csproj -c Release --filter 'FullyQualifiedName~DurableUpdateAttemptStoreTests' --logger 'console;verbosity=normal': 16 discovered, 16 passed, including real Client → IPC → child apply. No other test/vstest process was active at the start; workspace test/probe processes were gone after completion. An earlier 16/16 run overlapped other shared-environment tests.
  • The first --no-restore rerun after local AOT publication failed with NETSDK1005 because the AOT restore had replaced the multi-target assets; the successful command above restored them automatically.
  • Native AOT CI run 45116763509 succeeded for head ba572f3c5bd1935984ced3ebfd4564919e9d03fb: the executed log shows native code generation followed by snapshot verification after process restart and rejection after equal-length tampering. This native smoke exercises the snapshot-create / VerifySnapshotContent API path; it does not cover Native AOT ProcessContract JSON/bootstrap or the complete Client → native updater workflow. The managed test above covers Client → IPC → child apply.
  • The local Native AOT publish attempt failed with Platform linker not found because the Visual Studio C++ toolchain is missing; no local native executable ran. This does not invalidate the separate CI execution above.

Safety and deployment status

Draft; not deployable and not a recovery authorization. Hashes and the journal's cooperative CAS are not OS write fencing; path-based reparse checks are not no-follow handles, and concurrent replacement and verification-to-use TOCTOU remain possible. On Unix, FileAttributes does not identify FIFO/device entries, which can block or have side effects when opened; this remains a blocker for untrusted filesystem contents.

IPC is unauthenticated and replayable, does not bind authorized tenant/record identity, and old consumers can ignore the required-attempt marker; no trusted version handshake exists. Installation identity is a normalized path, not a filesystem identity. There is no installation quiescence/write fence, application-owned business readiness pipeline, or real recovery owner. Durable success reporting remains suppressed. No restore or recovery integration is introduced.

Base: #551 at afc58456; this change does not include the separate Bowl exporter fix.

JusterZhu and others added 2 commits November 23, 2026 13:07
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant