Skip to content

fix(lastcode): use portable updater locks - #47

Merged
lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/portable-update-locks
Aug 21, 2026
Merged

lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/portable-update-locks

Conversation

@lastobelus

Copy link
Copy Markdown
Owner

The LastCode local build and managed installer both depended on /usr/bin/lockf, which is absent on some supported macOS installations. That made updater serialization—and the repository's own guarded CI—fail before either operation could begin.

This centralizes both locks in one dependency-free helper using macOS O_EXLOCK | O_NONBLOCK. The process retains the file descriptor for the lock lifetime, so normal exit and process death release it in the kernel. Existing lock metadata remains available for contention diagnostics, and the standalone installer copies and validates the managed companion.

Part of #38.

Validation:

  • focused lock/install/local-update tests: 30 passed
  • real macOS child contention, captured-child SIGKILL, and immediate reacquisition
  • copied standalone installer --help smoke test
  • targeted lint and diff checks
  • guarded pnpm lastcode:ci:quick: passed

Authored with GPT-5.6 in the Codex harness. Reviewed with GPT-5.4 Codex.

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad7d18f9d2

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/lastcode-local-update.mjs Resolved
@lastobelus

ghost commented Aug 21, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

ghost commented Aug 21, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 01f5b142a9

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus merged commit ac6a612 into lastcode/main Aug 21, 2026
@lastobelus
lastobelus deleted the lastcode/portable-update-locks branch August 21, 2026 21:29
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