Skip to content

fix(agent-email): use in-repo raw image for README architecture diagram - #1833

Merged
kovtcharov-amd merged 2 commits into
mainfrom
fix/email-readme-architecture-image
Jun 23, 2026
Merged

kovtcharov-amd merged 2 commits into
mainfrom
fix/email-readme-architecture-image

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

The email agent's 0.2.0 README embeds its architecture diagram from https://hub.amd-gaia.ai/agents/email/0.2.0/architecture.webp — but nothing publishes that asset there (the release pipeline uploads only the manifest, binary, and README; assets/ isn't in the npm files), so the image would 404 on npmjs.com and the hub page the moment 0.2.0 ships. This points the diagram at the in-repo asset via raw.githubusercontent.com/.../assets/architecture.webp (which resolves today), so the README renders correctly with no pipeline change — unblocking a clean 0.2.0 release. Since the version is no longer in the image URL, it adds a clear npm-version badge + the SCHEMA_VERSION 2.0 contract line at the top.

The proper fix — publishing the asset to the versioned hub path and restoring that URL — is tracked in #1832. The stamp_version.py --check now skip-warns the (absent) versioned architecture URL, which is non-fatal (exit 0, confirmed).

Test plan

  • python hub/agents/python/email/packaging/stamp_version.py --check → exit 0 (architecture.webp shows SKIP, all else OK).
  • grep -c "hub.amd-gaia.ai/agents/email/.*architecture" hub/agents/npm/agent-email/README.md → 0.
  • README renders: version badge + SCHEMA_VERSION 2.0 at the top; the architecture image loads from the raw GitHub URL.

The 0.2.0 README pointed its architecture diagram at the versioned hub path
hub.amd-gaia.ai/agents/email/0.2.0/architecture.webp, but the release pipeline
never publishes that asset (publish_to_r2.py uploads only manifest/binary/readme;
assets/ isn't in npm files) — so the image would 404 on npmjs.com / the hub page.
Point it at the in-repo asset via raw.githubusercontent.com (resolves today), and
add a clear version badge + contract version since the version is no longer in the
image URL. The stamp_version --check now skip-warns the architecture URL (non-fatal,
exit 0). Tracked in #1832 to wire the asset upload and restore the versioned URL.
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve ✅

This is a clean, tightly-scoped doc fix. The 0.2.0 README pointed its architecture diagram at a versioned hub.amd-gaia.ai URL that nothing in the release pipeline actually publishes (the assets/ dir isn't in the npm files list), so the image would have 404'd on npmjs.com the moment 0.2.0 shipped. Repointing it at the in-repo raw.githubusercontent.com asset fixes the broken render with no pipeline change, and the proper versioned-hosting fix is correctly deferred to #1832.

I reproduced all three test-plan items locally and they pass: stamp_version.py --check exits 0 (the architecture URL now shows SKIP, everything else OK), the old hub URL is gone (grep count 0), and the in-repo asset exists at exactly the path the new URL resolves to. The added SCHEMA_VERSION 2.0 badge line is accurate. Nothing blocking.

🔍 Technical details

Verification performed:

  • python hub/agents/python/email/packaging/stamp_version.py --check → exit 0. The "npm README image" rule (stamp_version.py:142-148, regex (/agents/email/)([^"/\s)]+)(/architecture\.webp)) no longer matches the new raw URL, so it lands in result.skipped — which by design never affects the exit code (stamp_version.py:222-239). Confirmed non-fatal.
  • grep -c "hub.amd-gaia.ai/agents/email/.*architecture" README.md → 0.
  • Asset present at hub/agents/npm/agent-email/assets/architecture.webp (69 KB), exactly the path the new raw.githubusercontent.com/amd/gaia/main/hub/agents/npm/agent-email/assets/architecture.webp URL resolves to.
  • SCHEMA_VERSION = "2.0" confirmed as the source of truth in contract.py:60 and src/types.ts:27, so the new badge line is correct.

🟢 Minor — raw URL pins to a mutable main (README.md:18). raw.githubusercontent.com/.../main/... is unversioned, so a future rename/move of the asset silently breaks the 0.2.0 README render, and the image won't match the binary the user installed. This is an acceptable interim tradeoff given the versioned-hub fix is explicitly tracked in #1832 — no change needed here, just noting the diagram is now content-mutable until that lands.

🟢 Minor — SCHEMA_VERSION 2.0 is hand-maintained (README.md:8). Unlike the npm-version badge (which shields.io pulls live), the contract version is hardcoded prose and isn't covered by stamp_version.py, so it can drift on the next contract bump. Low risk for a one-line badge; worth a passing thought if the README grows more contract references.

Strengths:

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit 853e493 Jun 23, 2026
26 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/email-readme-architecture-image branch June 23, 2026 17:56
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants