Skip to content

fix(hub/gaia): commit the real binaries.lock.json hashes from v0.2.0's release - #3932

Merged
kovtcharov-amd merged 1 commit into
mainfrom
fix-binaries-lock-real-hashes
Sep 16, 2026
Merged

kovtcharov-amd merged 1 commit into
mainfrom
fix-binaries-lock-real-hashes

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

The TUI desktop installer builds in `release_components.yml` failed on every platform, even after `agent-pkg-gaia-v0.2.0` published successfully tonight — `fetch_sidecar.py` correctly refused to bundle a sidecar it couldn't verify, because the committed `binaries.lock.json` still had `PENDING-replace-with-real-sha256` placeholders.

Root cause: `release_agent_gaia.yml` regenerates this lock with real hashes at publish time and ships that copy inside the npm tarball, but nothing in this repo pushes commits to `main` — so the source tree's committed lock never gets the real values. This PR commits them by hand, using the exact values tonight's release generated and verified (its own atomicity gate re-fetches and re-hashes every entry against its public URL before the job reports success).

Test plan

  • JSON parses cleanly
  • `python hub/agents/gaia/python/packaging/stamp_version.py --check` — passes
  • Every hash below matches what run 35116325294's "Publish to Hub + npm" job logged after its own successful verification gate

…s release

release_agent_gaia.yml regenerates this lock with real sha256/size values at
publish time and ships that regenerated copy inside the npm tarball, but has
no mechanism to commit it back to main (no workflow in this repo pushes to
main directly) -- so the checked-out source tree kept the committed
PENDING-replace-with-real-sha256 placeholders indefinitely.

That blocked the TUI installer builds in release_components.yml: they read
this committed file directly, not the published npm package's internal copy,
so fetch_sidecar.py correctly refused to bundle an unverifiable sidecar on
every platform even after v0.2.0 published successfully.

Values below are exactly what tonight's agent-pkg-gaia-v0.2.0 run generated,
verified via its own atomicity gate (a live GET + re-hash against each
component's public URL, both lanes) before the job reported success.
@github-actions

Copy link
Copy Markdown
Contributor

Skill audit

Skill Verdict Claimed tier Cleared tiers Findings Rules
hub/agents/gaia/npm ✅ ALLOW experimental experimental 1 high body.injection.credential_request

✅ All audited skills cleared the tier they claim.

Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the skill-audit-reports artifact from this run. Offending source text is withheld from CI everywhere — reproduce it locally with gaia skill audit <dir> --show-snippets.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 264b1e4 Sep 16, 2026
28 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix-binaries-lock-real-hashes branch September 16, 2026 16:55
@github-actions

Copy link
Copy Markdown
Contributor

Approve with suggestions

This replaces the ten placeholder hashes in the flagship agent's binary lock with the real ones from the v0.2.0 release, which unblocks the desktop-installer builds that were failing on every platform. I independently re-downloaded three of the ten binaries from the hub and re-hashed them — the committed values are correct, so the substance of the fix is sound.

Two things worth handling, neither of which blocks the bytes in this PR:

  • Four docs still tell contributors the opposite. They say the checked-in lock always carries placeholders between releases, and one goes further and calls the resulting red installer build "the intended state". After this PR that's no longer true, and three of those files ship inside the published npm package. Worth a one-line fix in each, here or immediately after.
  • The next version bump quietly re-breaks this, in a worse way. The version stamper rewrites the version and download URLs in this file but leaves the hashes alone, so the tree ends up pointing at new URLs with old hashes. Instead of today's clear "placeholder — nothing verifiable published yet" message, a contributor gets a hash-mismatch error that reads like tampering. The durable fix is either resetting the hashes to placeholders on a bump, or having the release pipeline commit the regenerated lock back — the gap the PR description already identifies.

Real-world evidence

An evidence bundle was produced for this change and it's thorough. It built the real @amd-gaia/gaia CLI and showed the before state failing closed and the after state succeeding:

$ node /tmp/gaia-before/dist/cli.js fetch --component tui --cache-dir /tmp/gaia-before-cache
[gaia] PlatformError: binaries.lock.json has a placeholder sha256 for tui/'linux-x64'
(PENDING-replace-with-real-sha256), so no verifiable binary is published for it in this
build. Fetch is blocked so an unverifiable binary can never be trusted. …
EXIT=1

$ node dist/cli.js fetch --component sidecar --sidecar-dir /tmp/gaia-sidecar
[gaia:fetch] installed verified sidecar -> /tmp/gaia-sidecar/gaia-agent
{ "ok": true, "binaries": [ { "component": "sidecar", "platform": "linux-x64",
  "sha256": "6c68a22c25954ea3c8d2a0a541bc04eba2401281d2a2b6448007983acd050a00",
  "cached": false } ] }
EXIT=0

All ten lock entries were fetched and hash-verified there, the fetched TUI ran (gaia 0.24.1, matching the version the lock claims), and the integrity gate was proven live by serving deliberately wrong bytes of the correct size — it raised IntegrityError and wrote nothing. The bundle also honestly records one flake against its loopback mirror (a node stream assertion on the first attempt, clean on re-run) rather than dropping it.

I re-verified three entries myself, straight from the hub rather than from the bundle:

gaia-linux-arm64   31d9e1fee15e4a21e677ca7abb707fcf08257d5e7f50f1baa71bc7159335c170  17105058
gaia-darwin-arm64  dc334e89cebefaa2cc5117942ccbc4dc391034c3013ebf02d2bebf87f5e99a5a  17499282
gaia-agent-darwin-arm64  fbe526e7eb044a2ce633fbd487a1ae75001683eff190d8359eabf9ccc7196069  88311472

All three match the committed hashes and sizes exactly. Rendered TUI pixels and any real LLM turn were marked pending the strix-halo lane, which is fine — this change has no UI surface. The evidence supports the approve verdict.

🔍 Technical details

🟡 Docs claim the committed lock always holds placeholders

Four files state the source-tree invariant this PR reverses. installer/tui/README.md:46-49 is the sharpest — it tells contributors the installer build failing is intended, which is exactly the failure this PR exists to stop:

The lock carries the real hashes from the most recent release, regenerated by
`hub/agents/gaia/python/packaging/gen_binaries_lock.py` at publish time and
committed back. If it ever holds `PENDING-replace-with-real-sha256`, the
installer build fails until the real values land — the same placeholder already
blocks `npx @amd-gaia/gaia`.

Same claim needs the same correction in hub/agents/gaia/npm/README.md:214, hub/agents/gaia/npm/SPEC.md:146, and hub/agents/gaia/npm/SKILL.md:96. Those three ship inside the npm tarball, so the package would publish docs contradicting its own lock (CLAUDE.md, "A functional change must update EVERY doc that describes it"). The behavior being described — a placeholder blocks the fetch before any network call — stays true and shouldn't change; only the "this is the normal committed state" framing is now wrong.

🟡 A version bump leaves the lock internally inconsistent

stamp_version.py:115-138 stamps agentVersion, the sidecar baseUrl, and the sidecar componentVersion from __version__ — but nothing touches sha256/size. The moment __version__ goes to 0.2.1, the committed lock reads baseUrl: …/agents/gaia/0.2.1 with v0.2.0's hashes, and stamp_version.py --check passes. Source-tree consumers (installer/tui/fetch_sidecar.py, release_components.yml) then either 404 or hit IntegrityError, which reads as a supply-chain alarm rather than "the release hasn't run yet".

The release lane itself is still safe: the atomicity gate in release_agent_gaia.yml:1030+ re-GETs and re-hashes every lock entry against its own baseUrl, so a carried-over hash from a missing build leg fails there. But the placeholder backstop at :1000-1020 can no longer distinguish a stale real hash from a fresh one — it only rejects non-hex values, so that layer of defense is now a no-op for this class of drift.

Worth a follow-up issue rather than expanding this PR: either have stamp_version.py reset each entry to the placeholder when it rewrites the version, or close the loop the PR description names — have release_agent_gaia.yml commit the regenerated lock back to main so hand-committing never has to happen again.

🟢 Stale comment in the release workflow

release_agent_gaia.yml:978-981 now describes a state that no longer exists: "that prior entry is the committed PENDING-replace-with-real-sha256 placeholder". After this PR the prior entry is a real hash from the previous release. The surrounding code is unaffected (it pops darwin-x64 unconditionally when the Intel leg is skipped), but the rationale misleads the next reader.

Strengths

  • The hashes are right, and provably so — 10/10 verified in the bundle, 3/10 re-verified here against the live hub. For a file whose entire job is integrity, that's the correct standard of proof.
  • The PR description names the root cause (nothing pushes the regenerated lock back to main) instead of presenting the hand-edit as the fix, which is what makes the follow-up above obvious.
  • Scope is exactly one file and twenty lines, with no drive-by edits — the right shape for an unblock-the-release hotfix.

kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Oct 21, 2026
amd#5447)

Every flagship agent release left `binaries.lock.json` on main stale,
because the release only shipped the real hashes inside the npm tarball.
The installer build and the final core-release check read the committed
copy, so both broke until someone pinned the hashes by hand (amd#3932,
amd#5341). Now the release opens that PR itself once it publishes, so
cutting agent 0.3.1 ahead of v0.25.1 needs a merge, not a hand edit.

Re-running a release is safe: it never opens a second PR, does nothing
when main already matches, and refuses a placeholder lock or one for a
different flagship version. A token that can't push or open PRs fails
the job and names the missing permission. The installer and
release-check errors now point at that PR, and the release docs describe
it.

Closes amd#3949

## Test plan
- [x] `python -m pytest tests/unit/test_open_flagship_lock_pr.py
tests/unit/test_fetch_sidecar.py
tests/unit/test_check_flagship_release.py` (56 passed). The new tests
cover a re-run with the PR already open, hashes already on main,
placeholder and wrong-version locks, main on another flagship version,
and tokens without push or PR permission.
- [x] Release-workflow suites (`test_agent_npm_publish_workflow`,
`test_flagship_rc_assets`, `test_installer_artifacts`,
`test_eval_tag_gate`, `test_gen_binaries_lock`) pass
- [x] `actionlint` on `release_agent_gaia.yml`, `python util/lint.py
--all` (workflow trigger and ancestor-skip checks pass)
- [ ] First real run: `agent-pkg-gaia-v0.3.1` opens `chore(release): pin
flagship agent 0.3.1's published hashes`
kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Nov 7, 2026
…o date (amd#6941)

The flagship agent's docs still said 0.1.1, and told maintainers that
`PENDING` placeholder hashes are the normal state of
`binaries.lock.json` between releases. Since amd#3932 the committed lock
always carries real hashes, because a placeholder there breaks the
desktop-installer build on every platform, so following the old text
would bring that breakage back. The version labels now say 0.3.5, and
the hash policy says a placeholder only comes from a hand-edited lock.

Closes amd#3953

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

- Already fixed on main before this PR: the CHANGELOG entries and the
tool count (105 everywhere).
- The SPEC §2.1 schema example now matches the committed lock (sidecar
0.3.5, TUI 0.25.0).
- The guide's limitations still hold on 0.3.5, so only the heading
changed: `skill_sets` is still commented out in `gaia-agent.yaml`, and a
one-shot `/query` still refuses a gated tool.
- The SPEC version line is not stamped by `stamp_version.py`, so it will
drift again at the next release. I can add an optional stamp rule in a
follow-up if you want one.
</details>

## Test plan
- [ ] `python util/check_doc_links.py --internal-only` and `python
util/check_doc_versions.py` pass
- [ ] `grep -rn "Between releases" hub/agents/gaia/npm` returns nothing
- [ ] The versions in the SPEC §2.1 example match
`hub/agents/gaia/npm/binaries.lock.json`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant