Skip to content

ci: Construct to Electron smoke tests on main, and the fixes they uncovered - #107

Open
Armaldio wants to merge 19 commits into
mainfrom
armaldio/ci-authenticated-ship
Open

Armaldio wants to merge 19 commits into
mainfrom
armaldio/ci-authenticated-ship

Conversation

@Armaldio

@Armaldio Armaldio commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a Construct → Electron smoke job to main and gets the long-unrun authenticated acceptance tests passing again on Linux, Windows and macOS. Getting them to run uncovered a real UI bug and a Desktop dev-mode bug, both fixed here.

Last full run (manual dispatch, all steps): green on all three OSes: https://github.com/CynToolkit/v2/actions/runs/45886048054

Product fixes

  • Workflow Configuration tab rendered blank (apps/ui/src/components/NotificationTargets.vue). definitionFor(editing.value!) ran while no notification was being edited and threw on target.provider whenever the catalog had notification providers, which wiped out the whole tab (source, destinations, notifications). Guarded, with a mount regression test that fails without the fix. Changeset: @pipelab/ui patch.
  • Desktop dev UI on a non-default port couldn't connect (apps/desktop/src/main/server-process.ts, server-entry.ts). The CLI server only accepted origin :5173. In development Desktop now passes its UI origin with --allowed-origin; the per-launch token is still enforced. Packaged builds are unaffected.
  • Dev UI force-reloaded on first visit to a workflow page (apps/ui/vite.config.ts). PrimeVue components that are auto-imported only on lazy routes (Column, DataTable, MultiSelect, Panel) are now pre-bundled.
  • Desktop no longer opens DevTools when PIPELAB_TEST_DESKTOP is set.

