Skip to content

P5 O6: the machine ref and the identity file (the seam O2 shares) - #216

Merged
SSFSKIM merged 3 commits into
masterfrom
p5-o6-machine-ref
Oct 27, 2026
Merged

SSFSKIM merged 3 commits into
masterfrom
p5-o6-machine-ref

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 27, 2026

Copy link
Copy Markdown
Owner

The machine identity seam that O2's mawsd and O6's app share (P5 Decision Logs 27 and 44). O6 owns these modules, and they land on master ahead of O6's branch so that O2 imports them from master instead of keeping its own copy.

  • src/shared/machine/ref.ts: MachineRefSchema (RL5's [A-Za-z0-9_-]{16,64}) and MachineRef.
  • src/shared/machine/identity-file.ts: IDENTITY_FILE (machine.json in the profile's root), readMachineRef(profileDir) and readOrMintMachineRef(profileDir). The module imports nothing from Electron.
    • Minting draws 16 random bytes as 22 base64url characters. The JSON is written whole, looping over short writes, to machine.json.<pid>.<random> (0600) and fsynced. It is published with link, and EEXIST means another process won the race, so its file is read. The temporary file is removed on every path.
    • A stray temporary file of the minter's own shape that is older than 60 s is removed at the next mint.
    • A malformed file, or one whose ref breaks the format, throws an error naming the path and is never re-minted. A file of any positive version is read for its ref.
    • It creates the profile directory, because mawsd may be the first to run in a fresh profile.

These are commits ece0eb80a, 0de31b332 and 60116baf3 from p5-o6, cherry-picked unchanged. They touch these four files only. They were task-reviewed clean as part of O6's M1, across two fix rounds: a short write could publish a truncated file, and the mock's typing broke static.

Validation Evidence

  • Class 1a (static, unit, probes) at this branch's head add44da79: GREEN, run 40486420390 (scripts/ci-gate.sh <worktree> --gates static,unit,probes --class1a pool).
  • The same three commits are green on p5-o6 as well, at ae671bfd0: run 40486094807.
  • The focused suites run there: identity-file.test.ts 15/15 and ref.test.ts 2/2. They cover the race (a first minter paused before its link while a second mints), a malformed file refused, the format, the sweep, a short write and an injected ENOSPC.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…d its temporary file goes on any failure

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T10:15:37.068134Z add44da PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 6a45857 into master Oct 27, 2026
SSFSKIM added a commit that referenced this pull request Oct 27, 2026
…rubric; the two-build cross-minor check dispatched as a standing Mac e2e group, tracker row updated

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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