Skip to content

docs(email): point pinned doc links at the tag that exists - #6961

Merged
kovtcharov-amd merged 4 commits into
amd:mainfrom
swastiktawate:fix/3947-email-docs-links
Nov 10, 2026
Merged

kovtcharov-amd merged 4 commits into
amd:mainfrom
swastiktawate:fix/3947-email-docs-links

Conversation

@swastiktawate

@swastiktawate swastiktawate commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Every reference link in the email agent's published docs 404s. The docs pointed at the tag agent-pkg-email-v0.6.0, but 0.6.0 was tagged without the v, so all the links aimed at a tag that never existed. This repoints them at agent-pkg-email-0.6.0, the tag that exists, so the API reference, the AI-integration playbook, the scorecard, the evaluation and the changelog resolve again. The version stamper accepts both tag forms, but the next bump writes the v-form the release workflow documents, so future links match the tags releases create.

Fixes #3947

Test plan

  • pytest hub/agents/email/python/tests/test_stamp_version.py (a bump over no-v links now writes agent-pkg-email-v<version>/)
  • python hub/agents/email/python/packaging/stamp_version.py --check passes on the repointed links
  • Open one repointed link (e.g. the SPEC link in the npm README) and confirm it resolves

The email agent's docs linked every reference at agent-pkg-email-v0.6.0,
a tag that was never created: 0.6.0 was tagged without the v, so all 11
links 404. They now point at agent-pkg-email-0.6.0, the tag that exists.

Fixes amd#3947
@github-actions github-actions Bot added the agent::email Email agent changes label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This fixes the 11 dead reference links in the email agent's npm docs by pointing them at agent-pkg-email-0.6.0, the tag that actually exists. I checked that the tag exists and that all five linked files (SPEC, SKILL, SCORECARD, EVALUATION, CHANGELOG) are present at it, so every rewritten link resolves.

One thing to sort out before the next email release: the version-stamping check no longer recognises these links. It skips them with a warning, not an error, so CI stays green while the next release ships docs still pinned to 0.6.0, with nothing to flag it. The PR description says this, but it's an easy fix. Let the stamp rule accept both tag forms and write the v form, which is the one the release workflow documents and that every earlier release used. Or file a follow-up issue so this doesn't get lost.

Real-world evidence

N/A: docs-only change, and no evidence bundle was produced. The verdict rests on static review, plus a check that agent-pkg-email-0.6.0 exists on the remote and contains every file these links target.

🔍 Technical details

Issues

🟡 Follow-up: email stamp_version pinned-link rule silently stops matching (hub/agents/email/python/packaging/stamp_version.py:174)
The rule's regex is (/amd/gaia/blob/agent-pkg-email-v)([^"/\s)]+)(/). After this PR no link in README/CHANGELOG/EVALUATION matches it. The rule is required=False, so process() records "pinned doc link version not found" under skipped. stamp_version.py --check in release_agent_email.yml:489 and test_email_agent_unit.yml:211 still passes. On the next bump (e.g. 0.6.1) the stamp step leaves these links at 0.6.0 and nothing reports it, which is exactly the drift this rule exists to catch. A minimal fix keeps the guard and puts the links back in the v form at the next stamp:

re.compile(r"(/amd/gaia/blob/agent-pkg-email-)v?([^\"/\s)]+)(/)"),

The stamp lambda would also need to emit f"{m.group(1)}v{version}{m.group(3)}" for this rule. Add a case to test_check_fails_when_a_target_drifts / the fixture in hub/agents/email/python/tests/test_stamp_version.py:103 covering the no-v form, so the regex can't silently drift again.

