Skip to content

test(docs): C-80 — scan ADRs and CICs; three stale paths found and fixed - #223

Merged
Polichinel merged 1 commit into
developmentfrom
test/c80-scan-adrs-and-cics
Aug 5, 2026
Merged

test(docs): C-80 — scan ADRs and CICs; three stale paths found and fixed#223
Polichinel merged 1 commit into
developmentfrom
test/c80-scan-adrs-and-cics

Conversation

@Polichinel

Copy link
Copy Markdown
Collaborator

B5. ADRs and CICs were exempt from the deleted-symbol scan. Right in principle — an ADR legitimately records superseded designs, and a scan that fires on history gets deleted (ADR-014 §3) — and far too wide in practice. It is how a CIC came to name a collaborator its class had never called, in six places, for weeks.

The design was chosen by measurement, not argument

candidate check hits verdict
path resolution over ADRs 29 not built — inspection showed most were correct history, other repos' files, or paths inside URLs
deleted-symbol list over ADRs 22 (14 in ADR-011 alone) built, with escapes
deleted-symbol list over CICs 0 built

I built the measurement first and then declined to build the check it argued against. That is the cry-wolf outcome this entry predicted, confirmed before writing code rather than after shipping it.

Three of the hits were real

ADR-013 still cited unfao/historical.py, unfao/wire/ and unfao/wire/source_selection.py — all moved to contract/ by #153. Fixed. Three genuine defects hiding among five markable ones is the ratio that justified turning the scan on.

Two escapes, both declared rather than inferred

Line-scoped legacy-ok for an isolated historical mention; a new file-level <!-- legacy-ok-file: … --> for a document whose subject is a retirement. ADR-011 earned it — it is the decision to remove the runtime mapper, so its subject appears fourteen times, correctly. Marking fourteen lines would be noise pretending to be rigour.

A second guard pins the file-level exemption set to that one document, so a third shows up in a diff rather than becoming a quiet way to silence the check.

A check nothing else could have made

test_a_cic_does_not_name_a_collaborator_its_class_never_calls asserts that a class a CIC names is actually referenced by the class it documents. That is the GaulLookupEnricher failure — which no path check and no symbol list would have caught at the time, because the class existed and every path resolved.

Exception types are excluded, and the distinction is the point: a collaborator is something the class reaches for; an exception is something that passes through it. The first draft flagged CoverageError, LaunchConfigError and SourceSelectionError, all of which the manager legitimately propagates.

The mutation campaign found a miss in the previous change

Reintroducing the exact GaulLookupEnricher sentence did not fail. The collaborator check only sees classes that still exist, and C-75 had deleted that one.

The real gap: the deletion never extended the deleted-symbol list — which that list's own comment demands in as many words:

A deletion PR that does not extend this regex has not finished.

Extended here; the reintroduction now fails. Four further historical mentions written yesterday were flagged by the extension and marked.

Verification

Four guards, all mutation-proven: a stale path reappearing in an ADR, the file-level escape used on a live document, a CIC with no declared subject, and the reintroduced collaborator.

356 passed / 40 xfailed / 0 failed
ruff check .  ->  All checks passed!

Register 83 / 11 open / 72 resolved.

ADRs and CICs were exempt from the deleted-symbol scan. That exemption is right in
principle -- an ADR legitimately records superseded designs, and a scan that fires on
history gets deleted (ADR-014 s3) -- and far too wide in practice: it is how a CIC came
to name a collaborator its class had never called, in six places, for weeks.

The design was chosen by measurement, not argument
- A path-resolution check over ADRs would have fired 29 times. Inspecting them showed
  most were correct history, other repos' files, or paths inside URLs. Built the
  measurement first, then did NOT build the check.
- The curated deleted-symbol list was the narrower instrument: 22 hits over ADRs, ZERO
  over CICs. Fourteen of the 22 were in ADR-011 alone.

Three of the hits were real: ADR-013 still cited unfao/historical.py, unfao/wire/ and
unfao/wire/source_selection.py, all moved to contract/ by #153. Three genuine defects
among five markable ones is the ratio that justified turning the scan on.

Two escapes, both declared rather than inferred
Line-scoped `legacy-ok` for an isolated mention; a new file-level `legacy-ok-file` for a
document whose SUBJECT is a retirement. ADR-011 earned it -- it IS the decision to
remove the runtime mapper, so its subject appears fourteen times, correctly. A second
guard pins the exemption set to that one document, so a third shows up in a diff.

A check nothing else could have made
test_a_cic_does_not_name_a_collaborator_its_class_never_calls asserts that a class a CIC
names is actually referenced by the class it documents -- the GaulLookupEnricher
failure, which no path check and no symbol list would have caught at the time, because
the class existed and every path resolved. Exception types are excluded: a collaborator
is something the class reaches for, an exception something that passes through, and the
first draft flagged three the manager legitimately propagates.

The mutation campaign found a miss in the PREVIOUS change
Reintroducing the exact GaulLookupEnricher sentence did NOT fail. The collaborator check
only sees classes that still exist, and C-75 had deleted that one. The real gap was that
the deletion never extended the deleted-symbol list -- which that list's own comment
demands in as many words: "A deletion PR that does not extend this regex has not
finished." Extended here; the reintroduction now fails. Four further historical mentions
written yesterday were flagged by the extension and marked.

Four guards, all mutation-proven: stale path in an ADR, the file-level escape used on a
live document, a CIC with no declared subject, and the reintroduced collaborator.

356 passed / 40 xfailed / 0 failed. ruff clean. Register 83/11/72.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Polichinel
Polichinel merged commit 758490c into development Aug 5, 2026
4 checks passed
@Polichinel
Polichinel deleted the test/c80-scan-adrs-and-cics branch August 5, 2026 07:21
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