docs(bgp-policy): the two _help() anchors point at _help(), not 42 lines above it #2106

Merged
jaylouisw merged 1 commit from fix/1119-0632 into main 2026-11-19 06:54:20 +00:00
Owner

What was wrong

docs/BGP-POLICY.md cites _help() twice at cli.js:6997. _help() is defined at engine/cli.js:7039, so both anchors land 42 lines above the function, in _bgp(tokens) territory. The repo's own diagnostic says so:

$ node scripts/check-doc-citations.js --strict
Citations in docs: 356 — 19 judged against a unique definition, 264 lines left to a reader
Suspects (2, allowed drift 40 lines):
  docs/BGP-POLICY.md:76  cli.js:6997 is 42 lines from _help() at line 7039
  docs/BGP-POLICY.md:824  cli.js:6997 is 42 lines from _help() at line 7039
exit=1

A pointer into the wrong code is worse than no pointer — it is what §9.4 asks a reader to append to.

What changed

Both citations re-pointed at cli.js:7039, the line that reads _help() {. Prose unchanged; the plan itself is not re-litigated. Same repair as #2086, #2050, #2015.

$ node scripts/check-doc-citations.js --strict
Citations in docs: 356 — 19 judged against a unique definition, 264 lines left to a reader
No judged citation is more than 40 lines from the code it names.
exit=0

Gates

  • node scripts/syntax-check.js — 443 files, all OK
  • node scripts/check-doc-citations.js --strict — 0 suspects, was 2 (exit 1 -> 0)
  • npm test on the base commit 31a0b297 — 364 suites, 12420 assertions, 0 failed (docs-only diff, suite not re-run after the edit)
## What was wrong `docs/BGP-POLICY.md` cites `_help()` twice at `cli.js:6997`. `_help()` is defined at `engine/cli.js:7039`, so both anchors land 42 lines above the function, in `_bgp(tokens)` territory. The repo's own diagnostic says so: ``` $ node scripts/check-doc-citations.js --strict Citations in docs: 356 — 19 judged against a unique definition, 264 lines left to a reader Suspects (2, allowed drift 40 lines): docs/BGP-POLICY.md:76 cli.js:6997 is 42 lines from _help() at line 7039 docs/BGP-POLICY.md:824 cli.js:6997 is 42 lines from _help() at line 7039 exit=1 ``` A pointer into the wrong code is worse than no pointer — it is what §9.4 asks a reader to append to. ## What changed Both citations re-pointed at `cli.js:7039`, the line that reads `_help() {`. Prose unchanged; the plan itself is not re-litigated. Same repair as #2086, #2050, #2015. ``` $ node scripts/check-doc-citations.js --strict Citations in docs: 356 — 19 judged against a unique definition, 264 lines left to a reader No judged citation is more than 40 lines from the code it names. exit=0 ``` ## Gates - `node scripts/syntax-check.js` — 443 files, all OK - `node scripts/check-doc-citations.js --strict` — 0 suspects, was 2 (exit 1 -> 0) - `npm test` on the base commit 31a0b297 — 364 suites, 12420 assertions, 0 failed (docs-only diff, suite not re-run after the edit)
docs(bgp-policy): the two _help() anchors point at _help(), not 42 lines above it
All checks were successful
CI / Classify the change (pull_request) Successful in 12s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 9s
CI / Server smoke test (pull_request) Has been skipped
CI / Docker build (pull_request) Has been skipped
CI / Test (Node 20) (pull_request) Successful in 59s
CI / Test (Node 22) (pull_request) Successful in 1m0s
CI / Test (Node 18) (pull_request) Successful in 1m5s
CI / Arm auto-merge (pull_request) Successful in 5s
49c8bb4aa0
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-19 06:38:12 +00:00
jaylouisw deleted branch fix/1119-0632 2026-11-19 06:54:25 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!2106
No description provided.