Skip to content

Commit 1a6cb8e

Browse files
committed
ci(lint): keep the ADR symbol-anchor sweep out of its collector block
`check-step-collectors --self-test` was red on this branch: • lint.yml "ADR symbol anchors resolve (no line numbers survive)": all green => every command runs (3/2) The counts are (executed / collected), so three ran where two were collected — not the reverse. That gate drives the real `run:` block under `bash -e` with a STUB planted at each collected command's SCRIPT PATH, then holds "all green => every command runs" as an equality. The step ended with a bare `node scripts/check-adr-symbol-anchors.mjs` after the collector's exit guard, which re-invokes the very stub planted for that script's `--self-test` entry — a third execution against two collected commands. Split into two steps: the collector carries the two self-tests and nothing else, and the production sweep is its own step. That is also the shape both existing collectors in this file already have, and it restores the property the split was for — the sweep now runs on its own footing instead of behind the self-tests' `exit 1`. ⛔ No scope change: `docs/adr/**`, the resolver and its corpus registration are untouched. Both invocations the gate's own `--self-test` pins in lint.yml are still present, so the wiring assertion still holds. Refs #13556 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mszp61SetNhQfVGvWh9bNn
1 parent 5b8f2d8 commit 1a6cb8e

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎.github/workflows/lint.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,17 @@ jobs:
21812181
# chained second self-test is neither green nor red — it never runs
21822182
# (#10814). The collector runs both unconditionally and fails at the end
21832183
# naming every one that broke.
2184-
- name: ADR symbol anchors resolve (no line numbers survive)
2184+
#
2185+
# ⛔ AND THE PRODUCTION SWEEP IS A SEPARATE STEP, which is not cosmetic.
2186+
# `check-step-collectors` drives this very block under a real `bash -e`
2187+
# with a STUB planted at each collected command's script path, and holds
2188+
# "all green => every command runs" as an equality. A trailing
2189+
# `node scripts/check-adr-symbol-anchors.mjs` in the same block re-invokes
2190+
# that same stub, so the harness counts 3 executions against 2 collected
2191+
# commands and the gate reds (3/2) — which is exactly what it did here.
2192+
# Both existing collectors in this file carry self-tests ONLY, for the
2193+
# same reason. Keep the sweep out of the collector block.
2194+
- name: ADR symbol-anchor gate self-tests
21852195
run: |
21862196
failed=""
21872197
run_self_test() {
@@ -2202,7 +2212,9 @@ jobs:
22022212
printf "%s" "$failed"
22032213
exit 1
22042214
fi
2205-
node scripts/check-adr-symbol-anchors.mjs
2215+
2216+
- name: ADR symbol anchors resolve (no line numbers survive)
2217+
run: node scripts/check-adr-symbol-anchors.mjs
22062218

22072219
# NOTE: the standing platform test checklist (docs/qa/platform-checklist/)
22082220
# is validated by `pnpm check:platform-checklist`, but by MAINTAINER

0 commit comments

Comments
 (0)