Skip to content

docs(hooks): cite run-standards.sh blocks by name, not by line number - #349

Merged
twistedmelonman merged 1 commit into
mainfrom
claude/fix-stale-run-standards-citations-51896fa6
Sep 18, 2026
Merged

twistedmelonman merged 1 commit into
mainfrom
claude/fix-stale-run-standards-citations-51896fa6

Conversation

@twistedmelonman

Copy link
Copy Markdown
Owner

Fixes the inconsistency caught by the merge reviewer on #347 and filed as #348: pre-commit/config.yaml cited run-standards.sh:157-161 while lint-yamllint.sh and its test cited 147-150, for the same upstream code.

Both were right, against different revisions

147-150 was correct before smartwatermelon/github-workflows#172 added the canonical shellcheck block above it. 157-161 was correct after. The loop now begins at line 158 — so the citation moved twice within a day, once while this very session was working on it.

That is the real finding, and #348 named it precisely: "a stale line-number citation is the kind of label that reads as authoritative while resolving to the wrong code." It is the same class of defect as a pinned SHA with a stale # v3 comment — the label keeps looking correct long after it stops resolving.

Fix

All five citations now name the block rather than its coordinates — "the yamllint config block in run-standards.sh". That does not drift when unrelated code is inserted above, and unlike a line number it is greppable in the upstream checkout.

The markdownlint citation at config.yaml:154 had already drifted the same way — 193-197 now lands on the block's header comment rather than the merge logic it claims to cite — so it is corrected in the same pass rather than left to be rediscovered.

Verification

Comments only, no behaviour change. Test suite still 8/8. shellcheck -S info clean under the newly-merged canonical standards/shellcheckrc (with a known-bad gate confirming shellcheck actually ran) — this is the first dotfiles change linted against that config since #172 landed.

Closes #348.

https://claude.ai/code/session_011awg91UvzUos9YoXHJ2e8B

PR #347 left two different line citations for the same upstream code --
pre-commit/config.yaml said run-standards.sh:157-161 while lint-yamllint.sh
and its test said 147-150. Filed as #348.

Both were right when written, against different revisions. 147-150 was
correct before github-workflows#172 added the canonical shellcheck block
above it; 157-161 was correct after. The loop now starts at 158, so the
merge moved it again within a day -- which is the actual finding: a line
number into another repo is a label that silently stops resolving to the
code it names, and #348 suggested exactly this fix.

All five citations now name the block ("the yamllint config block in
run-standards.sh"). That does not drift, and it is greppable, which a line
number is not. The markdownlint citation at config.yaml:154 had already
drifted the same way -- 193-197 now lands on the block header rather than
the merge logic -- so it is corrected in the same pass.

No behaviour change; comments only. Test suite still 8/8.

Closes #348.

Claude-Session: https://claude.ai/code/session_011awg91UvzUos9YoXHJ2e8B
@claude

This comment has been minimized.

@claude

claude Bot commented Sep 18, 2026

Copy link
Copy Markdown

All changes are comment-only: stale line-number references replaced with descriptive prose. No executable code, conditions, data paths, or error handling were touched.

VERDICT: PASS

@twistedmelonman
twistedmelonman merged commit d25fe5e into main Sep 18, 2026
5 checks passed
@twistedmelonman
twistedmelonman deleted the claude/fix-stale-run-standards-citations-51896fa6 branch September 18, 2026 18:34
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.

Non-blocking review findings from PR #347 (1)

1 participant