Skip to content

fix(release): restore Super macOS CI - #3

Merged
slashdevcorpse merged 4 commits into
mainfrom
fix/super-macos-disabled-updates
Jul 19, 2026
Merged

fix(release): restore Super macOS CI#3
slashdevcorpse merged 4 commits into
mainfrom
fix/super-macos-disabled-updates

Conversation

@slashdevcorpse

@slashdevcorpse slashdevcorpse commented Jul 19, 2026

Copy link
Copy Markdown
Owner

What Changed

  • Skip macOS updater ZIP finalization only when desktop updates are disabled.
  • Preserve AppSnap staging, DMG and ZIP packaging, and enabled-update manifest validation.
  • Supervise the resolved Electron executable with bounded process-tree teardown.
  • Use a dedicated POSIX process group with graceful TERM, forced KILL, and proof that teardown reached the force stage even when the leader closes first.
  • Use asynchronous, time-bounded Windows taskkill /T /F and require tree confirmation.
  • Capture output through close, fail on premature exit or backend startup errors, and enforce an independent 15-second deadline.
  • Remove VITE_DEV_SERVER_URL case-insensitively from the smoke environment.
  • Add focused policy and lifecycle regressions.

Why

Super Synara intentionally disables updates, so electron-builder emits no macOS update manifest. The artifact builder nevertheless ran the updater-only ZIP finalizer and failed after producing the DMG and ZIP.

After that repair, the macOS job exposed a separate pre-existing smoke teardown defect: the old script killed only the CLI wrapper and waited forever while Electron and its helpers remained alive. A first bounded supervisor still allowed a POSIX helper to escape when the leader closed after TERM; the final implementation keeps the group teardown alive through KILL. The Windows smoke path also inherited an empty dev-server URL and could treat a backend startup failure as a pass.

This keeps updater validation strict for normal builds while making disabled-update packaging and cross-platform smoke teardown deterministic.

Impact

Protected CI can build the unsigned Super Synara DMG without weakening normal updater validation, and desktop smoke checks now terminate the complete process tree within a fixed bound on macOS and Windows.

Validation

  • mac artifact policy coverage passed.
  • Focused desktop smoke lifecycle suite: 20/20.
  • Full desktop suite: 33 files, 306/306 tests.
  • Real resolved-Electron Windows smoke passed with an isolated home and deliberately mixed-case dev-server environment key; no process remained tied to that home.
  • Exact-file formatting, Node syntax, and diff checks passed.
  • Independent lifecycle review: SHIP, no mandatory corrections.
  • CodeRabbit: no actionable comments.
  • Cubic: all reported issues addressed.
  • Hosted CI on d69f252e: quality, windows_x64, macos_arm64, and release_smoke all passed: https://github.com/slashdevcorpse/synara/actions/runs/29697049171

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Screenshots are not applicable because this PR has no UI changes
  • Video is not applicable because this PR has no animation or interaction changes

Summary by CodeRabbit

  • New Features
    • Added a new desktop smoke-test lifecycle utility with spawn supervision, observation windows, graceful shutdown, forced cleanup, fatal-output detection, and teardown diagnostics.
    • Improved Electron executable discovery and delegated process setup/supervision for more consistent smoke runs.
  • Bug Fixes
    • Mac update ZIP finalization now occurs only when updates are enabled.
  • Tests
    • Added/expanded automated coverage for smoke supervision edge cases and mac artifact-finalization policy behavior.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

The pull request adds a reusable Electron smoke-process supervisor with timed observation, graceful and forced teardown, output diagnostics, POSIX and Windows handling, and lifecycle tests. It also makes macOS update ZIP finalization conditional on updates being enabled.

Desktop smoke lifecycle

Layer / File(s) Summary
Smoke environment and entrypoint wiring
apps/desktop/scripts/smoke-test-lifecycle.mjs, apps/desktop/scripts/smoke-test.mjs
Adds smoke-test configuration, filters the child environment, resolves Electron through ESM-compatible require, and delegates process handling to the supervisor.
Process supervision and teardown
apps/desktop/scripts/smoke-test-lifecycle.mjs
Handles observation timing, output capture, lifecycle events, POSIX signals, Windows tree termination, teardown diagnostics, and hard-deadline settlement.
Lifecycle behavior validation
apps/desktop/scripts/smoke-test.test.mjs
Tests environment handling, process failures, output capture, signal escalation, Windows confirmation, deadlines, diagnostics, and duplicate events.

Desktop artifact finalization

Layer / File(s) Summary
Conditional macOS ZIP finalization
scripts/lib/desktop-artifact-policy.ts, scripts/build-desktop-artifact.ts, scripts/lib/desktop-artifact-policy.test.ts
Adds and applies shouldFinalizeMacUpdateZip, returning true only for macOS builds with updates enabled, with unit coverage.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SmokeTest
  participant Electron
  participant Supervisor
  participant Taskkill
  SmokeTest->>Electron: Spawn with filtered smoke environment
  SmokeTest->>Supervisor: Supervise child process
  Electron-->>Supervisor: Emit output and lifecycle events
  Supervisor->>Electron: Send graceful or forced signal
  Supervisor->>Taskkill: Terminate Windows process tree
  Taskkill-->>Supervisor: Return teardown confirmation
  Supervisor-->>SmokeTest: Return status, output, failures, diagnostics
Loading
🚥 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
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.
Title check ✅ Passed The title is concise and matches the main release fix to restore macOS CI.
Description check ✅ Passed The description covers what changed, why, and checklist items; the UI section is reasonably omitted as not applicable.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@slashdevcorpse slashdevcorpse changed the title fix(release): skip disabled mac updater finalization fix(release): restore Super macOS CI Jul 19, 2026
@slashdevcorpse
slashdevcorpse marked this pull request as ready for review July 19, 2026 17:22

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/desktop/scripts/smoke-test-lifecycle.mjs Outdated
@slashdevcorpse
slashdevcorpse merged commit 760f4f0 into main Jul 19, 2026
7 checks passed
@slashdevcorpse
slashdevcorpse deleted the fix/super-macos-disabled-updates branch July 19, 2026 17:45
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