Skip to content

fix(ci): commit the Go release's guests 0644 in the build job too - #1175

Merged
coderdan merged 2 commits into
mainfrom
fix/go-release-guest-mode
Oct 12, 2026
Merged

coderdan merged 2 commits into
mainfrom
fix/go-release-guest-mode

Conversation

@coderdan

@coderdan coderdan commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The first Go module release, v0.1.0-alpha.1 (run 38258958016), stopped itself before pushing anything. The publish job only pushes a tag when the release commit it builds has exactly the git tree the build job tested. Here the trees differed only in file mode, so it refused. With this fix both jobs build the same tree, and the release can be dispatched again. No tag, release or proxy entry exists for the version, so 0.1.0-alpha.1 is still free.

Changes

  • .github/workflows/release-golang.yml: the build job's "Stage the release commit" step runs chmod 0644 on the guests before git add. Cargo writes the .wasm guests executable, so the build job committed them as 100755. The publish job writes them 0644 from the artifact, so it committed 100644. The bytes always matched (sha256sum -c passed in publish).
  • scripts/__tests__/go-release-artifact.test.mjs: a new test runs the real staging step, up to the tree it reports, on executable guests. It checks that the reported tree is the one publish builds. The existing tests checked only publish's side, against a tree they built at 100644 themselves, so they could not see this.

Verification

  • The new test passes with the fix and fails without it (expected '721ff3a…' to be 'f872a54…').
  • pnpm run test:scripts: 75 files pass. The other go-release-artifact cases skip on macOS (no mapfile in bash 3.2), as before.
  • actionlint passes on the workflow, and Biome is clean.

Related

Refs #1165, from which the alpha is cut.

https://claude.ai/code/session_01CA4pFfaN4DPNSTLnJVNxsu

Summary by CodeRabbit

  • Bug Fixes

    • Standardized file permissions for generated WASI guests during release staging, keeping release artifacts consistent.
  • Tests

    • Added coverage to verify that release staging produces the expected file tree when build outputs have executable permissions.

@changeset-bot

changeset-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8311bcd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c284566-b019-4fde-986d-a6e3db968884

📥 Commits

Reviewing files that changed from the base of the PR and between ff47eca and 8311bcd.


📒 Files selected for processing (2)
  • .github/workflows/release-golang.yml
  • scripts/__tests__/go-release-artifact.test.mjs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a8b81b1c-01f8-41ed-acee-9a8dfdd72d8f

📥 Commits

Reviewing files that changed from the base of the PR and between 92be6c0 and ff47eca.


📒 Files selected for processing (2)
  • .github/workflows/release-golang.yml
  • scripts/__tests__/go-release-artifact.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.



📝 Walkthrough
📝 Walkthrough

Walkthrough

The Go release build now sets its three generated WASI guests to mode 0644 before staging the release commit. An integration test checks the reported tree when build-output guests have executable mode.

Changes

Go release guest permissions

Layer / File(s) Summary
Normalize permissions and test staging
.github/workflows/release-golang.yml, scripts/__tests__/go-release-artifact.test.mjs
The build job sets the three guest files to mode 0644 before creating the tested release commit. The integration test runs the staging step with executable build outputs and compares the reported tree with the expected tree.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: tobyhede


Merge Risk: ⚪ Minimal · up to ff47e

This fixes the release build committing the Go guests as executable, which stopped the first release at the tree check. The change is small and tested, and no merge-blocking risk is apparent.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: committing the Go release guests with mode 0644 in the build job.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderdan
coderdan marked this pull request as ready for review October 12, 2026 14:08
@coderdan
coderdan requested a review from a team as a code owner October 12, 2026 14:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T14:11:21.707997Z ff47eca Draft marked ready
🔒 Security Review ✅ Completed 2026-10-12T14:11:21.951526Z ff47eca Draft marked ready
ℹ️ 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.

@cipherstash-agent cipherstash-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review attestation: automated /code-review medium plus /cross-check-review-findings on head ff47eca.

Findings: none. No critical or blocking issues.

Checked:

  • .github/workflows/release-golang.yml:212: chmod 0644 "${guests[@]}" runs before git add -f, so the build job commits the guests as 100644. That matches what publish writes from the artifact, so the two trees agree.
  • scripts/__tests__/go-release-artifact.test.mjs: the step id: stage and the fetched=$(mktemp -d) cut marker both exist in the workflow (line 200 and line 217). The test makes the guests 0755 and compares the reported tree with expectedTree(). It guards the regression, and the PR states it fails without the fix.
  • Scope is limited to the staged guests. No other file modes or release logic change.

I did not run the test suite here. I reviewed the diff and the surrounding workflow only.


Generated by Claude Code

@tobyhede tobyhede left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review attestation: files reviewed: .github/workflows/release-golang.yml, scripts/__tests__/go-release-artifact.test.mjs. Models: Sonnet 5.5 (claude-sonnet-5-5), single pass, no verifier.


Generated by Claude Code

Comment thread .github/workflows/release-golang.yml Outdated
Comment thread scripts/__tests__/go-release-artifact.test.mjs
The first release, v0.1.0-alpha.1, refused itself: publish's tree check
found 76409f6 where build had tested f274561. Cargo writes the .wasm
guests executable, and the build job committed them as they were
(100755), while publish writes them 0644 from the artifact (100644). The
bytes matched; only the mode differed. Nothing was pushed.

The build job now sets the guests to 0644 before it stages them, so both
jobs build the same tree. A test runs the real staging step on
executable guests and checks the tree it reports is the one publish
builds; it fails without the chmod.
… real publish step

Review follow-up. chmod made the two jobs agree only while both kept
writing the files 0644 by their own route. Both jobs now stage the
guests with git add --chmod=-x, so the committed mode is set in git
whatever either job left on disk.

The test no longer compares the build job's tree with a tree it builds
itself at 100644. It runs the build job's staging on executable guests,
then runs the real publish step on an executable artifact against the
tree the build job reported, and expects publish to accept it.
@coderdan
coderdan force-pushed the fix/go-release-guest-mode branch from ff47eca to 8311bcd Compare October 12, 2026 14:17

@auxesis auxesis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks @coderdan!

@coderdan
coderdan merged commit 576b898 into main Oct 12, 2026
28 checks passed
@coderdan
coderdan deleted the fix/go-release-guest-mode branch October 12, 2026 23:35
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.

4 participants