Skip to content

Add atomic installer and release cohorts - #37

Open
lynnswap wants to merge 7 commits into
codex/phk-generation-clifrom
codex/phk-installer-release
Open

Add atomic installer and release cohorts#37
lynnswap wants to merge 7 commits into
codex/phk-generation-clifrom
codex/phk-installer-release

Conversation

@lynnswap

@lynnswap lynnswap commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Purpose

Install the public command and both helpers as one validated, immutable cohort shared by source and release installs.

Changes

  • Add release manifests, source snapshots, content-addressed cohorts, atomic current switching, and recovery for interrupted legacy direct-layout migrations.
  • Add scripts to build, package, verify, and install the three-binary release cohort without falling back to stale artifacts.
  • Add the manually dispatched draft-release workflow with version and default-branch SHA validation.
  • Classify suffixed tags as prereleases, reject macOS versions below 14 before download, require a clean source snapshot, and atomically replace an exact release-asset set.
  • Treat root-level helpers left after a managed cohort migration as retired, non-authoritative artifacts so cleanup warnings do not block later installs.
  • Isolate simulator build scratch paths and reuse the shared SwiftPM path owner.

Testing

  • ./scripts/test-release-scripts.sh.
  • Final-stack swift test (310 tests in 32 suites).
  • Release build, package, verification, temporary install, and tamper-rejection smoke tests.
  • bash -n / sh -n for release scripts and templates.
  • shellcheck for release scripts and actionlint .github/workflows/release.yml.
  • External workflow actions verified as full-SHA pinned.
  • git diff --check.

@lynnswap lynnswap changed the title codex/phk installer release Add atomic installer and release cohorts Aug 9, 2026
@lynnswap
lynnswap marked this pull request as ready for review August 9, 2026 21:59

@chatgpt-codex-connector chatgpt-codex-connector Bot 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: a265eaf198

ℹ️ 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 .github/workflows/release.yml
Comment thread scripts/install-release.sh.in
Comment thread scripts/build-release.sh Outdated
@lynnswap
lynnswap force-pushed the codex/phk-installer-release branch from a265eaf to b120a09 Compare August 10, 2026 06:25

@lynnswap lynnswap left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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: b120a0942a

ℹ️ 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/package-release.sh Outdated
Comment thread Sources/PrivateHeaderKitInstall/LegacyInstallMigration.swift
Keep simulator cross-build state out of the host SwiftPM scratch so source installs and release builds cannot redirect the host debug or release convenience link to simulator products.
Use the Tooling-owned SwiftPM scratch convention so CLI and source installer cross-builds share one path invariant.
@lynnswap
lynnswap force-pushed the codex/phk-installer-release branch from b120a09 to 836186b Compare August 10, 2026 23:10

@lynnswap lynnswap left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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: 836186b0e2

ℹ️ 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 on lines +439 to +440
try fileManager.copyItem(at: layout.publicCommandURL, to: backupURL)
shouldRemoveBackup = true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make recovered backup publication restartable

If a migration is interrupted after rollback moves the original backup back to the public command, recovery enters this .absent branch; if recovery is then terminated after copyItem but before the updated identity is persisted, the copied backup survives while the intent still contains the old inode identity. Every subsequent run takes the .regularFile branch and rejects that otherwise valid backup, permanently blocking installation until manual cleanup. Publish the backup and intent in a restartable sequence, or recognize and adopt a recreated backup whose contents match the owned public command.

Useful? React with 👍 / 👎.

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