Repository navigation
P5 O10 follow-up: the device's keys out of Time Machine, with a creation mark for O8 - #244
Merged
Merged
Conversation
Every load sets NSURLIsExcludedFromBackupKey on the device directory, before a first load writes keys.json, through osascript's Objective-C bridge (no prompt; tmutil waits on backupd, 11 s a call here). macOS only; a failure is logged in one line and the load goes on. O10 Decision Log entry added. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…BackupAtCreation, for O8) keys.json carries excludedFromBackupAtCreation: true only when the device/ exclusion was set before the keys were made; an older key, one made while the exclusion failed, or one made off macOS has no mark, and a later exclusion never adds it. DeviceKeys returns it for O8, which re-registers an unmarked key before it can be an org root. O10 Decision Log entry added. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…fter -- A relative path beginning -e was read as one more script, whose own run could answer true for a directory never excluded and so give new keys the creation mark (review finding). Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SSFSKIM
added a commit
that referenced
this pull request
Oct 28, 2026
…8 reads excludedFromBackupAtCreation Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 28, 2026
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook) # Conflicts: # docs/doperpowers/plans/2026-10-27-p5-o10-endpoint.md
SSFSKIM
added a commit
that referenced
this pull request
Oct 28, 2026
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
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.
A P5 O10 follow-up for O8. This keeps the device's key directory out of Time Machine, and records in
keys.jsonwhether the keys were created after that exclusion was in place.Why
Under O8, the app's device becomes an org root. The org's recovery key is the root's backup (remote layer Decision Log 28), so the root key must not also be backed up by Time Machine. A key created before this change may already be in a backup. O8 makes such a key re-register before it can become a root, and it reads the mark added here to decide.
What it does
src/main/device/backup-exclusion.ts.NSURLIsExcludedFromBackupKeyon<profile>/device/through osascript's Objective-C bridge. This sends no Apple Event and raises no TCC or admin prompt.-l JavaScript -e <script> -- <absolute path>, so a path that starts with-eis passed as data, not as script.loadDeviceKeysapplies the exclusion on every load.excludedFromBackupAtCreation: trueis the field O8 reads.keys.jsonand is returned asDeviceKeys.excludedFromBackupAtCreation.false, and an existing file never gains it.versionstays 1.tmutil addexclusion:tmutil addexclusiontook 11 s per call on this Mac. osascript sets the same attribute in about 0.1 s.Validation Evidence
--, osascript took a-e…path as script, so a crafted path could earn the mark with no exclusion. That was fixed in4a3e9549b, with argv and real-osascript regressions. Re-review: "correct — No material findings".ci-gate.sh <wt> --gates static,unit,probes --class1a pool):e951c0337: GREEN, https://github.com/SSFSKIM/MAWS/actions/runs/406164813504a3e9549b: GREEN, https://github.com/SSFSKIM/MAWS/actions/runs/40617747688src/main/device/backup-exclusion.test.ts: 7/7. Real osascript runs on scratch directories on macOS; the call is stubbed elsewhere.keys.test.ts: 23/23.step-up.test.ts: 15/15.pnpm typecheckand eslint are clean.Residue
loadDeviceKeyshas no production caller on master yet, so the app doesn't run this until the caller lands (M10 or O8).Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)