Skip to content

feat(lemonade): upgrade pinned Lemonade Server to 10.8.1 - #1869

Merged
kovtcharov merged 11 commits into
mainfrom
test/lemonade-10.8.1-upgrade
Jun 25, 2026
Merged

kovtcharov merged 11 commits into
mainfrom
test/lemonade-10.8.1-upgrade

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

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 #1867 + #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):

  • Test Agent SDK on Windows — green on 10.8.1
  • Test GAIA CLI on Windows — green on 10.8.1
  • Lemonade Server Smoke Test — green (MSI reconcile + model pull + load + completion on 10.8.1)
  • Docs Validation — green (Lemonade version refs bumped in docs/cpp/setup.mdx, docs/guides/npu.mdx, cpp/README.md)

…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.
…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 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)

The Lemonade Server Smoke Test has been red since the v10.5 release removed the
`lemonade-server` shim: start-lemonade.ps1 hard-exits at "lemonade-server not
found on PATH or in .venv" before it can start the server, and reset-lemonade.ps1's
direct-exe fallback launched LemonadeServer.exe with no --port (so it bound the
stale-config port, not the requested one).

Both now resolve LemonadeServer.exe directly and launch it with a bare `--port`
(there is no `serve` subcommand in v10.x). This is the same pattern that fixed the
Windows integration jobs in #1867 — empirically verified on the stx runner that
`LemonadeServer.exe --port N` binds N.
Stacked on the shim-removal fixes (#1867 + #1868) so the Windows integration
jobs and the smoke test exercise 10.8.1 against shim-free LemonadeServer.exe
--port scripts. Draft: for CI validation only — do not merge until the two fix
PRs land and 10.8.1 is confirmed green.
@github-actions github-actions Bot added installer Installer changes devops DevOps/infrastructure changes labels Jun 25, 2026
The docs version-consistency check requires doc references to match
LEMONADE_VERSION in src/gaia/version.py.
@kovtcharov kovtcharov added the ready_for_ci Run CI workflows on draft PR without requesting review label Jun 25, 2026
@github-actions github-actions Bot added documentation Documentation changes cpp labels Jun 25, 2026
@kovtcharov-amd
kovtcharov-amd marked this pull request as ready for review June 25, 2026 23:04
@kovtcharov-amd
kovtcharov-amd self-requested a review as a code owner June 25, 2026 23:04
@kovtcharov-amd kovtcharov-amd changed the title test(lemonade): validate upgrade to 10.8.1 on CI [do not merge] test(lemonade): validate upgrade to 10.8.1 on CI Jun 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions (one stale-version nit) — and per the PR's own note, hold the merge until #1867/#1868 land and the Windows + smoke jobs go green.

This bumps the pinned Lemonade version 10.7.0 → 10.8.1 and finishes the shim-removal cleanup: the Windows installer/CI scripts now launch LemonadeServer.exe --port directly (the lemonade-server serve shim was dropped in v10.5) and clear stale config.json so the server can't get pinned to an old port. CI path filters are widened so installer-script edits actually trigger the Windows jobs. The version bump is consistent across version.py, the C++ README, and the docs. The mechanical risk is low; the real validation is the CI run this PR exists to trigger.

One loose end: a leftover 10.7.0 fallback in reset-lemonade.ps1 that the "consistency check" commit missed — harmless in CI (it reads version.py first) but worth tidying so the default doesn't drift further.

🔍 Technical details

🟢 Minor

Stale 10.7.0 fallback in reset-lemonade.ps1 (installer/scripts/reset-lemonade.ps1:29, :48, :70) — The version resolver reads LEMONADE_VERSION from version.py first, so CI is unaffected, but the hardcoded fallback and the docstring/example still say 10.7.0. Since a prior commit in this PR was explicitly a 10.7.0→10.8.1 consistency sweep, this is the one spot it missed. The functional fix:

    if (-not $Version) { $Version = "10.8.1" }

(and the doc references at :29 "else 10.7.0" and the :48 example can follow the same bump). Not blocking.

Note: docs/releases/v0.21.2.mdx:105 also mentions 10.7.0, but that's a historical changelog entry and should not be changed.

Strengths

  • Comment hygiene matches the code change. The reworked block comments in start-lemonade.ps1 and ensure-lemonade-running.ps1 replace the now-wrong "use the shim for serve" guidance with the correct LemonadeServer.exe --port rationale, and cross-reference each other — future readers won't reintroduce the shim path.
  • Config-clearing is defensive and correct. Passing --port $Port and removing the stale SYSTEM-profile config.json covers both the override and the regenerate-default path, with the kill list widened to the real child process names (llama-server, -dev variants).
  • CI trigger gap closed. Adding installer/scripts/** and the workflow file itself to the path filters means these script edits will actually exercise the Windows jobs — exactly what this PR needs to validate.

@kovtcharov kovtcharov changed the title test(lemonade): validate upgrade to 10.8.1 on CI feat(lemonade): upgrade pinned Lemonade Server to 10.8.1 Jun 25, 2026
@kovtcharov
kovtcharov added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit bd4b260 Jun 25, 2026
63 checks passed
@kovtcharov
kovtcharov deleted the test/lemonade-10.8.1-upgrade branch June 25, 2026 23:58
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Jun 26, 2026
## Why this matters

Closes the one loose end the amd#1869 review flagged: `reset-lemonade.ps1`
still hardcoded **10.7.0** in its version fallback, docstring, and
example after the 10.8.1 upgrade. CI never caught it because the script
reads `LEMONADE_VERSION` from `src/gaia/version.py` first — but when run
standalone (outside a GAIA checkout) it would install the wrong,
now-stale version, and the default would keep drifting on each bump. Now
it tracks 10.8.1.

Scope is exactly the three references the review identified; the
`docs/releases/v0.21.2.mdx` mention of 10.7.0 is a historical changelog
entry and is intentionally left unchanged.

## Test plan

- [x] `grep 10.7.0 installer/scripts/reset-lemonade.ps1` → no matches;
all three bumped to 10.8.1.
- [ ] Docs Validation stays green (no version-consistency regression —
this only changes a fallback default, not docs refs).
itomek-amd pushed a commit that referenced this pull request Jun 26, 2026
…8 mismatch (#1747)

Before: `gaia init --profile npu` reported a 4096-token context window,
but at runtime GAIA loaded the FLM chat model at `ctx_size=32768` — a
config/runtime mismatch (#1676) that left the init report lying about
the window actually in use. After: the NPU profile defaults to 32768
everywhere, matching GPU/CPU, so what init reports is what the loader
requests.

The fix flips the three pinned-4096 sites — the `gemma-4-e2b` model
requirement, the NPU `DeviceConfig`, and the npu init profile — to
32768, and updates the comments/tests that documented the old 4096 NPU
window.

Closes #1745

## Validated on NPU hardware — Ryzen AI MAX+ 395 (cold start)

The risk flagged in the issue (the #1655 lesson) was that flipping the
window blind could OOM/fail an FLM load on a **cold** NPU. It does not —
verified end-to-end against Lemonade serving the FLM build on a Ryzen AI
MAX+ 395:

- **Cold load at 32k succeeds.** `POST /api/v1/load {model_name:
gemma4-it-e2b-FLM, ctx_size: 32768}` → `{"status":"success"}`, HTTP 200,
11.4 s, no OOM. Health then reports `device: npu`,
`recipe_options.ctx_size: 32768` — the 32k window is really allocated,
not silently clamped to 4096.
- **Serves at 32k.** A chat completion echoes a planted passphrase
verbatim (`finish_reason: stop`), at **22.85 tok/s** decode — in line
with the documented ~24 tok/s NPU figure. (KV occupancy 0.137 % at 45
tokens ⇒ total ≈ 32,775 ≈ 32768, independently corroborating the
window.)
- **`gaia init --profile npu` reports 32768.** Run from this branch on
the box, it prints `✓ Context size verified: 32768 tokens` and
`gemma4-it-e2b-FLM - OK (ctx: 32768)` (exit 0) — the old `4096` is gone.
- **External confirmation.** @soulafein83 confirmed a 32k FLM load on a
Ryzen AI 7 350 / 16 GB.

## Test plan

- [x] `python -m pytest` on the 4 affected unit files — 69 passed
- [x] `python util/lint.py` — black + flake8 clean (E501 ignored by repo
config); CI **Run Code Quality Checks** green
- [x] `gaia init --profile npu` reports `32768` (not 4096) — verified on
a Ryzen AI MAX+ 395
- [x] FLM chat model (`gemma4-it-e2b-FLM`) loads at `ctx_size=32768` on
a Ryzen AI APU from a **cold** NPU start — verified, no OOM
- [x] External confirmation from @soulafein83

<details>
<summary>CI: two red jobs are a pre-existing, unrelated infra
failure</summary>

`Test Lemonade Embeddings API` and `Test RAG` fail on
`nomic-embed-text-v2-moe-GGUF: llama-server failed to start` (HTTP 500)
— the **embedding** model's server, which this PR does not touch. The
same failure hits unrelated branch `fix/lemonade-version-ci-trigger` at
the same time and reproduces on both Lemonade 10.7.0 and 10.8.1. The
previously-failing `Lemonade Server Smoke Test` now passes after main's
10.8.1 bump (#1869) merged in. All unit, lint, CLI, and Agent-SDK
integration jobs are green.
</details>

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: kovtcharov-amd <[email protected]>
Co-authored-by: Tomasz Iniewicz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cpp devops DevOps/infrastructure changes documentation Documentation changes installer Installer changes ready_for_ci Run CI workflows on draft PR without requesting review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants