test(close-merged-issues): read the open-request ledger, not a snapshot of it (#1963) #1970

Closed
jaylouisw wants to merge 1 commit from fix/1118-1006 into main
Owner

Fixes #1963

What was wrong. The last block of test/close-merged-issues.test.js pasted Jay's open device-request queue as a literal and asserted none of those requests was in the catalogue. Answering a request therefore turned the suite red: #1962 (E9612) failed on all three Node legs for modelling the device it was opened to model, and #1934 for the three subracks it models. #1955 was green only because it hand-edited the same literal in its own commit (1304b0bd).

What changed. The queue is read from research/open-device-requests.json instead of being copied into the test. That file is already the machine-readable queue: docs/DEVICE_REGISTRY.md is rendered from it and scripts/check-closed-issues.js reads it as the "still blocked" record, and a request leaves it in the commit that models the device (as #1962 did for #808). The assertion keeps the part that matters: a row the ledger still lists as blocked must not be one the sweep would close, because the ledger would then be lying to the docs and the sweep would close an issue for a device nobody built. The count in the message is derived, not spelled out, and a failure now reads #810 -> devices/huawei/optixtrans-e9624.json so the remediation is visible. Two rows about the join itself were added (the ledger is non-empty, and every row has an issue and a model).

Reproduced, then fixed. A stand-in for the device PR that answers #810 - an optixtrans-e9624.json added, the #810 row dropped - leaves origin/main's version at 73 passed / 1 failed (none of the six open requests is in the catalogue ... [#810]) and this version at 76 passed / 0 failed. Negative control: a ledger row for the already-built RUTX12 correctly fails with #999 -> devices/teltonika/rutx12.json.

Gates. node scripts/syntax-check.js 412 files all OK; node scripts/check-control-bytes.js clean; close-merged-issues 76/0, closed-issues-audit 36/0, doc-catalog-counts 43/0, request-queue 32/0. Test-only change, so no engine or CLI code is touched.

No new feature and no device work. The catalogue, the ledger, the sweep and every spec are untouched; only the test file changed. The device stream can land #1962 (already merged) and rebase #1934 without editing this test.

Fixes #1963 **What was wrong.** The last block of `test/close-merged-issues.test.js` pasted Jay's open device-request queue as a literal and asserted none of those requests was in the catalogue. Answering a request therefore turned the suite red: #1962 (E9612) failed on all three Node legs for modelling the device it was opened to model, and #1934 for the three subracks it models. #1955 was green only because it hand-edited the same literal in its own commit (`1304b0bd`). **What changed.** The queue is read from `research/open-device-requests.json` instead of being copied into the test. That file is already the machine-readable queue: `docs/DEVICE_REGISTRY.md` is rendered from it and `scripts/check-closed-issues.js` reads it as the "still blocked" record, and a request leaves it in the commit that models the device (as #1962 did for #808). The assertion keeps the part that matters: a row the ledger still lists as blocked must not be one the sweep would close, because the ledger would then be lying to the docs and the sweep would close an issue for a device nobody built. The count in the message is derived, not spelled out, and a failure now reads `#810 -> devices/huawei/optixtrans-e9624.json` so the remediation is visible. Two rows about the join itself were added (the ledger is non-empty, and every row has an issue and a model). **Reproduced, then fixed.** A stand-in for the device PR that answers #810 - an `optixtrans-e9624.json` added, the `#810` row dropped - leaves `origin/main`'s version at 73 passed / 1 failed (`none of the six open requests is in the catalogue ... [#810]`) and this version at 76 passed / 0 failed. Negative control: a ledger row for the already-built RUTX12 correctly fails with `#999 -> devices/teltonika/rutx12.json`. **Gates.** `node scripts/syntax-check.js` 412 files all OK; `node scripts/check-control-bytes.js` clean; `close-merged-issues` 76/0, `closed-issues-audit` 36/0, `doc-catalog-counts` 43/0, `request-queue` 32/0. Test-only change, so no engine or CLI code is touched. **No new feature and no device work.** The catalogue, the ledger, the sweep and every spec are untouched; only the test file changed. The device stream can land #1962 (already merged) and rebase #1934 without editing this test.
test(close-merged-issues): read the open-request ledger, not a snapshot of it
All checks were successful
CI / Classify the change (pull_request) Successful in 5s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 3s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 20) (pull_request) Successful in 54s
CI / Test (Node 18) (pull_request) Successful in 1m1s
CI / Test (Node 22) (pull_request) Successful in 56s
CI / Arm auto-merge (pull_request) Successful in 15s
022e92c795
The last block in this suite pasted Jay's open device-request queue as a
literal and asserted none of it was in the catalogue. That made answering a
request indistinguishable from regressing the sweep: #1962 was red on all
three Node legs for modelling the E9612, and #1934 for the three subracks it
models, while every other check on both was green. #1955 only went green
because it hand-edited the same literal in its own commit.

The queue already has a machine-readable home - research/open-device-requests.json,
which docs/DEVICE_REGISTRY.md is rendered from and scripts/check-closed-issues.js
reads as "still blocked". Read it instead. A device pull request then makes one
edit, the one the docs need anyway, and the assertion keeps what it was reaching
for: a row the ledger still calls blocked must not be one the sweep would close,
because then the ledger is lying and the issue would be closed for a device
nobody built. The failure now names the row and the spec file that answered it.

Verified both directions: with an E9624 spec added and #810 dropped from the
ledger, the old literal reports "none of the six open requests ... [#810]" and
this version is 76/0; with a ledger that lists the already-built RUTX12 the new
assertion reports "#999 -> devices/teltonika/rutx12.json".

Fixes #1963
Author
Owner

Superseded by #1967, which landed four minutes before this was opened. Closing.

Same issue (#1963), same file, same fix: stop pasting the open-request queue into test/close-merged-issues.test.js and read it from research/open-device-requests.json. #1967 merged as 587039a2 (green 8/8, all three Node legs), so the ledger is already what the test reads on main.

This branch is mergeable: false for that reason only: 587039a2 rewrote the same block. No rebase needed — there is nothing left for it to change.

One substantive difference worth keeping in mind, recorded rather than silently dropped: #1967 pins the looser property a request the catalogue answers is answered by its own spec file (so an answered row may linger in the ledger), while this branch kept none of the open requests is in the catalogue against the ledger itself, which additionally catches a stale ledger row (npm run regen:registry-doc). Main has the looser form. If we want the stricter ledger-staleness assertion as well, it is a one-assertion follow-up on top of 587039a2, not this PR.

Surgery loop, 10:24.

**Superseded by #1967, which landed four minutes before this was opened. Closing.** Same issue (#1963), same file, same fix: stop pasting the open-request queue into `test/close-merged-issues.test.js` and read it from `research/open-device-requests.json`. #1967 merged as **`587039a2`** (green 8/8, all three Node legs), so the ledger is already what the test reads on main. This branch is `mergeable: false` for that reason only: `587039a2` rewrote the same block. No rebase needed — there is nothing left for it to change. **One substantive difference worth keeping in mind**, recorded rather than silently dropped: #1967 pins the looser property *a request the catalogue answers is answered by its own spec file* (so an answered row may linger in the ledger), while this branch kept *none of the open requests is in the catalogue* against the ledger itself, which additionally catches a stale ledger row (`npm run regen:registry-doc`). Main has the looser form. If we want the stricter ledger-staleness assertion as well, it is a one-assertion follow-up on top of `587039a2`, not this PR. Surgery loop, 10:24.
jaylouisw closed this pull request 2026-11-18 10:22:45 +00:00
All checks were successful
CI / Classify the change (pull_request) Successful in 5s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 3s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 20) (pull_request) Successful in 54s
CI / Test (Node 18) (pull_request) Successful in 1m1s
CI / Test (Node 22) (pull_request) Successful in 56s
CI / Arm auto-merge (pull_request) Successful in 15s

Pull request closed

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!1970
No description provided.