From 6a99bcc178526a2ea5894cd2e1b652403eed834e Mon Sep 17 00:00:00 2001 From: Jackson Chen <90215880+Sma1lboy@users.noreply.github.com> Date: Thu, 1 Oct 2026 04:53:01 -0700 Subject: [PATCH 1/2] ci: reject incomplete Electron bundles and verify distribution output --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++-- docs/ux-build-verification.md | 14 ++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 docs/ux-build-verification.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96ff4827..ab8e3e81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,9 @@ jobs: build: name: Build App (${{ matrix.os }}) runs-on: ${{ matrix.os }} + timeout-minutes: 25 + env: + NODE_OPTIONS: --max-old-space-size=4096 strategy: matrix: os: [macos-latest] @@ -53,8 +56,30 @@ jobs: - name: Build and package app working-directory: packages/app - run: pnpm run package + run: | + set -euo pipefail + mkdir -p .automation/build-check + pnpm run package 2>&1 | tee .automation/build-check/package.log + # Forge can return zero after a Vite subprocess runs out of memory. + ! grep -E 'FATAL ERROR|heap out of memory' .automation/build-check/package.log + test -s .vite/build/main.js + test -s .vite/build/preload.js + test -s .vite/renderer/main_window/index.html + test -n "$(find out -type d -name 'Convera.app' -print -quit)" - name: Make distribution files working-directory: packages/app - run: pnpm run make + run: | + set -euo pipefail + # Package was verified above; do not silently build it a second time. + pnpm exec electron-forge make --skip-package 2>&1 | tee .automation/build-check/make.log + ! grep -E 'FATAL ERROR|heap out of memory' .automation/build-check/make.log + test -n "$(find out/make -type f -name '*.dmg' -size +0c -print -quit)" + + - name: Upload build diagnostics + if: always() + uses: actions/upload-artifact@v4 + with: + name: convera-build-check-logs + path: packages/app/.automation/build-check + if-no-files-found: warn diff --git a/docs/ux-build-verification.md b/docs/ux-build-verification.md new file mode 100644 index 00000000..98822696 --- /dev/null +++ b/docs/ux-build-verification.md @@ -0,0 +1,14 @@ +# Verify Electron build results + +An independent validation fix discovered while testing provider UX changes. + +Before: Build Check run https://github.com/CodeFox-Repo/Convera/actions/runs/36857249679 reported success even though its package and make logs each contained `FATAL ERROR: ... heap out of memory`. The Electron Forge subprocess failure did not reliably reach the job exit status. A green badge alone therefore did not establish a usable renderer. + +After: +- Give the build a bounded 4 GiB Node heap, also verified by the actual Electron before/after UX workflow +- Preserve strict shell/pipeline exit codes and reject fatal/OOM log output +- Require nonempty main, preload and renderer entry files plus a packaged Convera.app +- Make the distribution from the already verified package rather than building a second time +- Require a nonempty DMG and retain diagnostics on success or failure + +This does not sign, publish, merge, deploy or change production. It changes only pull-request build verification. Review independently of the website and provider-copy PRs. From 0b39ca6b3d99f88f6a2c1c0880ae71066728ebd9 Mon Sep 17 00:00:00 2001 From: Jackson Chen <90215880+Sma1lboy@users.noreply.github.com> Date: Thu, 1 Oct 2026 04:57:25 -0700 Subject: [PATCH 2/2] ci: scope the larger heap to packaging steps --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab8e3e81..644f65d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,8 +15,6 @@ jobs: name: Build App (${{ matrix.os }}) runs-on: ${{ matrix.os }} timeout-minutes: 25 - env: - NODE_OPTIONS: --max-old-space-size=4096 strategy: matrix: os: [macos-latest] @@ -56,6 +54,8 @@ jobs: - name: Build and package app working-directory: packages/app + env: + NODE_OPTIONS: --max-old-space-size=4096 run: | set -euo pipefail mkdir -p .automation/build-check @@ -69,6 +69,8 @@ jobs: - name: Make distribution files working-directory: packages/app + env: + NODE_OPTIONS: --max-old-space-size=4096 run: | set -euo pipefail # Package was verified above; do not silently build it a second time.