Repository navigation
Conversation
… and the record types on neutral ground The sealer interface, the safeStorage interface, the e2e custody facts and the two format constants live in src/shared/connectors/sealer.ts; the record types move to src/shared/connectors/oauth-types.ts and O10's backup exclusion helper to src/shared/fs/ (git mv), so main's legacy reader and the services library share them without importing each other (D20, D5). The store writes sealer.format on line 1 and hands the sealer the connection id; a file of another format stays unreadable, read without the sealer, and list() reads every format line before it asks for availability. The Electron sealer names maws-connector-oauth/1 and the e2e guard keeps its sealer's format, so main's store still writes v1: no behaviour changes. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
src/services/connectors/custody.ts: fileKeyCustody(directory), a ConnectorOAuthSealer of format maws-connector-oauth/2 over <directory>/key, 32 random bytes made on first use at an O_EXCL|O_NOFOLLOW temporary linked into place (one key under racing first uses, never a short one after a crash), 0600 in the 0700 directory, the directory excluded from Time Machine once before the key is linked and key.excluded recording it. A key of another mode, a link, another uid's, not a regular file or of the wrong length is refused, never replaced. Seals AES-256-GCM, a fresh 12-byte nonce, the connection id as associated data. Nothing imports it until M2. The store over it is pinned in main's store suite (format 2, a copy under another id unreadable, a profile's format 1 files listed unreadable with no key made). Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
src/main/connectors/legacy-custody.ts: listLegacy(directory) names the format 1 files from their first line,
with no sealer; adoptLegacy({directory, sealer, adopt, log}) asks the sealer's availability once, opens each
format 1 record and hands it to the injected adopt, never writing or deleting a file, and logs the counts. It
stops at the first record the sealer cannot open while none has opened (a denied Keychain is not retried in
the launch); once one has opened, a failure is that record's damage and the pass goes on. Nothing composes it
until M2.
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…s format; a key removed as it was linked refuses as missing Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… creation, the exclusion retried while unmarked, the store-over-custody cases' home); §B and M2's Touches name where the Electron sealer lives Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ion's pass, D34's retry a no-op off darwin and never failing the key (the architect's answers) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…d while key.excluded is absent (D34) An existing key with no marker gets the exclusion asked once per custody instance, at its first key read, and the marker written on a true answer; with the marker present it is never asked. A false or failed answer is logged and the key is still made or used. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…exclusion that throws never fails the key adoptLegacy seals and opens a fixed probe through the given sealer after available(): a failed round trip (a throw or a different text) stops the pass with every record left and none opened; after a passing probe a record that does not open is that file's damage, left unopened wherever it sorts, and the pass goes on (D32's rule replaced). The custody catches a synchronous throw from excludeFromBackup as it does a rejection, and a test pins the default helper as a no-op off darwin (nothing spawned, no marker). Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…can's generic-api-key rule does not read it as a key Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ped, by the adoption readLegacy tells a file gone or no longer format 1 (forgotten or adopted since the listing: skipped) from one that still starts with the format 1 line but whose envelope is not the store's (no body, a line too many, over the store's bound): left under its own reason, malformed, never handed to the sealer. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS 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.
P5 O4 M1: route D's grant custody (U7), built as library code
This is M1 of
docs/doperpowers/plans/2026-10-31-p5-o4-services.md, the first milestone of P5's child O4. Behaviour does not change: nothing composes the new modules yet, the wire is untouched, and main still writes format 1 under Electron'ssafeStorage.src/services/connectors/custody.ts.fileKeyCustody(directory)keeps route D's grants under a 32-byte key file that the machine holds.O_CREAT|O_EXCL|O_NOFOLLOW, mode 0600) and linked into place.src/shared/fs/backup-exclusion.ts. While thekey.excludedmarker is absent it is retried once per load. It is a no-op off darwin, and a failure never fails the key.src/main/connectors/oauth-store.ts. The store writes line 1 as the format its sealer names (Electron/1, the file key/2). A file of another format readsunreadable, as before.list()reads formats before it asks the sealer, so foreign files are listed without one.src/main/connectors/legacy-custody.ts.listLegacyandadoptLegacyform a one-pass adoption driver.available(), then runs a probe round trip through the sealer. A failed probe stops the pass.src/shared/connectors/{sealer,oauth-types}.ts. These are the shared contracts;oauth-typeswas moved withgit mv. Lint rules A and B hold.Validation Evidence
Class 1a is green on head
7b7061223(tree66c07bcc0426a6824ff3c0400e037f86e8810e63). Command:scripts/ci-gate.sh <wt> --gates static,unit,probes --class1a pool --runner macos --peer none. Result:ci-gate: run 41198687728 success, https://github.com/SSFSKIM/MAWS/actions/runs/41198687728. The jobsstatic,probesandunit 1/4to4/4all succeeded.The earlier run 41197010126 on
224b87d85failedstatic. The maws-app secret scan's generic-api-key rule read an import list inoauth-root.tsas a key. Commit438924398reorders the import.node --test .github/scripts/maws-app-scan.test.mjsthen passed 8 of 8 on the committed tree.Focused suites, run on the MacBook:
pnpm typecheckand eslint on the touched files exit 0.unit:darwinis not run. None of the 17 darwin-guarded unit files imports a changed module (checked by grep over their imports).Task review: Approved, with no Critical or Important findings. The reviewer read the custody as a credential store. Its one Minor, a malformed v1 file uncounted, is fixed in
7b7061223.Residue
None.
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)