Skip to content

Conversation

@konard
Copy link
Contributor

@konard konard commented Jan 16, 2026

Summary

  • Fixed shields.io badge URL generation that was broken for releases with tag prefixes (js-, rust-)
  • Added comprehensive case study documentation in docs/case-studies/issue-123
  • Added experiment script to test badge URL generation

Problem

The release js-v0.8.4 showed a "404 badge not found" error instead of the npm version badge. This was caused by passing the full tag (js-v0.8.4) to the badge URL instead of just the version (0.8.4).

Root Cause

Shields.io static badges use dashes (-) as delimiters:

https://img.shields.io/badge/LABEL-MESSAGE-COLOR

When the version included the prefix (npm-js-v0.8.4-blue), shields.io interpreted it as:

  • Label: npm
  • Message: js
  • Color: v0.8.4-blue (invalid!)

Solution

Changed format-github-release.mjs to pass v${version} instead of ${tag} to format-release-notes.mjs, ensuring the badge URL contains only the version number.

Test plan

  • Verified badge URL generation with experiment script (experiments/test-badge-url.mjs)
  • Confirmed correct URL: https://img.shields.io/badge/npm-0.8.4-blue.svg returns valid badge
  • Confirmed broken URL: https://img.shields.io/badge/npm-js-v0.8.4-blue.svg returns "404 badge not found"
  • Next release should display correct npm badge

Fixes #123


🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #123
@konard konard self-assigned this Jan 16, 2026
konard and others added 2 commits January 16, 2026 07:41
The badge URL was broken for releases with tag prefixes (js-, rust-).
The format-github-release.mjs script was passing the full tag (js-v0.8.4)
to format-release-notes.mjs, but shields.io uses dashes as delimiters
in static badge URLs, causing "404 badge not found" errors.

Changes:
- Fix format-github-release.mjs to pass "v${version}" instead of "${tag}"
- Add comprehensive case study documentation in docs/case-studies/issue-123
- Add experiment script to test badge URL generation

Root cause: shields.io parses "npm-js-v0.8.4-blue" as:
  LABEL="npm", MESSAGE="js", COLOR="v0.8.4-blue" (invalid)

Fixes #123

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add collected evidence:
- data/release-info.json: GitHub release metadata
- data/pr-122-info.json: PR details and commits
- data/pr-122-diff.txt: Code changes from the problematic fix
- data/issue-121-details.txt: Original issue that triggered the bug
- data/ci-run-21057802787.log: CI workflow execution logs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] badge not found fix: correct shields.io badge URL in release notes Jan 16, 2026
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 16, 2026 06:48
@konard
Copy link
Contributor Author

konard commented Jan 16, 2026

⚠️ Solution Draft Finished with Errors

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $4.965588 USD
  • Calculated by Anthropic: $0.000000 USD
  • Difference: $-4.965588 (-100.00%)

Note: The session encountered errors during execution, but some work may have been completed. Please review the changes carefully.

📎 Log file uploaded as Gist (750KB)
🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

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.

badge not found

2 participants