Skip to content

fix(runtime): preserve witnessed dependency cache scope on restore - #111

Closed
roodboi wants to merge 20 commits into
nextfrom
codex/preserve-witnessed-cache-scope
Closed

roodboi wants to merge 20 commits into
nextfrom
codex/preserve-witnessed-cache-scope

Conversation

@roodboi

@roodboi roodboi commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

After selected host filesystem recovery, a retained graph can pass source and volume checks but still refuse normal startup: the dependency cache scope includes the prior filesystem device number, while fresh configuration computes a different scope.

Preserve that scope only through the selected source-device witness. Reconstruct the old hash using the unchanged Git common directory path/inode, require exact retained cache scopes, and persist bounded origin metadata only in the new attempt. Ordinary replay verifies the immutable witness hash and run/owner/namespace/plan/share linkage plus current directory identity. Dependency inputs are still freshly fingerprinted and strict resource equality remains unchanged. Missing or changed provenance, replaced metadata and another device transition refuse.

Validation covers old receipt byte preservation, new-source metadata round trip, ordinary replay, changed lock/environment/host/command inputs, wrong cache/plan/origin, missing/pending sidecars, replaced Git metadata and a further device transition. Pinned formatting, warnings-denied Clippy in default/all-feature configurations, staged privacy scan and focused checks passed. Exact-head full suites passed 968/1,054 tests (62/84 opt-in tests ignored). The signed Apple Silicon bundle passed all checksum and strict code-signature checks, and the retained restore selection succeeds with unchanged original Owner/graph/witness hashes and six clear dependency slots. Normal Event Agent startup is running; application, data readback and browser acceptance remain open. This PR is draft until those native gates are checked.

Depends on #110 and the retained recovery chain through #105. Base: next. Release signal: fix in the opt-in native candidate; older binaries may refuse the new optional source metadata. No publication change.

@roodboi

roodboi commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by merged #122. This PR’s source was incorporated through #122, squash commit cf4b6e9. Independent acceptance remains in Linear. Closing as superseded; branches and worktrees are retained.

@roodboi roodboi closed this Oct 4, 2026
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