Skip to content

[TASK] DX — add a self-updating version badge to the README (don't hardcode the number) #1346

Description

@piotrswierzy

Problem / Context

README.md carries three badges (README.md:3-5): CI (dynamic), License (static, low-churn), and Status: alpha (static, links to #670). There is no version badge — a reader can't tell from the README which release OpenLinker is on.

The naive fix — writing v0.1.0 into the README — is the wrong move: it would go stale the instant the next release cuts (e.g. #13450.1.1), and the README is the one place nobody remembers to update. That's the exact drift class we've been closing this session (stale bootstrap-sha, doc-vs-config mismatches). The version now has a single canonical source already — the git tag / GitHub Release that release-please manages (shipped in #1332), which is the same source GET /v1/health reports and the CHANGELOG compare links key off (see ADR-029 § the four version axes). The README badge should read from that source, not duplicate it.

Separately, the prose at README.md:13 (> **Status: alpha, pre-1.0.** First public release is in progress.) is now stalev0.1.0 is tagged (at e6298374) and its GitHub Release is being published.

Proposed Solution

Two axes, handled differently by churn rate:

  1. Version (high-churn) → dynamic badge, never a literal. Add a shields.io badge to the README.md:3-5 badge block. Two acceptable variants — pick one:

    • [![Release](https://img.shields.io/github/v/release/openlinker-project/openlinker)](https://github.com/openlinker-project/openlinker/releases) — reads the latest published GitHub Release. Truest "what's released," same source as /v1/health. Caveat: renders "no releases" until the v0.1.0 GitHub Release is published (a manual step in progress).
    • [![Version](https://img.shields.io/github/package-json/v/openlinker-project/openlinker)](./CHANGELOG.md) — reads version from the root package.json on main (already 0.1.0). Works immediately, decoupled from Release-publish timing, and stays in lockstep because release-please only bumps that field when a Release PR merges.
    • Recommendation: package-json/v — correct right now regardless of when the v0.1.0 Release is published, and it points readers at the CHANGELOG rather than a possibly-empty Releases page.
  2. Maturity (low-churn) → keep the static alpha badge as-is (README.md:5). It changes ~twice in the project's life (alpha → beta → 1.0), maps to the 0.x SemVer convention, and is correctly hardcoded. Do not fold version and maturity into one badge.

  3. De-stale the prose at README.md:13: keep it maturity-only and version-agnostic so it can't re-drift, e.g. > **Status: alpha, pre-1.0.** Expect rough edges; report them. (drop "First public release is in progress"). Let the badge carry the number.

Classification

Type: DX (documentation / release presentation)
Layer: Shared / repo root
File(s): README.md (badge block :3-5, prose :13)

Dependencies

Assumptions

  • README-only change; no app code, no FE component, no migration.
  • The package-json/v badge is preferred (works immediately); implementer may substitute v/release if the team prefers "published Release" semantics and accepts the empty-until-published window.
  • The existing Status: alpha badge and its #670 link stay untouched.

Acceptance Criteria

  • README renders a version badge in the :3-5 block that resolves to the current version with no hardcoded number in the markdown source (the version appears only inside the shields.io URL slug, not as literal text).
  • The badge auto-reflects a version bump: after chore(main): release 0.2.0 #1345 merges (→ 0.1.1), the badge shows the new version with zero README edits (verify by confirming the badge URL reads from Releases or root package.json, both of which release-please updates).
  • The Status: alpha badge (README.md:5) is unchanged.
  • The README.md:13 prose no longer claims "First public release is in progress" and carries no literal version number.
  • pnpm lint (incl. check:invariants / scripts/check-repo-urls.mjs) passes — the new shields.io URL uses the canonical openlinker-project/openlinker slug and trips no repo-URL guard.
  • No architecture boundary violations (docs-only change).

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions