Skip to content

docs(adr): renumber the ADR-018 identity stub to ADR-030 - #1463

Merged
lilyshen0722 merged 1 commit into
mainfrom
docs/adr-018-stub-renumber
Sep 2, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
docs/adr-018-stub-renumber

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

main has carried two files named ADR-018 since 2026-08-11:

Disjoint filenames share no text to conflict on, and docs/adr/ has no index, so nothing went red and nothing could. This is the same class as the ADR-025 pair now arriving on #1295, and #1142 / #1424.

Which file moves is determined, not chosen

The stub declares zero D<n> tokens — its headings are "Why this is open" / "The shape of the decision" / "Open questions" / "Deliberately not decided here" / "Not yet decided". Verified at f1e7a92c:

$ git show origin/main:docs/adr/ADR-018-agent-identity.md | grep -coE '\bD[0-9]+\b'
0

So every ADR-018 D<n> citation in the repo — including the four in agentMentionService.ts and the three in CLAUDE.md — can only mean attention-claims. Renaming the stub breaks none of them and disambiguates the rest. Renaming attention-claims instead would break all of them.

Scope

Exactly one reference names the stub by filename anywhere on main — ADR-028's evidence bullet, which cites the duplicate as a missing-record finding. It is updated in place: the finding stands (nothing detected the collision for 22 days, and a third instance arrived before it was resolved), and the tense is corrected.

030 is free against both populations — main carries 001–028, open PRs claim 017/020/024/025. 029 is deliberately left for the Connections ADR.

Why now

@sprint-review has a duplicate-number guard written (globs docs/adr/, groups by number, fails naming both files) and is holding it because it goes red on main today for exactly this pair. That is the whole blocker, and it is a one-file rename rather than a governance call. This is the cheapest form of the question — press it or close it.

Docs-only. After the rename, ls docs/adr/ | grep -oE '^ADR-[0-9]+' | sort | uniq -d returns empty.

🤖 Generated with Claude Code

main has carried two files named ADR-018 since 2026-08-11 —
ADR-018-agent-identity.md (Proposed stub, merged 08-04) and
ADR-018-agent-attention-claims.md (Accepted 08-17). Disjoint filenames share no
text to conflict on and docs/adr/ has no index, so no check could see it.

The stub is the determined mover, not a judgement call: it declares zero
D-numbered decisions, so every `ADR-018 D<n>` citation in the repo already
resolves to attention-claims and this rename breaks none of them. Exactly one
reference names the stub's filename — ADR-028's evidence bullet — updated in
place, keeping the finding and correcting its tense.

030 is free against both populations (main carries 001-028; open PRs claim
017/020/024/025). 029 is left for the Connections ADR.

Unblocks a duplicate-number guard on the merged tree, which goes red on main
today for exactly this pair.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gated at head 4dbdf5f487de32f3e465d04c7fb9c8d45fa8b770, base main = f1e7a92ca. PASS.

All three claims in the PR description re-derived independently:

  1. Stub carries zero D<n> tokens — confirmed, grep -cE '\bD[0-9]+\b' over ADR-018-agent-identity.md at main returns 0. So every ADR-018 D<n> citation in the repo already resolved to attention-claims and the rename moves none of them.
  2. Exactly one filename reference — confirmed, git grep -l ADR-018-agent-identity at main returns only ADR-028-work-claims-and-decision-ledger.md, updated in place here.
  3. uniq -d empty after — confirmed: main has 18 duplicated, the PR head has none.

Two checks beyond the description, both clean:

  • Bare prose ADR-018 citations (19 sites: tests, models/Task.ts, config/native-agents/, reactionController.ts, CLAUDE.md). Every one carries attention-claims semantics — claims, leases, D3/D4/D7/D8, kernel CAS. None means identity. The rename is safe for all of them.
  • Target number free across open PRs. 030 is unclaimed on main and by every open PR that touches docs/adr/. Worth checking explicitly because this exact collision class is live: #1295 adds a second ADR-025 without deleting ADR-025-connector-substrate.md.

The internal header, status line and the renumber note in the moved file are all consistent with the new number.

One note, not a blocker: this clears 018, but the numbering guard isn't in this PR, so nothing catches 025 when #1295 merges. The guard would go red on that merge — which is the desired behaviour, and an argument for wiring it before #1295 rather than after.

@lilyshen0722
lilyshen0722 merged commit 3d3c744 into main Sep 2, 2026
11 checks passed
@lilyshen0722
lilyshen0722 deleted the docs/adr-018-stub-renumber branch September 2, 2026 04:20
lilyshen0722 added a commit that referenced this pull request Sep 2, 2026
* ci(adr): make a duplicate ADR number go red

An ADR number is a name two documents can claim at once, and every
mechanical check we own is blind to it. #1295 and #1268 both added
docs/adr/ADR-025-*.md under different slugs: different filenames, so no
textual conflict, merge-tree clean, all checks green — and main carried
two ADR-025s the moment the second merged. The same thing had already
happened at ADR-018, where the duplicate survived long enough that
#963's author followed the wrong one and shipped a wake-policy
regression.

Both were found by a human reading a directory listing.

Two checks, because the collision has two distinct lifetimes:

  1. Against main-as-it-is-right-now, unioned with this PR's own ADR
     adds/edits/deletes. Catches a PR claiming a number main already
     uses. Verified against #1295's head: exactly one error, ADR-025.

  2. Against the other OPEN PRs, which check 1 cannot see because
     neither tree contains the other's file — the state #1295 and #1268
     were in for days. Older PR keeps the number, newer renumbers, so
     it is always unilaterally fixable rather than a mutual deadlock.

Deliberately not the merge ref. refs/pull/1295/merge still contained the
duplicate ADR-018 an hour after #1463 renumbered it away, so a guard
reading that tree fails a PR for a collision somebody else already
fixed — worse than not running, because it teaches authors the check is
noise.

Deliberately not contiguity: main has no 029 and that is fine.

Both gh calls fail closed. An unchecked API error would produce an empty
ADR list, which reads as "this PR claims nothing" and passes — the guard
at its most reassuring exactly when blind.

Known limit: like every check here, this only runs on a PR event, so it
cannot see main moving underneath a PR that is not pushed to again. That
gap closes with strict: true on the branch protection, not in this file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* ci(adr): add the main-side arm the PR arms structurally cannot cover

The PR arms are triggered by PR events, so a green freezes at the last
one. Two PRs that each passed when last run — one against a main holding
neither number, one before the other pushed its ADR file — can still
merge into a duplicate, and no PR-triggered check can see it happen.

This arm cannot prevent that either. It makes main say so within a
minute, instead of waiting for someone to read a directory listing,
which is how both known duplicates were actually found.

Reds main, deliberately: a duplicated number silently mis-routes every
citation of it, and #963 shipped a wake-policy regression because an
author followed the wrong member of the ADR-018 pair.

Also moves the concurrency group off the PR number, which is empty on a
push event and would put every main build in one group cancelling its
predecessor.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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