Repository navigation
ci(windows): fix Lemonade port binding for the two integration jobs - #1867
Conversation
…gration jobs The two Windows integration jobs (Agent SDK, GAIA CLI) have been red on main because ensure-lemonade-running.ps1 registered a scheduled task running LemonadeServer.exe bare. In Lemonade v10.x that binary is a tray launcher that ignores `serve --port`, so the server came up on its default 8000 while the health check polled 13305 — four 60s retries, then "Lemonade server not ready". A re-run only passed when a previous run's persistent 13305 server happened to still be alive, which read as flaky infra. Two fixes: - Launch the `lemonade-server.exe` shim with `serve --no-tray --port $Port` (the shim translates those args correctly; the bare exe does not), so a cold restart deterministically rebinds 13305 and self-heals off 8000. Broaden the pre-start kill to the full Lemonade/llama-server process set so a wedged inference child can't survive a retry. - Give both workflows a constant shared concurrency group with cancel-in-progress: false. They share one persistent Lemonade scheduled task on the single self-hosted stx runner, so any two concurrent runs (across both workflows and across branches) force-restart and evict each other's server. A constant group makes that shared server a true mutex.
…changes The Lemonade startup script and these workflows' own definitions live outside src/**, tests/**, so changes to them never re-ran the jobs they govern — the PR fixing the startup script couldn't validate itself. Add installer/scripts/** and the self workflow path so launch-path changes exercise these integration jobs.
|
Verdict: Approve This fixes two compounding causes of the intermittently-red Windows integration jobs: the scheduled task was launching the bare tray launcher (which ignores 🔍 Technical detailsCorrectness — verified, no issues
Strengths
🟢 Minor (non-blocking, no change required)
|
…him is gone) First CI attempt failed: the lemonade-server shim no longer exists. Lemonade v10.5 deprecated and removed the `lemonade-server.exe` shim, so v10.7.0 ships only LemonadeServer.exe (verified present on the runner via LEMONADE_SERVER_PATH). There is no `serve` subcommand — the listen port lives in config.json. The runner binds 8000 because a stale config.json in the SYSTEM profile (left when the box drifted onto a v10.8.x install) pins the old port; the binary itself is the correct 10.7.0 and needs no reconcile. Launch LemonadeServer.exe with bare `--no-tray --port $Port` (overrides + persists the port) and clear the stale config.json first so the 13305 default regenerates.
|
🟡 The new global concurrency mutex ( Adding 🔍 Technical details
Suggested fix — add at the job level in both workflows: jobs:
test-agent-sdk-windows:
timeout-minutes: 60 # caps worst-case mutex holdUnder the old |
The bare LemonadeServer.exe is proven to start under the SYSTEM scheduled task (it always came up, just on the wrong port), so --port alone is the minimal, evidence-backed delta. --no-tray was unverified for the direct exe and could hard-fail startup for no port-binding benefit.
…jobs) A constant group shared by both workflows hit GitHub's 1-running+1-pending limit, so the second Windows job on a commit was cancelled, not queued — worse than the original flakiness and a merge blocker if required. The real fix is the --port/config-clear change (CLI Windows now passes); on a single stx runner the two jobs already run back-to-back, so no concurrency-level serialization is needed. Restore the original per-workflow group.
…d in v10.5) (amd#1868) ## Why this matters The **Lemonade Server Smoke Test** has been red since Lemonade v10.5 removed the `lemonade-server` shim. `start-lemonade.ps1` hard-exits at `lemonade-server not found on PATH or in .venv` before it can even start the server, and `reset-lemonade.ps1`'s direct-exe fallback launched `LemonadeServer.exe` with **no `--port`**, so it bound whatever the stale `config.json` said instead of the requested port. Both now resolve `LemonadeServer.exe` directly and launch it with a bare `--port` (there is no `serve` subcommand in v10.x). This is the follow-up to amd#1867, which fixed the same shim-removal breakage in the two Windows integration jobs. That PR's passing run **empirically verified on the `stx` runner** that `LemonadeServer.exe --port N` binds N — so this applies the proven pattern to the remaining two scripts. ## Test plan - [ ] **Lemonade Server Smoke Test (stx)** passes — log shows `[OK] Found server: …LemonadeServer.exe` then `Server ready`, not `lemonade-server not found`. - [ ] `reset-lemonade.ps1` brings the server up on the requested port (no silent fallback to the config port).
## Why this matters **Upgrades GAIA's pinned Lemonade Server from 10.7.0 to 10.8.1 (latest).** The repo was stuck on 10.7.0 because the auto-bump workflow failed and every Lemonade entry point assumed the `lemonade-server` shim that v10.5 removed (fixed in amd#1867 + amd#1868, both now on main). This PR is the version bump itself: `LEMONADE_VERSION` 10.7.0 → 10.8.1 in `src/gaia/version.py` plus the matching docs version references. Validated on a real `stx` runner that **genuinely reconciled 10.7.0 → 10.8.1** (`Post-reconcile version: 10.8.1`, health `"version":"10.8.1"`): the shim-free `LemonadeServer.exe --port` scripts start it, the model loads, and the Windows + smoke integration jobs all pass on 10.8.1. ## Test plan Validated end-to-end on the self-hosted `stx` runner (the run reconciled it 10.7.0 → 10.8.1): - [x] **Test Agent SDK on Windows** — green on 10.8.1 - [x] **Test GAIA CLI on Windows** — green on 10.8.1 - [x] **Lemonade Server Smoke Test** — green (MSI reconcile + model pull + load + completion on 10.8.1) - [x] **Docs Validation** — green (Lemonade version refs bumped in `docs/cpp/setup.mdx`, `docs/guides/npu.mdx`, `cpp/README.md`) --------- Co-authored-by: kovtcharov-amd <[email protected]>
The two `TestStartRemedyIsRunnable` cases still expected `LEMONADE_CTX_SIZE=<n>` in the remedy. On a systemd-managed install there is no such variable to set: restarting the unit does not re-read one, which is why `start_hint` now tells the user to set the size in Lemonade's model settings and reload the model instead. Both assertions move to what the remedy is actually responsible for — naming the size the profile needs, and where to set it — so they still fail if the size goes missing, which is what #1867 put them there for.
Why this matters
The two Windows integration jobs — Test Agent SDK on Windows and Test GAIA CLI on Windows — went intermittently red on
mainstarting 06-24, failing at Lemonade startup (Lemonade server not ready) before any test ran. Root cause is runner state, not a code regression: the pinnedLemonadeServer.exebinary is correctly v10.7.0 (CI verifies "no reconcile needed"), but a staleconfig.jsonin the runner's SYSTEM profile pins the server to the old default port 8000, while the health check polls 13305. It only looked like "flaky infra a re-run clears" because a previous run's healthy 13305 server was sometimes still alive. No PR caused it — the startup script has been unchanged since #1733 (06-18); the trigger was a v10.8.x install touching the runner's config.The fix makes the server bind 13305 deterministically: launch
LemonadeServer.exe --port 13305(in v10.x the port is a bare flag — there's noservesubcommand, and the oldlemonade-servershim was removed in v10.5) and clear the staleconfig.jsonso the documented 13305 default regenerates. Also broadens the pre-start process cleanup to the full Lemonade/llama-serverset so a wedged child can't survive a retry.A second change adds
installer/scripts/**and these workflows' own files to theirpathstriggers, so changes to the Lemonade startup script actually re-run the jobs they govern (previously they only triggered onsrc/**/tests/**, so this very fix couldn't validate itself).Test plan
These jobs run only on the self-hosted Windows runner, so CI is the verification:
Server binary: …LemonadeServer.exe→Healthy after attempt 1signature.