Skip to content

fix(release): make RC updater proof Bash 3.2 safe - #712

Merged
100yenadmin merged 5 commits into
evaos/beta-rc-20260612from
codex/v2136-rc-shell-guard
Jul 15, 2026
Merged

fix(release): make RC updater proof Bash 3.2 safe#712
100yenadmin merged 5 commits into
evaos/beta-rc-20260612from
codex/v2136-rc-shell-guard

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Pull Request

Description

Fix the v2.1.36 RC workflow failure observed in run 29427128970. macOS Bash 3.2 recursively tokenized the updater-ZIP Node heredoc while it was nested inside command substitution and stopped with unexpected EOF while looking for matching '"' before any candidate installation.

The workflow now writes both Node-derived updater values to runner-temp files and reads them after each heredoc completes. The release gate rejects restoration of either unsafe updater command-substitution heredoc.

Related Issues

Type of Change

  • fix - Bug fix (non-breaking change which fixes an issue)
  • feat - New feature (non-breaking change which adds functionality)
  • perf - Performance improvement
  • refactor - Code restructuring (no behavior change)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • docs - Documentation update

Atomic PR Checklist (Rule 1)

  • This PR contains exactly one feature or bug fix that cannot be further decomposed
  • The PR title follows Conventional Commit format: <type>(<scope>): <subject> in English

Local Checks (Rule 2)

  • oxfmt --check passes for all three changed files
  • Targeted oxlint reports 0 errors; 6 unrelated pre-existing test warnings remain
  • bunx tsc --noEmit - deferred to canonical remote CI
  • Focused release-gate test: 74 passed
  • i18n: N/A; no renderer, locale, or user-facing text changed
  • New or changed user-facing text: N/A
  • git diff --check passes

Runtime Verification

  • Verified on macOS: the exact updater proof shell block passes /bin/bash -n under Apple Bash 3.2.57
  • Verified on Windows: N/A; macOS-only release workflow
  • Verified on Linux: remote CI pending
  • I have performed a self-review of my own code

Agent Handoff

  • Source repos: 100yenadmin/evaOS-GUI
  • Systems touched: source branch only; no release, customer, staging, or Mac mutation in this PR
  • Modules/files: .github/workflows/evaos-beta-rc-canary.yml, scripts/evaosBetaReleaseGate.js, tests/unit/process/evaosBetaReleaseGate.test.ts
  • Contracts: preserve exact v2.1.36 tag/manifest/fallback verification; only change shell-safe value transfer inside the updater proof step
  • Dependencies: RC tag evaos-beta-v2.1.36-evaos-beta.1; trusted manifest run 29426424984
  • Non-goals: no Workbench product changes, connector changes, Mac Access extraction, helper identity changes, publication, or customer runtime work
  • Mutation boundary: merge only after exact-head CI and review are clean; rerun RC after merge from the superseding beta head
  • Proof path: failed RC 29427128970; local Bash syntax proof; focused 74-test release-gate suite
  • Rollback: revert this PR; the draft remains unpublished and both publication switches remain false
  • Confidence gate:
    • Primitive canary
    • Scenario canary - pending merged-head RC rerun
    • Negative-path proof
    • Adversarial replay - pending exact-head review
    • Takeover packet

Screenshots

N/A.

Additional Context

The signed/notarized candidate assets and trusted manifest validated before the failing step. No candidate app was installed during the failed run. The fix does not change artifact bytes or the release commit.


Thank you for contributing.

Summary by CodeRabbit

  • Bug Fixes

    • Improved updater verification reliability in the release workflow, particularly on macOS environments.
    • Added safeguards to detect unsupported shell patterns that could cause updater ZIP verification to fail.
  • Tests

    • Added coverage to confirm release checks identify both affected verification scenarios.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 49 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3564fed8-7721-4066-a6ca-0ece1a3c7f67

📥 Commits

Reviewing files that changed from the base of the PR and between 485237b and d952198.

📒 Files selected for processing (3)
  • .github/workflows/evaos-beta-rc-canary.yml
  • scripts/evaosBetaReleaseGate.js
  • tests/unit/process/evaosBetaReleaseGate.test.ts
📝 Walkthrough

Walkthrough

The RC canary workflow now exchanges updater ZIP verification values through temporary files. The release gate detects Bash 3.2-incompatible command-substitution-wrapped Node heredocs, and unit tests cover both updater ZIP name and checksum cases.

Changes

RC canary verification hardening

