From 5b6fe7882ad709b08d4bc23c123865f4d1033df4 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Thu, 30 Jul 2026 14:23:22 +0200 Subject: [PATCH] fix(ci/windows-host): a cached console no longer ships an installer without one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WEB_OUTPUT_DIR was exported on the last line of "Build + smoke-boot web console", a step that is skipped on a cache hit. So the second and every later build with an unchanged web/ and sdk/ left it unset — and pack-host-installer.ps1 reads an unset WEB_OUTPUT_DIR as "don't bundle the console" and says so in one line of log before carrying on happily. The installers that fell out of that have no {app}\web at all: no web-run.cmd, so `web setup` bails with "web launcher missing" before it registers anything, so there is no PunktfunkWeb task, no console, and no firewall rule for 47992. A user is left with a working host, a tray that says "Open web console (not responding)" for ever, and nothing to reinstall their way out of, because every rebuild reproduces it. It also explains the bun.exe lock reported separately. bun.exe ships under WithWeb OR WithScripting, but the pre-copy stop was #ifdef WithWeb — so in a console-less installer bun still shipped while the only code that stopped bun was compiled out, and replacing a running bun.exe is the "DeleteFile failed; code 5" modal. Exporting the variable from its own unconditional step fixes it. The throw alongside is the actual lesson: a missing web\.output now fails the job instead of silently redefining what the installer is. Co-Authored-By: Claude Fable 5 --- .gitea/workflows/windows-host.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitea/workflows/windows-host.yml b/.gitea/workflows/windows-host.yml index 68837e9b..04b033d9 100644 --- a/.gitea/workflows/windows-host.yml +++ b/.gitea/workflows/windows-host.yml @@ -348,6 +348,21 @@ jobs: Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue Write-Output "web console smoke (bun): /login -> $code" if ($code -ne 200) { throw "web console failed to boot under bun" } + + # WEB_OUTPUT_DIR has to be exported whether or not the step above ran. It used to be that step's + # last line, so a CACHE HIT skipped it and left the variable unset — and pack-host-installer.ps1 + # treats an unset WEB_OUTPUT_DIR as "don't bundle the console", silently ("installer built + # WITHOUT the web console"). That shipped in 0.22.1 and 0.22.2: no {app}\web, so no web-run.cmd, + # so `web setup` bails, so no PunktfunkWeb task and no console at all. It also removed the only + # thing that stopped bun before the copy (StopBunRuntimes was #ifdef WithWeb), while bun.exe kept + # shipping under WithScripting — which is the "DeleteFile failed; code 5" modal on bun.exe. + # The throw is the point: never silently ship a console-less installer again. + - name: Export the console output dir (cache hit or fresh build) + shell: pwsh + run: | + if (-not (Test-Path 'web\.output\server\index.mjs')) { + throw "web\.output is missing - neither the cache restore nor the build produced it, and the installer must not ship without the console" + } "WEB_OUTPUT_DIR=$((Resolve-Path 'web\.output').Path)" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 - name: Build plugin/script runner bundle (bun)