CI

  • Smoke Construct to Electron (job authenticated-local-release) runs after the CI gate on every push to main. It does a real Construct export → Electron build → local folder, then a second Ship that must keep the first run's history and artifacts, on Linux, Windows and macOS.
  • Manual dispatches (run_authenticated_local_ship) also cold-start Desktop twice to check run history and artifacts, and Ship through the Desktop wizard to a running game.
  • The OS jobs run one at a time (max-parallel: 1). They share one Construct test account, and a new sign-in can invalidate a session another job is exporting with.
  • Profile seeding uses full Chromium (the headless shell doesn't write Default/Preferences) and retries sign-in up to 3 times, logging only status codes.
  • CONSTRUCT_CI_USERNAME and CONSTRUCT_CI_PASSWORD repository secrets are set.

Test updates (stale since #148)

  • The live workflow gets an explicit Construct web build and a Folder destination. Build targets only run when something consumes them.
  • The Desktop wizard test launches Desktop with Playwright's _electron.launch (connectOverCDP no longer lists the BrowserWindow) and follows the current UI. Each step was checked locally against the real UI and CLI server.
  • The cold-start history check follows the current dashboard, run list and run page.
  • macOS game launch uses --use-mock-keychain and SwiftShader WebGL (CI Macs have no GPU).
  • Failure messages no longer print the per-launch session token.

Cost and risk

  • About 30+ minutes of runner time per push to main with the serial OS jobs. The alternative is one Construct test account per OS.
  • main goes red if the Construct account, its plan or Construct's editor changes. That's intended: this is the launch acceptance path.

Checks run

  • The full workflow passed on a manual dispatch (link above), including CI build, typecheck, lint and test.
  • apps/ui: new NotificationTargets test, which fails without the fix; UI typecheck.
  • apps/desktop: main-process tests (29/29); desktop typecheck.
  • Documentation build (contributing/development.md, contributing/ci-and-deployment.md).

🤖 Generated with Claude Code

…to main

Previously the job only ran on a manual dispatch with run_authenticated_local_ship.
It now also runs after the CI gate on pushes to main. Pull requests and develop
stay credential-free.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Editor preview: https://57a87637.pipelab.pages.dev/

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Website preview: https://6bf881b3.pipelab-website.pages.dev/

…ct web build

The planner no longer chains a Construct source straight into Electron, so the
fixture failed with 'Build electron-profile has no compatible input.' on every OS.
It now mirrors what the Ship wizard writes: a Construct web build that feeds the
Electron build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build targets only run when something consumes them. With no destinations the
run completed without producing Electron, and the test failed with 'Successful
run did not record an Electron build.' A local folder destination now consumes
the Electron target, which is what a real local Ship does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The default Playwright headless shell does not write Default/Preferences, so the
Construct export rejected the seeded profile. Seed with channel chromium, the
same browser the export uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every push to main ships the sample Construct project to Electron through the CLI
twice on Linux, Windows and macOS. The steps that drive the Desktop app (wizard
Ship and cold starts) now run on manual dispatches only until they pass reliably.
Linux Desktop runs set ELECTRON_DISABLE_SANDBOX, because Chromium ignores
--no-sandbox after pnpm's '--'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ory check

Once a run exists, the dashboard shows recent runs instead of workflow cards, so
the check timed out waiting for a workflow link. It now accepts any link into
the workflow and continues through the layout's Runs tab. Linux cold starts
also set ELECTRON_DISABLE_SANDBOX.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PrimeVueResolver auto-imports Column, DataTable, MultiSelect and Panel at
transform time, so Vite's dependency scanner missed them. Opening a workflow
page then re-optimized and force-reloaded the dev UI, which destroyed the
Desktop cold-start check's page ('WebFrame was removed').

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playwright's Electron launcher returns after Desktop has printed its startup
lines, so they never reach the collected output. Reaching the dashboard and
shipping through it already prove the CLI sidecar connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p server

The CLI server only accepted the default Vite origin (port 5173). With
PIPELAB_TEST_DESKTOP_UI_PORT, Desktop loaded the UI from another port and the
server rejected its WebSocket, so the UI showed 'Pipelab agent not connected'.
In development Desktop now passes the UI origin with --allowed-origin; the
per-launch token is still enforced.

The wizard test's dashboard error no longer prints the URL hash, which carries
the session token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Armaldio and others added 2 commits November 26, 2026 17:51
…dited

NotificationTargets read definitionFor(editing.value!) while nothing was being
edited, so setup threw on 'target.provider' whenever the catalog had notification
definitions, and the whole Configuration tab rendered blank. Guard both computed
fields and add a mount regression test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked locally against the UI and CLI: the dashboard heading is the project
name, the wizard dialog is 'New workflow', the wizard now creates the Electron
build for the host, the source button is 'Edit source', and the output folder is
set on the Folder destination's deployment. The saved-workflow check finds the
Electron build instead of assuming it is first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er answers

On macOS the produced game accepted the DevTools connection but never answered,
so one fetch stalled for minutes and the failure carried no detail. Each poll now
times out after 2 s, and the error names the process, pid, whether it is still
running and the last poll error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game was running and its DevTools port accepted connections without ever
answering: Chromium was blocked on the Safe Storage Keychain prompt, which no one
can answer on a CI Mac. Pass --use-mock-keychain on macOS, as Playwright does for
its own browsers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Report the URL, title, ready state, canvas and viewport sizes, visibility, recent
console messages and the game's output, instead of a bare waitForFunction timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game loaded with the right title but no canvas: Chromium could not create a
GL context ('gles2_command_buffer_stub: Failed to create context'), because CI
Macs are VMs without GPU access and --disable-gpu also ruled out software
rendering. On macOS, drop --disable-gpu and use ANGLE's SwiftShader backend.
Linux and Windows keep --disable-gpu, which already passes there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Armaldio Armaldio changed the title ci: run authenticated Construct to Electron acceptance on every push to main ci: Construct to Electron smoke tests on main, and the fixes they uncovered Nov 26, 2026

This branch was successfully deployed

1 active deployment
preview — 2fa2e378 Deployed Nov 26, 2026 by github-actions[bot]
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