test/close-merged-issues.test.js hardcodes the open-request queue, so every device PR that answers a request goes red on all three Node legs #1963

Closed
opened 2026-11-18 09:12:12 +00:00 by jaylouisw · 0 comments
Owner

The device stream cannot merge anything: both open device PRs are red on all three Node legs and green on everything else (Classify, PR rebase, Server smoke, Docker build, Arm auto-merge all succeed). The failing assertion is not about the devices.

Evidence — node test/close-merged-issues.test.js at each PR head, on current main 9d852ed8:

PR result failing assertion
#1962 (E9612, 0 behind, mergeable: true) 72 passed, 1 failed none of the six open requests is in the catalogue ... [#808]
#1934 (E9605/E9612/E9624) 71 passed, 1 failed ... [#810, #808, #807]

Everything else in the suite passes. The device specs themselves are fine.

Cause — test/close-merged-issues.test.js:306-317 hardcodes a snapshot of Jay's open device-request queue and asserts that none of those requests is in the catalogue:

const queue = [
  [810, '[Device]: OptiXtrans E9624'],
  [808, '[Device]: OptiXtrans E9612'],
  [803, '[Device]: OptiXtrans E6616X'],
  [743, '[Device]: Huawei OceanProtect X8100/X9100 Backup Storage'],
  [742, '[Device]: Huawei OceanProtect E8000 Backup Storage'],
  [130, '[Device]: Ubiquiti UniFi Dream Wall Pro (UDW-PRO)']
];
const proposed = queue.filter(function (q) { return deviceMatch(q[1], index); });
ok(proposed.length === 0, 'none of the six open requests is in the catalogue, ...');

The assertion is a snapshot of a moving queue. Every PR that answers a request necessarily breaks it — the guard makes "correctly modelling a device" indistinguishable from "regressing the sweep".

Precedent — #1955 (1304b0bd) walked through this by editing the same literal in the same commit: it dropped [807, ...] and left the comment at line 318 recording why. That is why it went green and the other two did not. The two open PRs have no such edit.

Minimal patch (for whoever owns test/ — this stream may not touch it):

  1. Delete lines 307-308 ([810, ...], [808, ...]) as those requests become answered.
  2. Change the wording at line 316 from "the six open requests" to match the remaining count.
  3. Keep the #807 precedent comment.

Durable fix, so this stops recurring — research/open-device-requests.json already holds the machine-readable queue ([{issue, models, missing}, ...]). Build queue from it instead of a literal, and assert the invariant that actually matters: no request in the queue is answered by the catalogue unless the sweep would also close it. As written, the test has to be hand-edited by every device PR until the queue empties, and each edit is an opportunity to write a queue that the PR's own devices answer — which is exactly what #1934 did (it edited the literal to seven entries and still lists #807, #808 and #810, all three of which its own catalogue answers).

Blocked on this: #1962 is one line from green and mergeable with zero drift from main; #1934 is 9 behind and cannot be rebased mechanically (see that PR). Nothing in the device stream can land until this test stops snapshotting the queue.

Needs Jay's decision on who may edit test/.

The device stream cannot merge anything: both open device PRs are red on all three Node legs and green on everything else (Classify, PR rebase, Server smoke, Docker build, Arm auto-merge all succeed). The failing assertion is not about the devices. **Evidence** — `node test/close-merged-issues.test.js` at each PR head, on current main `9d852ed8`: | PR | result | failing assertion | |---|---|---| | #1962 (E9612, 0 behind, `mergeable: true`) | 72 passed, 1 failed | `none of the six open requests is in the catalogue ... [#808]` | | #1934 (E9605/E9612/E9624) | 71 passed, 1 failed | `... [#810, #808, #807]` | Everything else in the suite passes. The device specs themselves are fine. **Cause** — `test/close-merged-issues.test.js:306-317` hardcodes a snapshot of Jay's open device-request queue and asserts that *none* of those requests is in the catalogue: ```js const queue = [ [810, '[Device]: OptiXtrans E9624'], [808, '[Device]: OptiXtrans E9612'], [803, '[Device]: OptiXtrans E6616X'], [743, '[Device]: Huawei OceanProtect X8100/X9100 Backup Storage'], [742, '[Device]: Huawei OceanProtect E8000 Backup Storage'], [130, '[Device]: Ubiquiti UniFi Dream Wall Pro (UDW-PRO)'] ]; const proposed = queue.filter(function (q) { return deviceMatch(q[1], index); }); ok(proposed.length === 0, 'none of the six open requests is in the catalogue, ...'); ``` The assertion is a snapshot of a moving queue. Every PR that answers a request necessarily breaks it — the guard makes "correctly modelling a device" indistinguishable from "regressing the sweep". **Precedent** — #1955 (`1304b0bd`) walked through this by editing the same literal in the same commit: it dropped `[807, ...]` and left the comment at line 318 recording why. That is why it went green and the other two did not. The two open PRs have no such edit. **Minimal patch** (for whoever owns `test/` — this stream may not touch it): 1. Delete lines 307-308 (`[810, ...]`, `[808, ...]`) as those requests become answered. 2. Change the wording at line 316 from "the six open requests" to match the remaining count. 3. Keep the #807 precedent comment. **Durable fix, so this stops recurring** — `research/open-device-requests.json` already holds the machine-readable queue (`[{issue, models, missing}, ...]`). Build `queue` from it instead of a literal, and assert the invariant that actually matters: *no request in the queue is answered by the catalogue unless the sweep would also close it*. As written, the test has to be hand-edited by every device PR until the queue empties, and each edit is an opportunity to write a queue that the PR's own devices answer — which is exactly what #1934 did (it edited the literal to seven entries and still lists #807, #808 and #810, all three of which its own catalogue answers). **Blocked on this:** #1962 is one line from green and mergeable with zero drift from main; #1934 is 9 behind and cannot be rebased mechanically (see that PR). Nothing in the device stream can land until this test stops snapshotting the queue. Needs Jay's decision on who may edit `test/`.
Sign in to join this conversation.
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#1963
No description provided.