Skip to content

chore(deps): adopt adr-tools 0.0.11 and drop the ADR counts - #2407

Merged
kompiro merged 2 commits into
mainfrom
chore/adopt-adr-tools-0.0.11
Aug 8, 2026
Merged

kompiro merged 2 commits into
mainfrom
chore/adopt-adr-tools-0.0.11

Conversation

@kompiro

@kompiro kompiro commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Purpose

Adopts kompiro/adr-tools#26, released as 0.0.11. Follows up #2396, which was the fix-up commit this change prevents from being needed again.

Summary

adr regenerate no longer writes aggregate ADR counts into the files it produces. Regenerating removes them.

Why

A count is a property of the whole ADR set. Two PRs that each regenerate against their own base produce headers that are individually correct and wrong once merged — and git has no reason to flag it, because the per-ADR rows sit on separate lines and merge cleanly. The stale count only surfaced on main afterwards, as a drift-check failure (#2396).

Removing the only global value is the change proportional to the failure; the per-ADR rows were never the problem. Alternatives were considered and rejected: regenerating post-merge needs a bot writing to main, which this repo has deliberately avoided (ADR-1370), and a merge queue needs an organization-owned repository — kompiro/karasu is owned by a personal account.

Changes

  • @kompiro/adr-tools ^0.0.10 → ^0.0.11
  • pnpm adr:regenerate output:
    • effective.md header — 303 of 312 ADRs are currently status: accepted… → Lists the ADRs that are status: accepted…
    • graph.md header — 312 ADRs across 15 topics. Clusters group by topic… → Clusters group by topic…
    • graph.md per-topic links — - [renderer](graph/renderer.md) — 70 ADRs → - [renderer](graph/renderer.md); the links themselves stay

On losing the numbers

Progress is tracked outside these files, so nothing is lost by not storing them. They remain available on demand — pnpm exec adr extract effective | wc -l gives the effective count and pnpm adr:validate reports the total — and adr visualize still prints a count, because that output is a query result rather than a versioned file.

Verification

  • pnpm exec adr regenerate --check — all 17 generated files up to date
  • pnpm adr:validate — 312 ADRs, no errors
  • pnpm exec adr check-assumptions --quiet — 647 checked, 0 failing
  • pnpm run test:scripts — 262 passed

Preview URL

N/A — tooling and generated docs

Scope filter (new-feature PRs only)

  • N/A — not a new-feature PR

Dependency & license impact

  • N/A — dev dependency, patch bump within the same major

Manual Verification Checklist

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

TPL impact

Disposition: TPL-1032 (derived state staleness) is the perspective this closes out — the stored aggregate was a derived value kept in a second place. No new TPL; the existing drift guard is what caught it and stays in place.

Related Docs

  • docs/adr/effective.md, docs/adr/graph.md (generated)
  • Upstream convention follow-up: kompiro/adr-tools#28

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]>
…-0.0.11

# Conflicts:
#	docs/adr/effective.md
#	docs/adr/graph.md
@kompiro
kompiro merged commit 3b26286 into main Aug 8, 2026
12 checks passed
@kompiro
kompiro deleted the chore/adopt-adr-tools-0.0.11 branch August 8, 2026 15:41
kompiro added a commit that referenced this pull request Aug 9, 2026
Two independent collisions with main.

The generated ADR artifacts (effective.md, graph.md, graph/build.md)
conflicted because adr-tools 0.0.11 dropped the ADR counts from their headers
(#2407) while this branch had regenerated them with the counts still in. Took
main's files and re-ran `pnpm adr:regenerate` rather than hand-resolving
generated output.

The real one was silent: main relocated the security floors to
pnpm-workspace.yaml (#2411 / ADR-2401) and added a rules section saying so,
explicitly warning that older security ADRs point at the dead location. The
section this branch adds pointed at exactly that dead location, and git merged
the two without a conflict. Retargeted the reachable state and the grep to
pnpm-workspace.yaml, and added the lock check as step 4.

ADR-2404 gets the same treatment: assumptions now grep pnpm-workspace.yaml
(the old `grep: package.json :: "dompurify"` would fail now that the pnpm
field is gone), and a note records that the fix moved location mid-flight,
since leaving it in package.json would have made pnpm 11 ignore it silently.

adr:validate 315/0 errors; check-assumptions both ADR-2404 entries pass.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
kompiro added a commit that referenced this pull request Aug 9, 2026
…#2416)

0.0.11 removed the ADR counts from effective.md and graph.md but left
renderTopicMarkdown() writing "N ADRs in this topic" into all 15 committed
docs/adr/graph/*.md pages, so those kept drifting between parallel branches.
PR #2406 hit it: graph/build.md conflicted with 71 / 70 / 72.

adr-tools 0.0.12 (kompiro/adr-tools#30) drops that fourth count and replaces
the two named-file assertions with a sweep over every generated file, so a
future output is covered without anyone remembering to list it.

The lock diff is large but nothing moved version. Comparing name@version
across the lock with peer suffixes stripped, the only resolution changes are
adr-tools 0.0.11 -> 0.0.12 and the drop of @babel/helper-validator-identifier
and @types/estree, which nothing needs any more. The remaining ~550 lines are
pnpm re-keying peer suffixes; a fresh install on main is a no-op, so this is
the graph change re-keying, not pre-existing drift.

Refs #2407

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

This branch was successfully deployed

1 active deployment
preview — 37dc48cc Deployed Aug 8, 2026 by github-actions[bot]
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