Skip to content

fix(#562): guard hero pill + releases metric against version drift#563

Merged
atlas-apex merged 1 commit into
devfrom
fix/GH-562-site-version-guard
Jun 7, 2026
Merged

fix(#562): guard hero pill + releases metric against version drift#563
atlas-apex merged 1 commit into
devfrom
fix/GH-562-site-version-guard

Conversation

@atlas-apex

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes the stale marketing-site version that shipped with v3.0.0: the hero pill read apexyard v2.2 (next to a correct v3.0.0 link) and the releases-shipped metric read 12 / (v0.1 → v2.2). Now v3.0 and 14 / (v0.1 → v3.0).
  • Hardens the durable guard test_site_counts.sh so this can't recur: it previously asserted only the JSON-LD softwareVersion, leaving six of the seven /release §3.5 version strings unguarded — which is exactly how the pill + metric drifted while CI stayed green. The guard now also checks the hero pill (major.minor), the releases-shipped count (vs grep -cE '^## \[[0-9]' CHANGELOG.md), and the range against the CHANGELOG top entry.
  • Updates /release §3.5's guard note to match the expanded coverage.

Root cause + analysis filed as #562.

Testing

  1. bash .claude/hooks/tests/test_site_counts.sh → PASS (4 version asserts green: softwareVersion, pill, releases count, range).
  2. Negative test: revert the pill to v2.2 → guard exits 1 with FAIL: site hero pill 'apexyard v2.2' but CHANGELOG major.minor is 3.0. Restored → PASS.
  3. markdownlint-cli2 .claude/skills/release/SKILL.md → 0 errors.

Refs #562

Glossary

Term Definition
hero pill The version badge at top-left of site/index.html (<span class="pill">apexyard vX.Y</span>).
releases-shipped metric The site stat showing release count + range (N · (v0.1 → vX.Y)).
durable guard test_site_counts.sh, run on every PR via site-counts-check.yml, that fails CI when site version strings drift from CHANGELOG.md.
§3.5 The /release skill step that bumps the seven hard-coded site version strings on each cut.
major.minor The X.Y portion of a semver X.Y.Z — what the pill and range display.

- Correct stale site/index.html strings: hero pill v2.2→v3.0, releases
  metric count 12→14 and range (v0.1 → v2.2)→(v0.1 → v3.0).
- Extend test_site_counts.sh to assert the hero pill (major.minor),
  releases-shipped count, and range against CHANGELOG — previously only
  softwareVersion was guarded, so six of the seven /release §3.5 strings
  could drift with green CI (how v2.2 survived the v3.0.0 cut).
- Update /release SKILL §3.5 guard note to match the expanded coverage.

Refs #562

@atlas-apex atlas-apex left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: PR #563 — Verdict: APPROVED

(Submitted as a comment because GitHub blocks self-approval on this account; the code-review verdict is APPROVED and the Rex approval marker is written.)

Commit: d876035c4574d2fc6ca8361306c33733e4f1a889

Summary

Corrects two stale marketing-site version strings that shipped with v3.0.0 (hero pill v2.2v3.0; releases metric 12 / (v0.1 → v2.2)14 / (v0.1 → v3.0)), and — the more durable part — extends test_site_counts.sh so the same drift can't recur. The guard previously asserted only the JSON-LD softwareVersion, leaving the pill and the releases metric unguarded; that's exactly how they drifted while CI stayed green. SKILL.md §3.5's guard note is updated to match.

Checklist Results

  • ✅ Architecture & Design: Pass (no architectural surface; test/doc/site strings only)
  • ✅ Code Quality: Pass
  • ✅ Testing: Pass (guard hardened; verified clean pass + exit-1 on forced drift)
  • ✅ Security: Pass (no secrets; "token" match is a pre-existing llm:token-count comment)
  • ✅ Performance: Pass (N/A)
  • ✅ PR Description & Glossary: Pass (clear narrative summary, glossary present)
  • ✅ Summary Bullet Narrative: Pass (all bullets state what + why)
  • ✅ Technical Decisions (AgDR):N/A (bug fix + test hardening, no new decision)
  • ✅ Adopter Handbooks: N/A (only always-load handbooks exist; none of their triggers fire on this diff — no migration files, no architecture-layer code)

Verification performed locally (at HEAD d876035)

  • CHANGELOG facts confirmed: top entry ## [3.0.0], grep -cE '^## \[[0-9]' CHANGELOG.md = 14, major.minor 3.0.
  • Site strings confirmed: pill apexyard v3.0 (L1568), <strong>14</strong> + range (v0.1 → v3.0) (L1695–1696).
  • Each new extraction run standalone: PILL_MM=3.0, RANGE_MM=3.0 (arrow-agnostic [^)]* works; tail -1 correctly picks the end version), SHIPPED_COUNT=14 (grep -B1 grabs the <strong> line above the metric).
  • Full guard: exit 0 clean; forced pill drift to v2.2: exit 1 with the expected FAIL message; restored: exit 0.
  • markdownlint-cli2 .claude/skills/release/SKILL.md: 0 errors.
  • SKILL.md prose matches the implementation (count source grep -cE '^## \[[0-9]' CHANGELOG.md is stated verbatim).

Issues Found

None.

Suggestions (non-blocking)

  • nit: RANGE_MATCH anchors on the literal v0.1 (\(v0\.1). Correct for today's v0.1 start, but if the start version ever became v0.10 the prefix would still match and RANGE_MM's tail -1 would silently keep working — fine now, just a latent coupling to the literal start version. No action needed unless the start anchor ever changes.

Verdict

APPROVED

The fix is correct, the version strings match the CHANGELOG, and the hardened guard is robust (arrow-agnostic, correct end-version selection, correct count extraction) and verified to fail on drift — which closes the recurrence path that #562 identified. The test change is the real value here, not just the string bump.


🤖 Reviewed by Rex (Code Reviewer Agent)
📌 Reviewed commit: d876035c4574d2fc6ca8361306c33733e4f1a889

@atlas-apex atlas-apex merged commit a7f5f34 into dev Jun 7, 2026
9 checks passed
@atlas-apex atlas-apex deleted the fix/GH-562-site-version-guard branch June 7, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants