Skip to content

fix: explicitly repair native project mapping device identities - #98

Closed
roodboi wants to merge 4 commits into
nextfrom
codex/recover-project-mapping
Closed

roodboi wants to merge 4 commits into
nextfrom
codex/recover-project-mapping

Conversation

@roodboi

@roodboi roodboi commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

A macOS reboot can renumber the filesystem device while retaining directory paths and inodes. After explicit native provider recovery, the frontend project mapping still carries the old device numbers and refuses ordinary project commands.

Add a standalone Doctor inspection and explicitly selected repair:

hack-v5 doctor --path /absolute/project --branch instance --native-run-mapping inspect --json
hack-v5 doctor --path /absolute/project --branch instance --native-run-mapping repair --expect-selection <selectionSha256> --accept-legacy-device-rebind --json

The repair changes only the three scope device numbers. It preserves the run, owner, plan, branch and environment/profile selectors, retains a byte-exact private audit, and checks current native graph/share authority under restart and mapping locks. Stale selection, inode/path substitution, replacement locks, pending restart state and foreign native identity refuse publication. Ordinary mapping validation and Doctor --fix stay strict.

Validation:

  • Full CLI suite: 1,705 passed, 67 skipped, zero failed; both workspace tasks passed (DB cached).
  • Root check/typecheck, changed-file Biome, staged privacy check, generated CLI reference and current-branch build passed. Final typecheck reused the validated cache.
  • Official signed Apple Silicon bundle passed checksum and strict codesign verification.
  • Packaged M3 inspection, stale-selection refusal and selected repair passed on two retained Event Agent instances. Independent strict mapping loads succeeded afterward. Exactly three device fields changed per mapping; original audits, provider owner, other mappings, graph receipt hashes and both disk identities were preserved. Event Agent source/config remain clean.

Release signal: fix; optional explicit recovery capability, no automatic migration.

Dependencies: stacked on #96 and #97 while targeting protected next; this PR's new change is commit cb0302a. Land/restack in dependency order.

Limits: legacy original-volume continuity remains unproven and requires explicit acceptance. This metadata repair does not grant host socket/publisher cleanup authority, rewrite graph history, restart an application or establish browser/prerelease readiness. Those HACK-1210 gates remain open.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@roodboi
roodboi marked this pull request as ready for review September 30, 2026 04:46
@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