Skip to content

fix(release): make Codra CLI workflow resilient to scarce macOS runners#28

Merged
Abdulmuiz44 merged 1 commit into
mainfrom
fix/codra-release-workflow-runner-resilience
Jun 2, 2026
Merged

fix(release): make Codra CLI workflow resilient to scarce macOS runners#28
Abdulmuiz44 merged 1 commit into
mainfrom
fix/codra-release-workflow-runner-resilience

Conversation

@Abdulmuiz44
Copy link
Copy Markdown
Collaborator

  • Makes darwin-x64 optional for release dry runs.
  • Adds timeout protection for platform build jobs.
  • Allows partial binary packaging for publish=false verification.
  • Keeps npm publishing guarded and disabled by default.
  • Preserves full binary safety for real publishing.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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: ff292eab04

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

env:
CODRA_USE_ARTIFACTS: '1'
CODRA_ARTIFACTS_DIR: ${{ github.workspace }}/packages/codra-npm-cli/artifacts
CODRA_ALLOW_PARTIAL_BINARIES: ${{ needs.resolve-matrix.outputs.allow_partial }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Align publish packaging with the selected matrix

When publish=true and the default include_darwin_x64=false is used, this passes CODRA_ALLOW_PARTIAL_BINARIES=0 into build-platform-binaries.js, whose TARGETS array still includes codra-darwin-x64; because that artifact was never built/downloaded, the package job exits before validation/publish. This contradicts the new selected-matrix policy and makes the default guarded publish path unusable unless maintainers either include the scarce Intel macOS runner or explicitly allow a partial publish.

Useful? React with 👍 / 👎.

@@ -67,7 +109,7 @@ jobs:

package-npm:
name: Package @codra/cli npm tarball
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 Let dry-run packaging execute after failed shards

Under GitHub Actions needs semantics, if any selected build-binaries matrix job times out or fails, package-npm is skipped unless the job has an if condition such as always(). That means the new dry-run partial-binary mode never gets a chance to package the artifacts from successful shards, so a scarce runner timeout still aborts verification instead of producing the intended partial tarball.

Useful? React with 👍 / 👎.

working-directory: packages/codra-npm-cli
env:
CODRA_EXPECT_ALL_PLATFORMS: '1'
CODRA_EXPECT_PLATFORMS: ${{ needs.resolve-matrix.outputs.expect_all_pack == '1' && needs.resolve-matrix.outputs.expected_platforms || '' }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve partial mode during pack validation

In the default dry-run path (publish=false, include_darwin_x64=false), the earlier artifact packaging step succeeds with CODRA_ALLOW_PARTIAL_BINARIES=1, but npm test later removes bin/native and rebuilds only the host binary; this validation step then runs npm pack --dry-run, whose prepack sees the downloaded artifacts directory and invokes build-platform-binaries.js without the partial flag. Since codra-darwin-x64 was intentionally not built, validation fails before the tarball can be checked, so the new default dry run is still blocked by the optional Intel macOS artifact.

Useful? React with 👍 / 👎.

@Abdulmuiz44 Abdulmuiz44 merged commit b4b3eef into main Jun 2, 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.

1 participant