docs(BGP-POLICY): the anchor table points at the code that holds the symbols again #2050

Merged
jaylouisw merged 1 commit from docs/1118-2317 into main 2026-11-18 23:37:50 +00:00
Owner

What was untrue

The anchor table in docs/BGP-POLICY.md §1 cites engine/cli.js and engine/simulator.js by line. Five of those anchors no longer hold the code the row names, and the same stale numbers are repeated in §4.4, §6.3, §7.4, §9.1, §9.2, §9.4, §9.6 and §11.

Cited Actually What is there now
cli.js:6767 _help() cli.js:6859 6767 is inside _showIpv6Nd() (92 lines away)
cli.js:2610 _bgp(tokens) cli.js:2633
cli.js:2679 this._dnsZone cli.js:2702 this._dnsZone = z.name;
cli.js:1564-1582 config-mode BGP dispatch cli.js:1581-1599 1564-1582 is the IPv6 gateway / no ipv6 / ipv6 nd branches
simulator.js:1907-1957 + lines 1913/1918/1919/1924 1905-1958 + 1914/1919/1920/1925 every quoted line inside the loop had moved by one
simulator.js:1871-1874 {type:"bgp"} emit 1872-1875 this._emit({ … })
cli.js:981, :1181 for the % Incomplete command style cli.js:998, :1198 981 is iface.natRole = null;, 1181 is a ternary tail
cli.js:1580 for _bgp(tokens.slice(1)) on neighbor cli.js:1597

Citations verified by reading the cited lines in this tree; node scripts/check-doc-citations.js --strict now reports "No judged citation is more than 40 lines from the code it names" (before: 2 suspects, docs/BGP-POLICY.md:76 and :824 at 92 lines).

What changed

Numbers only — no prose, no behaviour, no code.

Gates

  • node scripts/syntax-check.js — 429 files, all OK
  • node scripts/check-control-bytes.js — clean
  • node test/docs-show-commands.test.js — 7 passed / 0 (59 forms, 118 commands)
  • node test/docs-cli-transcript.test.js — 4 passed / 0
  • node test/help-completeness.test.js — 8 passed / 0
  • node test/no-form-help-key.test.js — 81 passed / 0; help-key-is-not-a-value 40 / 0; help-key-works-in-every-prompt 10 / 0
  • node scripts/check-doc-citations.js --strict — 0 suspects (was 2)
## What was untrue The anchor table in `docs/BGP-POLICY.md` §1 cites `engine/cli.js` and `engine/simulator.js` by line. Five of those anchors no longer hold the code the row names, and the same stale numbers are repeated in §4.4, §6.3, §7.4, §9.1, §9.2, §9.4, §9.6 and §11. | Cited | Actually | What is there now | |---|---|---| | `cli.js:6767` `_help()` | **`cli.js:6859`** | 6767 is inside `_showIpv6Nd()` (92 lines away) | | `cli.js:2610` `_bgp(tokens)` | **`cli.js:2633`** | | | `cli.js:2679` `this._dnsZone` | **`cli.js:2702`** | `this._dnsZone = z.name;` | | `cli.js:1564-1582` config-mode BGP dispatch | **`cli.js:1581-1599`** | 1564-1582 is the IPv6 gateway / `no ipv6` / `ipv6 nd` branches | | `simulator.js:1907-1957` + lines 1913/1918/1919/1924 | **`1905-1958`** + 1914/1919/1920/1925 | every quoted line inside the loop had moved by one | | `simulator.js:1871-1874` `{type:"bgp"}` emit | **`1872-1875`** | `this._emit({ … })` | | `cli.js:981`, `:1181` for the `% Incomplete command` style | **`cli.js:998`, `:1198`** | 981 is `iface.natRole = null;`, 1181 is a ternary tail | | `cli.js:1580` for `_bgp(tokens.slice(1))` on `neighbor` | **`cli.js:1597`** | | Citations verified by reading the cited lines in this tree; `node scripts/check-doc-citations.js --strict` now reports **"No judged citation is more than 40 lines from the code it names"** (before: 2 suspects, `docs/BGP-POLICY.md:76` and `:824` at 92 lines). ## What changed Numbers only — no prose, no behaviour, no code. ## Gates - `node scripts/syntax-check.js` — 429 files, all OK - `node scripts/check-control-bytes.js` — clean - `node test/docs-show-commands.test.js` — 7 passed / 0 (59 forms, 118 commands) - `node test/docs-cli-transcript.test.js` — 4 passed / 0 - `node test/help-completeness.test.js` — 8 passed / 0 - `node test/no-form-help-key.test.js` — 81 passed / 0; `help-key-is-not-a-value` 40 / 0; `help-key-works-in-every-prompt` 10 / 0 - `node scripts/check-doc-citations.js --strict` — 0 suspects (was 2)
docs(BGP-POLICY): the anchor table points at the code that holds the symbols again
All checks were successful
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 4s
CI / Classify the change (pull_request) Successful in 6s
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 54s
CI / Test (Node 22) (pull_request) Successful in 54s
CI / Test (Node 18) (pull_request) Successful in 59s
CI / Arm auto-merge (pull_request) Successful in 3s
c2ab2a6747
The table's five cli.js/simulator.js anchors had drifted: `_help()` is 92 lines
further down than the page said (cli.js:6859, cited 6767, which now falls inside
`_showIpv6Nd()`), `_bgp(tokens)` is 2633 (cited 2610), the sticky `this._dnsZone`
assignment is 2702 (cited 2679), and the config-mode BGP dispatch is
cli.js:1581-1599 (cited 1564-1582, which is now the IPv6 gateway/ND branches).

The simulator advertisement loop is 1905-1958, not 1907-1957, so every line
quoted inside it moved by one: the `from` guard is 1914, the iBGP->iBGP
suppression 1919, the AS-path prepend 1920 and the next hop 1925; the
`{type:'bgp'}` emit is 1872-1875. The `% Incomplete command` style reference
cited cli.js:981 and :1181, which hold a NAT role assignment and a ternary tail;
998 and 1198 are the two handlers.

No prose, no behaviour: numbers only, each checked against engine/cli.js and
engine/simulator.js in this tree. `node scripts/check-doc-citations.js --strict`
went from 2 suspects to none.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-18 23:30:43 +00:00
jaylouisw deleted branch docs/1118-2317 2026-11-18 23:37:51 +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!2050
No description provided.