Layer / File(s) Summary
Stage updater verification values
.github/workflows/evaos-beta-rc-canary.yml
The workflow writes the arm64 updater ZIP name and trusted-manifest SHA256 to $RUNNER_TEMP files before reading them for checksum verification.
Audit and test heredoc compatibility
scripts/evaosBetaReleaseGate.js, tests/unit/process/evaosBetaReleaseGate.test.ts
The release gate flags command-substitution-wrapped updater ZIP Node heredocs, with tests covering ZIP name and expected SHA mutations.

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

Possibly related PRs

Suggested labels: area:release

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main release-gate fix and mentions Bash 3.2 safety.
Description check ✅ Passed It covers the fix, related work, change type, checks, and handoff notes, though a few template sections are renamed or omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/v2136-rc-shell-guard

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

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #712 - fix(release): make RC updater proof Bash 3.2 safe
Head: 485237b4a5669eb7c4e21e50b7ca03407acbad9a
Updated: 2026-07-15T15:26:30.893Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #712

Review URL: #712 (review)

@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #712 - fix(release): make RC updater proof Bash 3.2 safe
Head: 485237b4a5669eb7c4e21e50b7ca03407acbad9a into evaos/beta-rc-20260612. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 1/5 (~16 min)

Changed Files

File Status Churn Purpose Risk
.github/workflows/evaos-beta-rc-canary.yml modified +10/-8 Changed file Low
scripts/evaosBetaReleaseGate.js modified +11/-0 Changed file Moderate: validated P3 finding
tests/unit/process/evaosBetaReleaseGate.test.ts modified +12/-0 Test coverage Low

Review Signal

Validated inline findings: 1 (P0: 0, P1: 0, P2: 0, P3: 1).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Release regression: 1

Validation and Proof

2 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 1 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Do not ask for broad local suites when remote CI or fast-smoke proof is the right gate.
    Profile proof expectations: Look for focused app smoke, packaged resource checks, or CI artifact proof when relevant.

Related Context

Related issues/PRs: #711.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: apps/eva-desktop-mac/** - Check macOS identity, helper path, TCC identity, and packaged resource shape risk.
  • Path instructions: scripts/** - Treat release, packaging, and artifact-shape changes as high risk.
  • Label suggestions: workbench, macos, regression-hardening
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread scripts/evaosBetaReleaseGate.js Outdated
@coderabbitai coderabbitai Bot added the area:release Packaging, signing, updater, rollback label Jul 15, 2026
@100yenadmin

Copy link
Copy Markdown
Owner Author

Release-manager note: the distribution gate binds the selected successful RC run head SHA to the exact release commit. Therefore the existing unpublished .1 candidate at 42c8a872a0103551e5fa841c5f969af15fdd641e must remain immutable and cannot be the final publishable candidate after this PR merges. If #712 lands, mint .2 from its exact merge SHA, rebuild/sign/notarize the arm64 assets, register a new trusted manifest, and run RC at that exact head. Do not move or reuse .1, and do not weaken the exact-head distribution check.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/evaos-beta-rc-canary.yml:
- Around line 339-342: Normalize the validated digest before writing it in the
trusted-manifest handling block: after the existing SHA-256 format check,
convert asset.sha256 to lowercase and pass that normalized value to
fs.writeFileSync. Keep the case-insensitive validation and asset binding
behavior unchanged.

In `@scripts/evaosBetaReleaseGate.js`:
- Around line 925-930: Update the heredoc detection in the workflow validation
around workflowText to use regex matching rather than exact includes strings,
tolerating whitespace between `$(` and `node` and across multiline formatting
while still identifying both ZIP_NAME and EXPECTED_SHA shell assignments. Add a
regression case covering formatted variants, and keep JavaScript
Oxfmt/Prettier-compatible with single quotes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c6eab8b1-3509-40f7-b9b0-0290ce416dd7

📥 Commits

Reviewing files that changed from the base of the PR and between 42c8a87 and 485237b.

📒 Files selected for processing (3)
  • .github/workflows/evaos-beta-rc-canary.yml
  • scripts/evaosBetaReleaseGate.js
  • tests/unit/process/evaosBetaReleaseGate.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Build Test (macos-arm64)
  • GitHub Check: Coverage Test
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,jsx,ts,tsx}: Name utility files using camelCase, such as formatDate.ts.
Prefix unused parameters with _.
Format code with Oxfmt using Prettier-compatible rules: inline single-element arrays that fit on one line, require trailing commas in multiline arrays and objects, and use single quotes for strings.

Files:

  • scripts/evaosBetaReleaseGate.js
  • tests/unit/process/evaosBetaReleaseGate.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use strict TypeScript; do not use any and do not leave implicit returns.
Use the path aliases @/*, @process/*, and @renderer/*.
Prefer type over interface according to the Oxlint configuration.
Write code comments in English and use JSDoc for public functions.

Files:

  • tests/unit/process/evaosBetaReleaseGate.test.ts
**/*.{test,spec}.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Vitest 4 for tests and maintain at least 80% coverage.

Files:

  • tests/unit/process/evaosBetaReleaseGate.test.ts
🔇 Additional comments (2)
.github/workflows/evaos-beta-rc-canary.yml (1)

308-311: LGTM!

Also applies to: 325-338, 343-344

tests/unit/process/evaosBetaReleaseGate.test.ts (1)

1139-1156: LGTM!

Comment thread .github/workflows/evaos-beta-rc-canary.yml Outdated
Comment thread scripts/evaosBetaReleaseGate.js Outdated
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #712 - fix(release): make RC updater proof Bash 3.2 safe
Head: d9521980cff9e4d6c955a02e2b60a90cbce6d73f
Updated: 2026-07-15T15:35:43.723Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #712

Review URL: #712 (review)

@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #712 - fix(release): make RC updater proof Bash 3.2 safe
Head: d9521980cff9e4d6c955a02e2b60a90cbce6d73f into evaos/beta-rc-20260612. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 1/5 (~16 min)

Changed Files

File Status Churn Purpose Risk
.github/workflows/evaos-beta-rc-canary.yml modified +10/-8 Changed file Low
scripts/evaosBetaReleaseGate.js modified +8/-0 Changed file Low
tests/unit/process/evaosBetaReleaseGate.test.ts modified +23/-0 Test coverage Low

Review Signal

No validated inline findings.
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

No finding categories.

Validation and Proof

2 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 1 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Do not ask for broad local suites when remote CI or fast-smoke proof is the right gate.
    Profile proof expectations: Look for focused app smoke, packaged resource checks, or CI artifact proof when relevant.

Related Context

Related issues/PRs: #711.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: apps/eva-desktop-mac/** - Check macOS identity, helper path, TCC identity, and packaged resource shape risk.
  • Path instructions: scripts/** - Treat release, packaging, and artifact-shape changes as high risk.
  • Label suggestions: workbench, macos, regression-hardening
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

@100yenadmin
100yenadmin merged commit f7780d8 into evaos/beta-rc-20260612 Jul 15, 2026
12 checks passed
@100yenadmin

Copy link
Copy Markdown
Owner Author

v2.1.36 beta.2 local-finalization proof (publication remains fail-closed):

  • Exact source/tag: f7780d8c649bc25534471516c019acdc7b8e2073 / evaos-beta-v2.1.36-evaos-beta.2
  • Functional Smoke: run 29429078726, success at exact source
  • Build and Release: run 29429687274, success, manual macos-arm64 build with local DMG finalization; tag/release jobs skipped
  • Apple DMG notarization: 8c9bd63a-0ce7-4186-989c-7774cef6eac5, Accepted
  • Final hashes:
    • DMG: adac473c8489ca090ccf487b51a1ec213fb391937c7a2992d576f68a89fbc5af
    • updater ZIP: 76e0cc88cb97aadb7b39bb55398ccfbdb37a414126fb3bb5e912a475ff456418
    • latest-arm64-mac.yml: 5cf20b8cc11968f6d7fa89f664d4b79cb91243b5df0b9c0c72cccccd9d6f055d
  • Independently recomputed updater contract: both YAML SHA-512 entries match the untouched 387,510,746-byte ZIP.
  • Final DMG, mounted-DMG app, and updater-ZIP app separately pass codesign, stapler, and Gatekeeper. Both apps are com.evaos.workbench version/build 2.1.36, source f7780d8c..., CDHash 957a1d0ed12a44c9cf144c2c7dd1dde05eb5d0c0, with bundled Python 3.12.13 and isolated PyObjC imports passing.
  • Draft prerelease RE_kwDOSthnRM4VIjM8 is targeted at exact source and has exactly the DMG, ZIP, and updater metadata pending trusted-manifest registration.
  • Both publication variables are false. This is artifact proof only, not public distribution or customer/runtime readiness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:release Packaging, signing, updater, rollback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant