Skip to content

Use stable machine identity for logbook locks (T48) - #210

Merged
erickb336 merged 1 commit into
mainfrom
codex/t48-stable-machine-lock
Oct 14, 2026
Merged

erickb336 merged 1 commit into
mainfrom
codex/t48-stable-machine-lock

Conversation

@erickb336

@erickb336 erickb336 commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Closes #101
Sage task T48

Sage identifies lock owners by a stable machine ID. A renamed machine can recover its dead lock; another machine with the same host name cannot lose its lock to local PID checks. The same rule protects waiting lock folders.

Linux reads its machine-id file; macOS reads IOPlatformUUID. Missing or invalid identity preserves new owners. Old records without the field keep the previous host-name rule. Test identity overrides work only in the Node test context and a canonical temporary directory.

This changes lock functions only. Claude PR #140's task, verdict and model changes remain separate.

Validation on 21ef64c8ed61f3bb577297046944f934fe07b21c:

  • npm run build: passed; generated provider copies committed.
  • npm run check: all checks pass.
  • Focused lock tests: tests 12, pass 12, fail 0.
  • Five new tests copied unchanged to detached main 0f9df78: tests 5, pass 0, fail 5. They fail behaviorally on renamed/same-name ownership, waiter cleanup, recorded identity and injection gates, unavailable identities, and simulated platform identity retrieval.
  • Seven simulated platform cases cover valid normalization, malformed IDs, failed lookups, and unsupported platforms. Hardware sources are intercepted before state loads.
  • Two clean code/security/QA review cycles on the unchanged final head.
  • npm test -- --test-concurrency=1: tests 1184, pass 1184, fail 0, cancelled 0, skipped 0.
  • Exact-head CI run 38500422153: tests 1184, pass 1184, fail 0.

Fake ps, pgrep and kill are first on PATH for every repository test. No real process list or machine ID was read. Real hardware retrieval and cross-machine shared-folder operation remain unverified.

@erickb336
erickb336 marked this pull request as ready for review October 14, 2026 02:28
@erickb336
erickb336 merged commit 748b267 into main Oct 14, 2026
1 check passed
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.

Lock: identify the machine by a stable id, so a host rename or a shared host name cannot block or break the logbook

1 participant