Skip to content

docs(adr): regenerate the ADR summary counts - #2396

Merged
kompiro merged 1 commit into
mainfrom
fix/adr-regenerate-drift
Aug 7, 2026
Merged

kompiro merged 1 commit into
mainfrom
fix/adr-regenerate-drift

Conversation

@kompiro

@kompiro kompiro commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Purpose

Unbreaks main — the ADR validate workflow is failing on 5e066b3c.

Summary

pnpm exec adr regenerate --check reports effective.md and graph.md as stale on main. The drift is two lines: the summary counts at the top of each file.

Cause

#2393 and #2370 landed close together. Each regenerated the derived ADR files against its own base, so the per-ADR entries merged cleanly — both ADR-2393's and ADR-2330's rows are present — but the aggregate counts in the headers were each computed from a main that was one ADR short. Git had no reason to flag a conflict, and neither PR's CI could see it because each validated against its own base.

Changes

-Auto-generated by `pnpm adr:regenerate`. 302 of 311 ADRs are currently `status: accepted`…
+Auto-generated by `pnpm adr:regenerate`. 303 of 312 ADRs are currently `status: accepted`…

-311 ADRs across 15 topics. …
+312 ADRs across 15 topics. …

Nothing else moved: pnpm exec adr regenerate --check now reports all 17 generated files up to date, and pnpm adr:validate passes on 312 ADRs.

Preview URL

N/A — generated docs only

Scope filter (new-feature PRs only)

  • N/A — not a new-feature PR

Dependency & license impact

  • N/A — no production dependency added or bumped across a major version

Manual Verification Checklist

  • N/A — all covered by the ADR validate workflow

TPL impact

Disposition: This is TPL-1032 (derived state staleness) playing out across two concurrent PRs rather than within one. No new TPL — the perspective already names it, and the existing drift guard is what caught it. Worth a follow-up discussion on whether the aggregate counts need to live in the generated files at all, since they are the only part that goes stale from a race; the per-ADR rows merge fine.

Related Docs

  • docs/adr/effective.md, docs/adr/graph.md (both generated by pnpm adr:regenerate)

Two ADR PRs landed close together (#2393 and #2370). Each regenerated the
derived files against its own base, so the entries merged cleanly but the
summary counts at the top of effective.md and graph.md were computed from a main
that was one ADR short. The drift guard on main caught it.

Regenerating only moves the counts: 311 -> 312 ADRs, 302 -> 303 effective.

Co-Authored-By: Claude Fable 5 <[email protected]>
@kompiro
kompiro merged commit faf3fc4 into main Aug 7, 2026
5 checks passed
@kompiro
kompiro deleted the fix/adr-regenerate-drift branch August 7, 2026 23:06
kompiro added a commit that referenced this pull request Aug 8, 2026
adr-tools 0.0.11 stops writing aggregate counts into the files `adr regenerate`
produces. A count is a property of the whole ADR set, so two PRs that each
regenerated against their own base left main with a header that was wrong in a
way git had no reason to flag -- it only surfaced afterwards as a drift-check
failure (#2396).

Regenerating removes the count from the effective.md header, the graph.md
header, and the '— N ADRs' suffix on graph.md's per-topic links. The links
themselves stay.

Progress is tracked outside these files, so nothing is lost by not storing the
numbers; `adr extract effective | wc -l` and `adr validate` still report them
on demand, and `adr visualize` keeps its count because that output is a query
result rather than a versioned file.

Refs kompiro/adr-tools#26

Co-authored-by: Claude Fable 5 <[email protected]>
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.

1 participant