Skip to content

feat(install): ship a frozen gaia everywhere instead of PyPI - #6783

Merged
kovtcharov-amd merged 13 commits into
amd:mainfrom
kovtcharov:kalin/binaries-only-agent-ui
Nov 7, 2026
Merged

kovtcharov-amd merged 13 commits into
amd:mainfrom
kovtcharov:kalin/binaries-only-agent-ui

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GAIA no longer installs Python or a PyPI package on a user's PC. The desktop app built ~/.gaia/venv from PyPI on first launch. The terminal UI's installers shipped no gaia, so setup and the daemon failed until the user also ran the one-line installer, which built the same venv. Now one frozen gaia, built from the same commit, ships everywhere: inside the desktop app, beside gaia-tui in every terminal installer, and as a checksummed release file that install.sh/install.ps1 download. On a clean profile on a Strix Halo PC, with no Python or uv on PATH, the desktop app's backend was healthy 6 s after launch, compared with a 44 s install plus 76 s to healthy on a CI runner before. This covers steps 1–10 of the binaries-only plan (#6495). Step 1 (no pip extras) holds for both apps: the frozen build skips pip extras, and both apps pass --skip-pip-extras. pip install amd-gaia users still get them.

  • Desktop app. The app runs <resources>/core/gaia. If that file is missing, it says to reinstall rather than fall back to PyPI. An AppImage runs a copy under ~/.gaia/core, because its mount goes away while the daemon keeps running. The bundled uv is gone.
  • Terminal installers. The .pkg, .deb/.rpm and the Windows setup's terminal component carry the core and put gaia on PATH. The terminal UI runs the gaia beside itself before any other.
  • One-line installers. They download gaia-core-<platform>.tar.gz, check it against gaia-core-SHA256SUMS.txt, and use it to read the agent manifest, so they need no Python at all. publish.yml attaches the core to every release, and the release check refuses one without it.
  • Updates and removal. The daemon is stopped before an update or uninstall replaces its files. The NSIS installers, the .deb/.rpm pre-remove hooks and the desktop app's update quit (the only hook macOS has) all do this. The frozen app also replaces a daemon still running an older release's venv. After an app update, the agent is refreshed once.
  • The agent runs as its own binary everywhere. Where it isn't importable, gaia -p, gaia chat, background goals (fix(ui): background goals never run in the desktop app, and each failure burns the hourly tick budget #5840) and skill-preference saves now run it through the daemon, as Agent UI chat does. Before, they failed or returned 503. A failed model call is a failed run (exit 1), and the apps' hints no longer tell users to pip-install.
  • Frozen-build guards. gaia init skips pip extras, a wheel-type hub agent is refused before download, and GAIA's own -m/-c relaunches run through gaia.frozen.

Still source-only: gaia eval agent, which runs the flagship in-process. The npm gaia-ui package and running the app from source still use a venv, as developer routes.

Closes #5840.

Test plan

  • installer/core/smoke_test.py passes on win32-x64, darwin-arm64, darwin-x64 and linux-x64 (Rocky 9) in CI, and on a local Windows build. It checks: --version; bundled modules import; gaia_agent, torch and PyInstaller are absent; the -m/-c relaunches; running as gaia-mcp; gaia init --check --json; daemon start, status and stop; gaia chat --ui answering /api/health.
  • Packaged Windows app launched from an empty profile with a minimal PATH: healthy in 5.7–6.1 s, no ~/.gaia/venv, and the setup screen shows "All 5 checks passed". Through the frozen core, gaia init --agent-only installed the flagship in 13 s and its sidecar started.
  • Terminal .deb and .rpm built with the real Linux core in a container: both install, run gaia --version and remove cleanly (Debian bookworm, Fedora).
  • Frozen gaia -p and gaia chat in a throwaway home: the daemon started the agent binary and relayed the turn. With the model server unreachable, both reported the agent's error and exited 1.
  • pytest: installer, hub, daemon, relay, agent-loop, skills, release-asset and frozen-relaunch suites (Windows), plus the POSIX-shell installer tests in a Linux container. Electron Jest suite passes; Go gaiainit tests pass.
  • CI: desktop AppImage/DMG structural smokes and the AppImage distro matrix reach the bundled core.
  • CI: terminal package smokes on macOS and Linux, and the Windows setup smoke.
  • On the next RC: headless installer journeys show desktop install-to-healthy below the venv-build numbers in installer/install_time_thresholds.json, and install.sh/install.ps1 pinned to that RC install with no Python on the PC.
  • First local-model chat through the CI-built frozen Windows gaia, from an empty home with no Python or uv on PATH: gaia init --agent-only installed the flagship in 8.6 s, and gaia -p --model Qwen3.5-4B-GGUF answered and exited 0.
  • Clean-PC timing with a fresh model download (§5.3 baseline). Not run here: the PC's GPU was in use by other work.

…om PyPI

The desktop app's first launch no longer downloads uv and Python or builds
~/.gaia/venv from PyPI. Each installer now carries a one-dir PyInstaller build
of the GAIA core, frozen from the same commit, and the app runs it from
<resources>/core. On a clean profile with no Python or uv on PATH, the
backend answered /api/health 6 s after launch.

- installer/core freezes gaia.cli with every gaia module and the UI extras, and
  leaves out the hub agents and the ML stack. smoke_test.py checks it in a
  throwaway home. build_core.yml builds it per platform; the Linux build runs
  on the Rocky 9 glibc floor. build-installers.yml packs it in place of the
  bundled uv.
- gaia.frozen runs GAIA's own `-m`/`-c` self-relaunches (the daemon, MCP
  server, attempts), since sys.executable is the app itself.
- A packaged app with no core fails with a reinstall message rather than
  falling back to PyPI. An AppImage runs a copy under ~/.gaia/core, because
  its mount goes away while the daemon keeps running.
- Updates stop the daemon before replacing the files it runs from: the NSIS
  and .deb hooks, and the app's own update quit, which is the only step macOS
  has. The frozen app also replaces a daemon from any other release, such as
  the old venv's. Each app version refreshes the agent once.
- In the frozen build, gaia init skips pip extras, and a wheel-type hub agent
  is refused before download.
@github-actions github-actions Bot added documentation Documentation changes installer Installer changes devops DevOps/infrastructure changes tests Test changes daemon Daemon supervisor / sidecar control plane sidecar Agent sidecar contract / harness labels Nov 6, 2026
…taller

A terminal-only install had gaia-tui and gaia-agent but no gaia, so setup,
starting the daemon, model links and Slack setup all failed unless the user
also ran the one-line installer, which built a venv from PyPI. The macOS
.pkg, the .deb/.rpm and the Windows setup's terminal component now carry
the frozen core, and the terminal UI runs the gaia beside itself before
any other on PATH.

- build_core.yml takes a platform list and adds a best-effort darwin-x64
  leg. Each installer workflow freezes only what it packs, under its own
  artifact prefix.
- macOS: a third component installs the core to /usr/local/lib/gaia, linked
  as /usr/local/bin/gaia. Linux: /usr/lib/gaia, linked as /usr/bin/gaia, with
  a pre-remove script that stops a daemon running it. Windows: gaia.exe and
  _internal sit beside gaia-tui.exe. The setup stops the daemon before it
  replaces the files, and again on uninstall.
- The package smoke tests run the installed gaia --version and check the
  core is gone after removal.
@github-actions github-actions Bot added the tui Go terminal UI (gaia-tui) label Nov 6, 2026
install.sh and install.ps1 downloaded uv and Python 3.12, then built
~/.gaia/venv from PyPI. They now download the release's frozen gaia
(gaia-core-<platform>.tar.gz), check it against gaia-core-SHA256SUMS.txt,
and use it to read the agent manifest, so neither needs Python at all.

- install.sh unpacks it into ~/.gaia/core and links gaia, gaia-cli and
  gaia-mcp from ~/.gaia/bin. install.ps1 puts gaia.exe and _internal in
  ~\.gaia\bin, with gaia-cli and gaia-mcp as copies. The frozen entry runs as
  gaia-mcp when called by that name. Both stop the running daemon first.
- publish.yml attaches the core and its checksums to every release, and
  check_release_assets.py refuses a release without them. darwin-x64 and
  a new linux-arm64 freeze are best-effort.
- The .rpm now owns /usr/lib/gaia, so removing it leaves no empty tree.
- gaia uninstall --purge removes ~/.gaia/core.
@kovtcharov kovtcharov changed the title feat(desktop): ship a frozen gaia backend instead of installing it from PyPI feat: ship a frozen gaia everywhere instead of installing it from PyPI Nov 6, 2026
@kovtcharov kovtcharov changed the title feat: ship a frozen gaia everywhere instead of installing it from PyPI feat(install): ship a frozen gaia everywhere instead of PyPI Nov 6, 2026
The one-line installers give the same executable the gaia-mcp name, and
the entry picks the MCP bridge from it.
@kovtcharov
kovtcharov marked this pull request as ready for review November 6, 2026 01:26
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Verdict: Request changes

Replacing the PyPI venv with one frozen gaia everywhere is well built: checksummed downloads, a refusal instead of a silent PyPI fallback, and the daemon stopped before its files are replaced. Two ways of installing it collide on one PC, though, and several docs still give commands that no longer work.

  • On Linux, the AppImage deletes the gaia the one-line installer put in place. Both use the same folder under ~/.gaia. On first launch the AppImage treats everything in that folder except its own copy as an old copy, and removes it. The gaia on the user's PATH then points at nothing. Give the AppImage's copy a folder of its own.
  • Two GAIA installs from different releases keep restarting each other's background service. For example: the desktop app updated itself, while the terminal package stayed on the previous release. Each frozen gaia treats a daemon from any other version as out of date and replaces it, so every command from the other install restarts the service and its agents again. Replace only a daemon from an older release, or one whose install is gone.
  • On Windows, re-running the one-line installer can break the install it is upgrading. It deletes the old support folder before copying the new one in. If any gaia.exe is still running, Windows deletes only some of the files, and the old install stops working. Stop and check before deleting anything, or swap the folders in a way that can be undone.
  • Docs still describe the venv. The Windows uninstall command in the install guide now fails. The Windows quickstart tab still says the installer sets up Python and a venv. Two troubleshooting notes tell users to pip install into a venv that no longer exists.

Real-world evidence

N/A: no evidence bundle was produced for this run, so this job ran none of the changed installers or the frozen app. The description reports the author's own runs: per-platform smoke tests of the frozen core, a packaged Windows app reaching healthy in about 6 s, and .deb/.rpm install and removal in containers. It lists the CI desktop and terminal package smokes and the next RC's headless install journeys as still open. Beyond those reported runs, this verdict rests on reading the code.

🔍 Technical details

🔴 Critical

🔴 AppImage cleanup deletes the one-line installer's core (src/gaia/apps/webui/services/backend-installer.cjs:1565-1573)

install.sh unpacks the core flat into $GAIA_HOME/core (gaia, _internal/, notices; build_core.yml:198 tars dist/gaia with -C … .), and ~/.gaia/bin/gaia links to $GAIA_CORE/gaia. ensureBundledCore() copies the AppImage core into ~/.gaia/core/<version>/. It then treats every other entry of ~/.gaia/core as an older copy: listDir(APPIMAGE_CORE_ROOT).filter(name => name !== basename(dir)), which includes gaia and _internal. It stops the daemon and rmSyncs them.

Scenario: a Linux user runs curl … install.sh | sh, then launches the AppImage. On that first launch gaia and _internal are deleted and ~/.gaia/bin/gaia dangles. The reverse also breaks: install.sh runs rm -rf "$GAIA_CORE", which removes the AppImage's copy and its .copied marker. From then until the next ensureBackend, findGaiaBin() returns null.

Fix: give the AppImage its own root and add it to _purge_paths.

const APPIMAGE_CORE_ROOT = path.join(GAIA_HOME, "appimage-core");

(Also update the uninstall_command.py purge comment and the ~/.gaia/core mentions in the docs.)

🔴 Docs give commands that now fail, or describe the removed venv

  • docs/guides/install.mdx:321: ~\.gaia\venv\Scripts\gaia uninstall --purge. No venv exists on a new install, so the command fails. Use gaia uninstall --purge.
  • docs/quickstart.mdx:114-119, Windows tab: still says "Install uv", "Download Python 3.12" and "Create %USERPROFILE%\.gaia\venv". The PR updated only the Linux tab.
  • docs/guides/agent-ui.mdx:283-284 and docs/reference/troubleshooting.mdx:611-612: "for the one-line installer's environment" run uv pip install --python ~/.gaia/venv/bin/python …. That environment no longer exists, and the frozen build can't take extras anyway. Say that missing modules mean a broken install, and that reinstalling fixes it.
  • docs/reference/install-troubleshooting.mdx:47-90: the antivirus entry is entirely about files under ~/.gaia/venv and repairing with ~/.gaia/venv/bin/pip. Mark it as applying only to pre-frozen installs, or rewrite it for ~/.gaia/core and ~\.gaia\bin\_internal.

🟡 Important

🟡 Frozen builds of different releases evict each other's daemon (src/gaia/daemon/instance.py:187-195)

In a frozen client, runs_replaced_install returns "stale" for any inst.gaia_version != version.__version__. A PC can hold two frozen cores of different releases: the auto-updated desktop app (resources/core) and the terminal package or one-line install (/usr/lib/gaia, ~/.gaia/bin), which don't update with it. Each one's start_or_attach then calls _replace_outdated on the other's daemon, so the service and its sidecars restart on every alternation. Only outdated_daemon_busy holds it off.

version.py now ships as data (freeze.py PACKAGE_DATA), so the existing version_file check already works for frozen daemons. Consider limiting the frozen branch to daemons that have no version_file or run an older version, e.g. compare with packaging.version.Version and return None when the daemon is newer.

🟡 install.ps1 deletes _internal before it can replace it (installer/scripts/install.ps1, Install-Core)

A failed daemon stop is only a warning, so the script continues. It then runs Remove-Item "$GAIA_BIN\_internal" -Recurse -Force. Any gaia.exe from that folder that is still running holds python312.dll and the loaded .pyd files open: the daemon that didn't stop, a gaia chat --ui, or a gaia the TUI started. Remove-Item deletes the unlocked files, then throws. The catch reports "close any running GAIA", but the old install is already half-deleted, and the .exe files that were renamed to .old are not restored.

Fix: check before deleting anything. If the stop failed, or any process image lives under $GAIA_BIN, stop with that message. Otherwise move _internal aside, move the new one in, and on failure restore the old folder and the .old launchers.

🟢 Minor

  • installer/debian/postrm: the new hint "delete that folder to remove it" drops the tiered option. By the time postrm runs, the package's gaia is already gone, but another install's gaia may still be on PATH. Pointing users at gaia uninstall --purge (or at running it before removing the package) helps keep their connectors and other installs from being deleted by accident.

Strengths

  • Fails loudly where it used to fall back: a packaged app with no bundled core says to reinstall, a wheel agent is refused before download in a frozen build, and gaia.frozen.dispatch rejects -m targets other than GAIA's own modules and uvicorn.
  • freeze.py refuses to build when a collected module is missing, or when gaia would come from another checkout.
  • Every replace path (NSIS, .deb/.rpm prerm, the macOS update quit, the one-liners) stops the daemon before replacing its files, and treats exit code 3 separately from a real failure.

Where the agent ships as its own binary (every app install now), gaia -p
and gaia chat failed with "install the gaia-agent-gaia package", goal
ticks were refused (amd#5840), and saving a skill preference returned 503.
Each now uses the agent binary through the daemon, as Agent UI chat does,
and the hints the apps show no longer tell users to pip-install.

- gaia -p and gaia chat relay through run_query, which passes the caller's
  folder as working_directory. Flags only an in-process agent can honour
  (--dangerously-skip-permissions, --full-access, --base-url, --index) are
  refused with the reason.
- A goal tick relays like a scheduled prompt. The relay now hands a relayed
  set_loop_state call to the tick's handler, so the loop still reads its
  directive.
- Skill preference schemas come from disk for user skills. A test pins that
  no bundled skill ships one.
- In a frozen build, the "core too old" advice says to update GAIA, not to
  pip install. The TUI's missing-gaia and outdated-service remedies name
  the one-line installers, not pip.
@github-actions github-actions Bot added the cli CLI changes label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Verdict: Request changes

The latest push makes gaia -p, gaia chat, goals and skill preferences run on the agent binary, but none of the problems from the last review are fixed yet:

  • 🔴 On Linux, the AppImage still deletes the gaia the one-line installer put in place. Both still use the same folder under ~/.gaia, and the AppImage still removes everything in it except its own copy.
  • 🔴 Docs still give commands that fail or describe the removed venv. This covers the Windows uninstall command, the Windows quickstart tab, the two pip install troubleshooting notes and the antivirus entry.
  • 🟡 Two frozen installs from different releases still restart each other's daemon. Any daemon whose version differs is still treated as out of date.
  • 🟡 On Windows, re-running the one-line installer still deletes the old support folder before the swap can fail. A failed daemon stop is still only a warning.
🔍 Technical details
  • src/gaia/apps/webui/services/backend-installer.cjs:64: APPIMAGE_CORE_ROOT is still path.join(GAIA_HOME, "core"), and the cleanup at :447-452 still rmSyncs gaia and _internal from install.sh's flat ~/.gaia/core.
  • docs/guides/install.mdx:321, docs/quickstart.mdx:117-119, docs/guides/agent-ui.mdx:283-284, docs/reference/troubleshooting.mdx:611-612, docs/reference/install-troubleshooting.mdx:47-90: unchanged.
  • src/gaia/daemon/instance.py:132-137: the frozen branch still returns stale on any inst.gaia_version != version.__version__, including a daemon from a newer release.
  • installer/scripts/install.ps1:95-110: after a failed stop the script only warns, then runs Remove-Item "$GAIA_BIN\_internal" with no rollback of _internal or the .old launchers.

The agent reports a model failure as a final answer marked failed. run_query
ignored the mark, so a relayed gaia -p printed the failure text and exited 0
with is_error false. It now records the mark and exits 1, and gaia -p reports
the failure as the error. The relayed path also stops starting the model
server in-process; the daemon brings it up for its agent, as it does for the
Agent UI.
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Verdict: Request changes

This push makes a failed model call count as a failed run for gaia -p and gaia chat. That part looks right, but none of the four problems from the last review are fixed yet:

  • 🔴 On Linux, the AppImage still deletes the gaia the one-line installer put in place. Both still install into the same ~/.gaia/core folder, and the AppImage still clears everything there except its own copy.
  • 🔴 Some docs still give commands that fail, or describe the venv this PR removes. This covers the Windows uninstall command, the Windows quickstart tab, the two pip install troubleshooting notes and the antivirus entry.
  • 🟡 Two frozen installs from different releases still restart each other's daemon. A daemon on any other version, newer ones included, still counts as out of date.
  • 🟡 On Windows, re-running the one-line installer still deletes the old _internal folder even when it couldn't stop the daemon. The failed stop only prints a warning, and nothing is restored if the swap then fails.
🔍 Technical details
  • src/gaia/apps/webui/services/backend-installer.cjs:64,447-452: APPIMAGE_CORE_ROOT = path.join(GAIA_HOME, "core"). The older loop rmSyncs every entry that isn't the versioned copy, which includes install.sh's flat gaia and _internal (installer/scripts/install.sh:17,222-223).
  • Docs, all unchanged: docs/guides/install.mdx:321, docs/quickstart.mdx:117-119, docs/guides/agent-ui.mdx:283-284, docs/reference/troubleshooting.mdx:611-612, docs/reference/install-troubleshooting.mdx:47-90.
  • src/gaia/daemon/instance.py:132-137: the frozen branch returns stale whenever inst.gaia_version != version.__version__.
  • installer/scripts/install.ps1:95-110: after a non-zero, non-3 exit from daemon stop, the script warns and then runs Remove-Item "$GAIA_BIN\_internal". Nothing rolls back _internal or the .old launchers.

… packages

The installer journeys and the rebuilt-package jobs still assumed a venv and
a package with no core, so they failed against this branch.

- install.sh / install.ps1 rows check the core and that no venv was built,
  and skip for a release that ships no gaia-core files.
- build-packages.sh and build-pkg.sh take --without-core, used only to
  rebuild a release that predates the core, so the upgrade row starts from
  the package users really had.
- The skew test and the publish step list expect the new wording and steps.
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Verdict: Request changes

This push updates the install journey tests to check the frozen gaia, but none of the four problems from the last review are fixed yet:

  • 🔴 On Linux, the AppImage still deletes the gaia the one-line installer put in place. Both still install into ~/.gaia/core, and the AppImage still clears everything there except its own copy.
  • 🔴 Some docs still give commands that fail, or describe the venv this PR removes. This covers the Windows uninstall command, the Windows quickstart tab, the two pip install troubleshooting notes and the antivirus entry.
  • 🟡 Two frozen installs from different releases still restart each other's daemon. A daemon on any other version, newer ones included, still counts as out of date.
  • 🟡 On Windows, re-running the one-line installer still deletes the old _internal folder even when it couldn't stop the daemon. Nothing is restored if the swap then fails.
🔍 Technical details
  • src/gaia/apps/webui/services/backend-installer.cjs:64: APPIMAGE_CORE_ROOT is still path.join(GAIA_HOME, "core"), the same folder install.sh unpacks into.
  • Docs, unchanged: docs/guides/install.mdx:321, docs/quickstart.mdx:117-119, docs/guides/agent-ui.mdx:283-284, docs/reference/troubleshooting.mdx:611-612, docs/reference/install-troubleshooting.mdx:47-90.
  • src/gaia/daemon/instance.py:131-137: the frozen branch still returns stale whenever inst.gaia_version != version.__version__.
  • installer/scripts/install.ps1:94-110: a failed daemon stop only warns, then Remove-Item "$GAIA_BIN\_internal" runs. There is still no rollback.

kovtcharov and others added 6 commits November 5, 2026 22:05
An AppImage no longer deletes the gaia the one-line installer put on Linux,
and two installs of different releases no longer restart each other's daemon.

- The AppImage keeps its copy of the core in ~/.gaia/app-core, apart from
  install.sh's ~/.gaia/core; --purge removes both.
- A frozen gaia replaces only a daemon from an older release (or one that
  records no version), never a newer one.
- install.ps1 stops when it can't stop the daemon, and moves the old files
  aside instead of deleting them, restoring them if the swap fails.
- Docs: the Windows uninstall and quickstart steps, the Agent UI and RAG
  dependency notes and the antivirus entry describe the frozen gaia, and the
  desktop app's Windows folder is gaia-desktop.
…gent-ui

# Conflicts:
#	src/gaia/ui/email_sidecar/relay.py
Two tests still described behavior this branch changed on purpose.

- `gaia chat` without the flagship in-process now relays to the agent's
  binary; the test checks the hand-off and that ChatAgent never runs.
- The .deb's purge message names no command, since the app's own gaia is
  already removed when it prints.
The flag test still expected an import error where gaia chat now relays to
the agent's own binary; it checks that relay, and that the registry runner
is never used.
Brings in amd#6898's argv-array process calls. The installer keeps main's
execFileSync import and drops the now-unused crypto import, since the
frozen-core path no longer downloads or verifies a bundled uv; the
bundled-core Jest mock now stubs execFileSync instead of execSync.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 7, 2026
Merged via the queue into amd:main with commit a22f76f Nov 7, 2026
168 of 170 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/binaries-only-agent-ui branch November 7, 2026 14:19
bniladridas pushed a commit to bniladridas/gaia that referenced this pull request Nov 7, 2026
…md#6916)

Updating a GAIA backend on a PC with too little free disk space marked
the working install as **failed**, so the next launch treated GAIA as
broken and re-ran setup. Now the update stops before touching anything,
says how many MB more to free, and leaves the installed version recorded
as working. A launch with nothing to update starts however full the disk
is, and running out of space halfway through an install shows the
free-space hint instead of a raw pip error.

Since amd#6783, the packaged desktop app ships its own frozen backend and
skips this path entirely. The fix now covers the `~/.gaia/venv` install
that runs when the app is started from source or via `gaia-ui`. The
issue's other two symptoms were already fixed on main: the installer no
longer runs `gaia init`, and an install failure shows in the app window
instead of a modal that blocked Quit.

## Test plan
- [x] `npx jest` in `tests/electron`: all 60 suites pass, including the
low-disk tests in `backend-installer-resume.test.cjs`, which failed
before the fix.
- [ ] Run from source with a ready venv at an older version and under 2
GB free. The setup screen shows the disk error with "Your installed GAIA
X was not changed." and `~/.gaia/electron-install-state.json` still says
`ready`.

Closes amd#5697

<details>
<summary>🔍 Technical details</summary>

- `ensureBackend` checks disk only after the version fast path, right
before `installBackend`. When a finished install is in place (and not
already `failed`), the refusal throws an `InstallError` with
`keepState`, which skips `setState(FAILED)`.
- A first install, or one already recorded as failed, is still recorded
as `failed` on a disk refusal.
- `failureReason` maps `No space left on device`, `not enough space on
the disk` and `os error 28/112` to `FAILURE_REASONS.DISK`. That install
was modified, so it stays `failed`.
</details>
kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Nov 7, 2026
… gaia (amd#6946)

Since v0.26.0-rc6 (amd#6783), a terminal-only install refuses to chat when
the user's models are already on Lemonade. The TUI now asks the bundled
frozen `gaia` whether setup is done. That check only looked for the
agent in `~/.gaia/bin` or the hub install, so it said "the GAIA agent
needs installing" even though `gaia-agent` ships right beside
`gaia-tui`. This is what turned the `win-setup-tui`, `win-setup-both`,
`*-tui-deb`, `fedora-tui-rpm` and `mac-*-tui-pkg` journey rows red on
rc6 and rc7. The check now also counts the agent beside the frozen
`gaia` and, for a frozen `gaia` only, on PATH. The `install-sh` journey
rows were also failing at uninstall because the harness still called
`~/.gaia/venv/bin/gaia`, which the frozen install no longer creates.

## Test plan
- [x] `pytest tests/unit/test_init_command.py`: 198 passed. The two new
"ready" tests fail without the fix. The adversarial cases still report
the agent missing: an agent on a pip install's PATH, beside a source
interpreter, a directory named `gaia-agent`, or a non-executable file.
- [x] Readiness-related suites (setup runner, init profiles and model
choices, hub installer, daemon Lemonade): 605 passed. One failure is
pre-existing and fails the same way on `main` when `gaia-tui` is on the
dev machine's PATH.
- [ ] Installer journeys on this PR: the
`win-setup-tui`/`win-setup-both`, `*-tui-deb`, `fedora-tui-rpm` and
`mac-*-tui-pkg` rows pass health, and the `*-install-sh` rows pass
uninstall and leftovers.
kovtcharov-amd added a commit that referenced this pull request Nov 12, 2026
Main gave the terminal packages and the Windows setup a frozen-core build
(#6783, #7103) that installs the run's own flagship on an RC, so the split's
explicit !cancelled() gates now also require needs.core to succeed; without
that clause a failed core would no longer stop the packages or the setup.
The #6612 leftovers (contributor-triage skill, verified-run skip, the dry
run's ui-rc waiting on the sidecar) take main's side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI changes daemon Daemon supervisor / sidecar control plane devops DevOps/infrastructure changes documentation Documentation changes installer Installer changes sidecar Agent sidecar contract / harness tests Test changes tui Go terminal UI (gaia-tui)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): background goals never run in the desktop app, and each failure burns the hourly tick budget

2 participants