Note: retagging 0.6.0 as agent-pkg-email-v0.6.0 (the issue's other option) would also fire release_agent_email.yml, whose trigger is agent-pkg-email-*. Rewriting the links is the safer choice here.

Doc drift check: I grepped for agent-pkg-email-v0.6.0. No remaining occurrences in docs/, hub/, or skills, so all 11 links are covered. The other agent-pkg-email-v* references (scorecard_gate.py, eval-scorecard.mdx, the website tests) name tags that exist and are unaffected.

Strengths

The pinned doc link rule only matched the v-form tag (agent-pkg-email-v0.6.0), so after amd#6961 rewrote the links to the tag that exists (agent-pkg-email-0.6.0, no v) the rule skipped all three docs with a warning and --check stayed green while the guard was blind.

Make the v in the rule optional, so the rule matches both tag forms and the shared stamp step keeps the form already in the file. I did not take the reviewer's suggestion to always write the v form: the 0.6.0 release shipped without the v, so stamping the v form back in would point the links at a tag that does not exist.
@github-actions github-actions Bot added the sidecar Agent sidecar contract / harness label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Verdict: Request changes

🟡 The version check now catches drift again, but the next email release will most likely ship the same dead links this PR fixes. When it rewrites the links, the stamp step keeps whatever tag form is already in the file. Right now that's the no-v form, so a 0.6.1 bump will point every link at agent-pkg-email-0.6.1. The release workflow documents agent-pkg-email-v0.1.0 as the tag form, and every release before 0.6.0 used it. A maintainer who follows the docs will push agent-pkg-email-v0.6.1, and all 11 links will 404. CI won't catch it, because the check only compares version numbers.

Have stamping always write the v form, as the earlier review suggested, so the next release moves back to the documented convention.

🔍 Technical details
  • hub/agents/email/python/packaging/stamp_version.py:176: v? now sits inside capture group 1, so the replacement re-emits the existing form. Move it outside the group and write the v explicitly. The other stamp rules use a shared lambda, so this rule needs a replacement of its own:
re.compile(r"(/amd/gaia/blob/agent-pkg-email-)v?([^\"/\s)]+)(/)"),
# replacement: f"{m.group(1)}v{version}{m.group(3)}"
  • --check would then need to accept the 0.6.0 links as they are now (agent-pkg-email-0.6.0, which exists). One way: compare only group 2 in check mode.
  • hub/agents/email/python/tests/test_stamp_version.py: test_stamp_keeps_no_v_form asserts the behaviour that causes the problem. Change it so it asserts agent-pkg-email-v2.0.0/ after the stamp.
  • The workflow strips both forms (release_agent_email.yml:520-521), so either tag form publishes. Nothing ties the links to the tag that actually gets pushed, which is why it matters which form gets stamped.

Stamping kept whichever tag form a link already had, so the next version
bump would have written agent-pkg-email-0.6.1 while the release workflow
documents agent-pkg-email-v<version>, and the links would 404 again. The
rule still accepts both forms, so today's links to the existing
agent-pkg-email-0.6.0 tag pass --check, but a bump now always writes the
v-form.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Thanks for tracking down the broken links, @swastiktawate! I pushed one follow-up: the version stamper now always writes the v-form tag on the next bump, because that's the form the release workflow documents and every release before 0.6.0 used. Your repointed 0.6.0 links stay as they are and still pass --check. I also merged main and refreshed the PR description.

🔍 Technical details
  • Pattern is now (/amd/gaia/blob/agent-pkg-email-)v?([^"/\s)]+)(/), and the rule carries version_prefix="v", written only on stamp; --check compares the version group alone.
  • test_stamp_keeps_no_v_form became test_stamp_writes_v_form_over_no_v_links and asserts agent-pkg-email-v2.0.0/. It fails against the previous stamper; all 21 stamp tests pass.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 10, 2026
Merged via the queue into amd:main with commit 09ec577 Nov 10, 2026
35 checks passed
@kovtcharov-amd kovtcharov-amd mentioned this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent::email Email agent changes sidecar Agent sidecar contract / harness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Every reference link in the published email agent's docs 404s — they point at a tag that was never created (11 links)

2 participants