Skip to content

fix(hub): single npm README + fresh catalog on deploy + version on cards - #1836

Merged
kovtcharov merged 2 commits into
mainfrom
fix/website-catalog-cache-bust
Jun 24, 2026
Merged

kovtcharov merged 2 commits into
mainfrom
fix/website-catalog-cache-bust

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Three fixes for what the hub website shows after an agent release — all surfaced while shipping email 0.2.0.

Threads (reviewer can evaluate independently):

  • Single canonical README → the hub shows the right content. The hub renders whatever the release publishes via --readme, which was the python-side README (capabilities narrative — no architecture diagram, no install/usage flow). The npm client README is the richer, actively-maintained one, so it's now the single source published to both npm and the hub. One README per agent (the python one retires with the upcoming agent-structure reorg). ⚠️ Takes effect on the next release — the catalog snapshots the README at publish time, so the live 0.2.0 page still shows the old README until a re-publish.
  • Cache-bust the catalog fetch → no more stale builds. A release publishes the new index.json moments before the website redeploy, but the Cloudflare edge can still serve the previous version's catalog (the deploy races the cache invalidation). The build-time fetch now uses a per-build query param + no-store, so every build pulls fresh from the Worker origin. Build-time only, no runtime cost.
  • Show the agent version on cards. v<latest_version> now appears on the hub listing card and the homepage featured card.

Test plan

  • HUB_CATALOG_URL=https://hub.amd-gaia.ai npm run build in website/ → astro check 0 errors, loads the live catalog, builds /hub + /hub/email (verified locally).
  • Cards show v0.2.0 next to the email agent name.
  • After the next email release, the /hub/email page renders the npm README (architecture diagram + install flow) instead of the python one.
  • python -c "import yaml; yaml.safe_load(open('.github/workflows/release_agent_email.yml'))" parses.

…n cards

Two things:
- Cache-bust the index.json fetch. A release publishes the new catalog moments
  before the website redeploy, but the Cloudflare edge in front of hub.amd-gaia.ai
  can still serve a stale copy (the deploy races the cache invalidation), so the
  site builds from the previous version's catalog. A per-build query param +
  no-store forces a fresh origin fetch — every build reflects the just-published
  catalog. Build-time only, no runtime cost.
- Show the agent version (v<latest_version>) on the hub listing card (AgentRow)
  and the homepage featured card (FeaturedCard).
@kovtcharov
kovtcharov requested a review from itomek-amd June 23, 2026 20:59
@github-actions github-actions Bot added the website GAIA website (amd-gaia.ai) label Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve ✅

This is a small, well-scoped website fix: it cache-busts the build-time hub catalog fetch so a freshly-released index.json can't be masked by a stale Cloudflare edge copy, and it surfaces the agent version on the hub listing and homepage featured cards. The change is correct, the version field it reads is always present in the catalog schema, and the existing fail-loudly behavior on the fetch is preserved. No blocking issues.

The only thing worth a glance is that website component changes have no automated test here — verification is the manual build/astro check in your test plan, which is the right level for this.

🔍 Technical details

Issues

🟢 No automated coverage for the version-on-card change — The two v{agent.latest_version} spans (AgentRow.astro:9, FeaturedCard.astro:21) are verified only by the manual build in the test plan. That's reasonable for Astro presentation components, but worth confirming the /hub and homepage builds in CI before merge. Not a blocker.

🟢 Cache-bust comment is on the longer side (catalog.ts:61-66) — Six lines for the WHY. It reads well and matches this file's existing header-comment style, so leave it; just noting the project's "short or skip" comment guidance if you trim later. No change requested.

Strengths

  • Cache-bust is belt-and-suspenders done right — cache: 'no-store' defeats the fetch-layer HTTP cache while the unique ?t=${Date.now()} query defeats the CDN edge cache (keyed by URL); either alone could miss. Build-time only, so zero runtime cost.
  • Logging/error messages still show the clean url (catalog.ts:68, and all throw sites), not fetchUrl — so logs stay free of ?t= noise and the fail-loudly messages remain readable. Matches the test-plan intent.
  • Type-safe version read — latest_version is a required field on the Agent interface (catalog.ts:36), so the new spans can't render vundefined; no optional-chaining needed.
  • No silent fallback introduced — the existing loud-failure contract on a bad fetch/shape is untouched.

…README

The hub renders whatever the release publishes via --readme, which was the
python-side README (capabilities narrative, no architecture diagram / install
flow). The npm client README is the richer, actively-maintained one (diagram,
version badge, install/usage, ./client) — make it the single source published to
BOTH npm and the hub. Effective on the next release (the catalog snapshots the
README at publish time). The python README is retired with the upcoming
agent-structure reorg.
@kovtcharov kovtcharov changed the title fix(website): cache-bust hub catalog fetch + show agent version on cards fix(hub): single npm README + fresh catalog on deploy + version on cards Jun 23, 2026
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Jun 23, 2026
@kovtcharov
kovtcharov enabled auto-merge June 24, 2026 04:39
@kovtcharov
kovtcharov added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit 9cbb757 Jun 24, 2026
23 checks passed
@kovtcharov
kovtcharov deleted the fix/website-catalog-cache-bust branch June 24, 2026 04:40
@kovtcharov kovtcharov mentioned this pull request Jun 24, 2026
3 of 4 tasks
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Jun 24, 2026
## Why this matters

The live hub page at `hub.amd-gaia.ai/hub/email` is still showing the
**0.2.0** catalog — which snapshots the *old python README* with no
architecture diagram and no npm install flow. amd#1836 (single canonical
npm README + version-on-cards) and amd#1833 (in-repo raw architecture
image) already merged, but the catalog only refreshes its README
snapshot **on a new publish**. This patch cuts that publish.

No client API or wire-contract change — `SCHEMA_VERSION` stays **2.0**.
This is a docs/packaging republish so the hub catalog picks up the
current README (diagram + GAIA/npm install flow + version badge).

The version triple the release gate validates (tag == npm `package.json`
== `gaia-agent.yaml`) is all **0.2.1**, synced from `version.py` (the
source of truth) via `stamp_version.py`.

## Test plan

- [x] `stamp_version.py --check` → all targets match `AGENT_VERSION`
0.2.1 (npm README architecture image correctly SKIPs — it uses the
raw-GitHub URL post-amd#1833)
- [x] npm pre-flight in `hub/agents/npm/agent-email/`: `npm ci && npm
run build && npm test` → 32 passed; `npm pack --dry-run` ships README
(16.2kB) + CHANGELOG
- [x] `test_stamp_version.py` → 10 passed
- [ ] After merge: tag `agent-pkg-email-v0.2.1` from main → freeze →
approve `agent-publish` gate → publish republishes the catalog; confirm
`/hub/email` shows the diagram + npm flow + `v0.2.1`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes website GAIA website (amd-gaia.ai)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants