Skip to content

fix(release): repair v0.3.1 artifact gates - #143

Merged
WellDunDun merged 1 commit into
mainfrom
codex/v0.3.1-release-hotfix
Jul 31, 2026
Merged

fix(release): repair v0.3.1 artifact gates#143
WellDunDun merged 1 commit into
mainfrom
codex/v0.3.1-release-hotfix

Conversation

@WellDunDun

Copy link
Copy Markdown
Collaborator

Repairs the v0.3.0 release blockers without rebinding the immutable tag: strips the electron-builder identity prefix while preserving full runtime trust pins; restores distinct generated self-host proof credentials and Compose interpolation; strengthens exact image and container hardening diagnostics; and gives the Windows wrong-origin preload readiness check a bounded 120-second window on the same process. Includes a patch changeset for v0.3.1. Focused release tests, Desktop typecheck and full unit suite, lint, format, shell syntax, publication-safety regression, and mirrored-source checks pass.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved macOS app signing by reliably selecting the correct signing identity.
    • Fixed self-hosted setup behavior by requiring a valid authentication token instead of using a placeholder.
    • Strengthened self-hosted container verification and authentication checks.
    • Improved Windows packaged-app startup checks with additional readiness time.
  • Chores
    • Added release validation coverage for signing, self-hosted security, authentication, and packaged-app startup behavior.

Walkthrough

Release artifact gates now validate self-host credentials and container security, normalize macOS signing identities, and extend Windows preload readiness timing. Tests cover the updated smoke scripts, Compose configuration, signing behavior, and packaged-app readiness.

Changes

Release artifact gates

Layer / File(s) Summary
Self-host image and credential proofs
.github/scripts/smoke-selfhost-image.sh, apps/selfhost/docker-compose.yml, tests/scripts/release-workflows.test.ts
The smoke gate generates distinct admin/member tokens, validates container image and security metadata, improves failure diagnostics, and tests required authentication configuration.
macOS signing identity normalization
apps/desktop/desktop-builder-config.ts, apps/desktop/src/main/desktop-builder-config.test.ts
macOS signing removes the Developer ID Application prefix before configuring the identity, with updated assertions for the normalized value.
Windows preload readiness window
apps/desktop/scripts/smoke-packaged.ts, tests/scripts/release-workflows.test.ts, .changeset/release-artifact-gates.md
Preload readiness accepts a timeout and uses 120 seconds for Windows; release coverage verifies the platform-specific wrong-origin probe timing.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses valid conventional commit syntax with the required fix prefix and accurately summarizes the artifact-gate repairs.
Description check ✅ Passed The description directly explains the release-gate fixes, affected components, tests, and v0.3.1 changeset.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/v0.3.1-release-hotfix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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: 1

🤖 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 `@tests/scripts/release-workflows.test.ts`:
- Around line 384-396: Extend the release workflow tests around the existing
self-host smoke assertions and the related coverage near the later referenced
block with executable negative-path cases, not only string-presence checks. Add
isolated tests using mocked Docker/Compose inputs or extracted testable helpers
to verify invalid and duplicate credentials, missing authentication
configuration, image or security mismatches, and wrong-origin readiness failures
return the expected exit status and diagnostics.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 61b95425-5936-4bdb-8979-be5628945375

📥 Commits

Reviewing files that changed from the base of the PR and between 77a05eb and 6699936.

📒 Files selected for processing (7)
  • .changeset/release-artifact-gates.md
  • .github/scripts/smoke-selfhost-image.sh
  • apps/desktop/desktop-builder-config.ts
  • apps/desktop/scripts/smoke-packaged.ts
  • apps/desktop/src/main/desktop-builder-config.test.ts
  • apps/selfhost/docker-compose.yml
  • tests/scripts/release-workflows.test.ts

Comment on lines +384 to +396
expect(selfhostSmoke).toContain("docker image inspect --format '{{.Id}}'");
expect(selfhostSmoke).toContain("docker inspect --format '{{.Image}}'");
expect(selfhostSmoke).toContain("read -r token < <(openssl rand -hex 32)");
expect(selfhostSmoke).toContain("read -r member_token < <(openssl rand -hex 32)");
expect(selfhostSmoke).toContain('[[ "$token" == "$member_token" ]]');
expect(selfhostSmoke).not.toContain("TOKEN_PLACEHOLDER");
expect(selfhostSmoke).toContain("length == 1");
expect(selfhostSmoke).toContain('.[0] == "no-new-privileges:true"');
expect(selfhostSmoke).toContain("Self-host image proof failed");
expect(selfhostCompose).toContain(
"SELFTUNE_AUTH_TOKEN: ${SELFTUNE_AUTH_TOKEN:?Generate a token with openssl rand -hex 32 and set SELFTUNE_AUTH_TOKEN in .env}",
);
expect(selfhostCompose).not.toContain("SELFTUNE_AUTH_TOKEN_PLACEHOLDER");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Add executable error-path coverage.

These assertions only prove source strings exist; they do not prove invalid or duplicate credentials, missing authentication configuration, image/security mismatches, or wrong-origin readiness failures produce the expected exit status and diagnostics. Add isolated negative-path tests with mocked Docker/Compose inputs or testable helper extraction.

As per path instructions, tests under tests/**/*.ts must cover error paths, not just happy paths.

Also applies to: 493-501

🤖 Prompt for 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.

In `@tests/scripts/release-workflows.test.ts` around lines 384 - 396, Extend the
release workflow tests around the existing self-host smoke assertions and the
related coverage near the later referenced block with executable negative-path
cases, not only string-presence checks. Add isolated tests using mocked
Docker/Compose inputs or extracted testable helpers to verify invalid and
duplicate credentials, missing authentication configuration, image or security
mismatches, and wrong-origin readiness failures return the expected exit status
and diagnostics.

Source: Path instructions

@WellDunDun
WellDunDun merged commit b353bc5 into main Jul 31, 2026
18 checks passed
@WellDunDun
WellDunDun deleted the codex/v0.3.1-release-hotfix branch July 31, 2026 00:33
@github-actions github-actions Bot mentioned this pull request Jul 31, 2026
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