test(close-merged-issues): read the open-request queue from the file, not a literal (#1963) #1967

Merged
jaylouisw merged 1 commit from fix/1118-0936 into main 2026-11-18 10:19:45 +00:00
Owner

Fixes #1963

The real-catalogue block in test/close-merged-issues.test.js hardcoded a snapshot of the open [Device]: queue and asserted that none of it was in devices/. Any PR that answers a request necessarily broke it: #1962 (E9612) failed with [#808], #1934 with [#810, #808, #807]; #1955 only passed because it deleted [807, ...] from the literal in the same commit. The guard made "correctly modelling a device" indistinguishable from "regressing the sweep".

Wrong: lines 306-317 listed six issues by hand (two of them, #742/#743, already closed) and the assertion message counted "the six open requests" regardless of how many the literal held.

Changed:

  • the queue is now read from research/open-device-requests.json, the file scripts/check-closed-issues.js and scripts/regen-registry-doc.js already treat as the record of open requests, with a shape check (issue, models, missing, no duplicates);
  • the snapshot assertion is replaced by the property that survives a device PR: a request the catalogue answers is answered by a spec sharing that model code, that file exists on disk, and a dry-run sweep proposes closing exactly the requests the matcher answers (and writes nothing);
  • the E6616/E6616X near-miss pin is kept but made conditional on E6616X not being modelled, so it cannot go stale either; the E9605 and RUTX12 positive cases stay.

Reproduction: with #1962's devices/huawei/optixtrans-e9612.json staged on this branch, the old test failed 72 passed, 1 failed (none of the six open requests ... [#808]). After the change the same tree gives 78 passed, 0 failed, and main without that spec also gives 78 passed, 0 failed.

Note for the device stream: this makes #1962's own edit to the same block unnecessary; that PR will conflict here and should take this side (its E9612 spec and registry-doc edits are untouched).

Gates: node scripts/syntax-check.js — 411 files, all OK. node test/close-merged-issues.test.js — 78 passed, 0 failed (both with and without the E9612 spec). node test/closed-issues-audit.test.js — 36 passed, 0 failed; node test/catalogue-hygiene.test.js — 25 passed, 0 failed. Test-only change, engine/cli untouched.

Fixes #1963 The real-catalogue block in `test/close-merged-issues.test.js` hardcoded a snapshot of the open `[Device]:` queue and asserted that none of it was in `devices/`. Any PR that answers a request necessarily broke it: #1962 (E9612) failed with `[#808]`, #1934 with `[#810, #808, #807]`; #1955 only passed because it deleted `[807, ...]` from the literal in the same commit. The guard made "correctly modelling a device" indistinguishable from "regressing the sweep". **Wrong:** lines 306-317 listed six issues by hand (two of them, #742/#743, already closed) and the assertion message counted "the six open requests" regardless of how many the literal held. **Changed:** - the queue is now read from `research/open-device-requests.json`, the file `scripts/check-closed-issues.js` and `scripts/regen-registry-doc.js` already treat as the record of open requests, with a shape check (issue, models, missing, no duplicates); - the snapshot assertion is replaced by the property that survives a device PR: a request the catalogue answers is answered by a spec sharing that model code, that file exists on disk, and a dry-run sweep proposes closing exactly the requests the matcher answers (and writes nothing); - the E6616/E6616X near-miss pin is kept but made conditional on E6616X not being modelled, so it cannot go stale either; the E9605 and RUTX12 positive cases stay. **Reproduction:** with #1962's `devices/huawei/optixtrans-e9612.json` staged on this branch, the old test failed `72 passed, 1 failed` (`none of the six open requests ... [#808]`). After the change the same tree gives `78 passed, 0 failed`, and main without that spec also gives `78 passed, 0 failed`. **Note for the device stream:** this makes #1962's own edit to the same block unnecessary; that PR will conflict here and should take this side (its E9612 spec and registry-doc edits are untouched). **Gates:** `node scripts/syntax-check.js` — 411 files, all OK. `node test/close-merged-issues.test.js` — 78 passed, 0 failed (both with and without the E9612 spec). `node test/closed-issues-audit.test.js` — 36 passed, 0 failed; `node test/catalogue-hygiene.test.js` — 25 passed, 0 failed. Test-only change, engine/cli untouched.
test(close-merged-issues): read the open-request queue from the file, not a literal (#1963)
All checks were successful
CI / Classify the change (pull_request) Successful in 6s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 10s
CI / Server smoke test (pull_request) Successful in 6s
CI / Docker build (pull_request) Successful in 20s
CI / Test (Node 18) (pull_request) Successful in 52s
CI / Test (Node 20) (pull_request) Successful in 45s
CI / Test (Node 22) (pull_request) Successful in 50s
CI / Arm auto-merge (pull_request) Successful in 14s
f0ec108a11
The real-catalogue block hardcoded a snapshot of Jay's open [Device]: queue and
asserted none of it was in devices/. Every PR that answers a request therefore
had to hand-edit the literal or go red on all three Node legs - #1962 (E9612)
failed with [#808], #1934 with [#810, #808, #807], while #1955 only passed by
deleting [807, ...] in the same commit.

Build the queue from research/open-device-requests.json - the file
docs/DEVICE_REGISTRY.md and scripts/check-closed-issues.js already treat as the
record of open requests - and pin the property that survives a device PR: a
request the catalogue answers is answered by a spec for that model, that file is
on disk, and the sweep proposes closing exactly the requests the matcher answers.
Near-miss and positive matcher cases stay, with the E6616X pin now conditional on
E6616X not being modelled.

Verified red before the change (72 passed, 1 failed: [#808] with #1962's E9612
spec staged) and green after, in both states: 78 passed, 0 failed.
Author
Owner

This branch conflicts with main, so it was not rebased:

test/close-merged-issues.test.js 

A conflict is a decision about behaviour rather than a mechanical fix, so this is left for a human. Rebasing by hand and force-pushing will let the automation pick it up again.

This branch conflicts with `main`, so it was not rebased: ``` test/close-merged-issues.test.js ``` A conflict is a decision about behaviour rather than a mechanical fix, so this is left for a human. Rebasing by hand and force-pushing will let the automation pick it up again.
Author
Owner

Verified green, blocked on one hunks-worth of overlap with main — and the overlap is with a block that landed two minutes ago.

Head f0ec108a: 8/8 checks success, Node 18/20/22 all green. mergeable=false is real, not "not computed yet": merging origin/main (23098286) into this branch in a scratch worktree gives exactly one conflict, test/close-merged-issues.test.js lines 307-380.

Why it is no longer a clean rebase. 3f58050a (#1962, merged 09:41 today) landed with the hardcoded block already rewritten by another stream — #808 deleted from the literal, "six"→"five", and explicit E9605/E9612 deviceMatch assertions added. This branch deletes that whole block and replaces it with the queue-file read plus the generic drift loop. Same 50 lines, two incompatible rewrites.

Why I did not resolve it. Two things make it a decision, not a mechanical merge:

  1. answered is an array on this branch and a single match object on main's side, so "keep both sides" needs a rename plus a choice about whether main's E9612 assertion survives.
  2. research/open-device-requests.json now lists only #130, #803, #810 — #807/#808 were removed when they landed — so the generic drift loop no longer covers E9612 at all. Taking this branch's side silently drops the E9612 near-miss assertion that is on main as of this morning.

test/ is Jay's, and dropping a just-merged assertion is a coverage decision.

Two clean resolutions, either is fine by me:

  • (a) this branch's block wins, keep main's assertions by renaming the array (e.g. hits) and appending the two explicit deviceMatch assertions after the loop;
  • (b) this branch's block wins and main's explicit E9612 assertion is dropped deliberately — please say so in the commit message, because E9612 then has no near-miss guard anywhere.

Still live on main: the literal in the test on main is unchanged in spirit, so any device PR that answers #810, #803 or #130 turns it red. #1934 (E9624/#810) is that failure right now — the guard is not fixed until this lands.

No force-push from me; fix/1118-0936 is your loop's branch.

**Verified green, blocked on one hunks-worth of overlap with main — and the overlap is with a block that landed two minutes ago.** Head `f0ec108a`: 8/8 checks success, Node 18/20/22 all green. `mergeable=false` is real, not "not computed yet": merging `origin/main` (`23098286`) into this branch in a scratch worktree gives exactly one conflict, `test/close-merged-issues.test.js` lines 307-380. **Why it is no longer a clean rebase.** `3f58050a` (#1962, merged 09:41 today) landed with the hardcoded block *already rewritten* by another stream — `#808` deleted from the literal, "six"→"five", and explicit E9605/E9612 `deviceMatch` assertions added. This branch deletes that whole block and replaces it with the queue-file read plus the generic drift loop. Same 50 lines, two incompatible rewrites. **Why I did not resolve it.** Two things make it a decision, not a mechanical merge: 1. `answered` is an array on this branch and a single match object on main's side, so "keep both sides" needs a rename plus a choice about whether main's E9612 assertion survives. 2. `research/open-device-requests.json` now lists only #130, #803, #810 — #807/#808 were removed when they landed — so the generic drift loop no longer covers E9612 at all. Taking this branch's side silently drops the E9612 near-miss assertion that is on main as of this morning. `test/` is Jay's, and dropping a just-merged assertion is a coverage decision. **Two clean resolutions, either is fine by me:** - (a) this branch's block wins, keep main's assertions by renaming the array (e.g. `hits`) and appending the two explicit `deviceMatch` assertions after the loop; - (b) this branch's block wins and main's explicit E9612 assertion is dropped deliberately — please say so in the commit message, because E9612 then has no near-miss guard anywhere. **Still live on main:** the literal in the test on `main` is unchanged in spirit, so any device PR that answers #810, #803 or #130 turns it red. #1934 (E9624/#810) is that failure right now — the guard is not fixed until this lands. No force-push from me; `fix/1118-0936` is your loop's branch.
jaylouisw force-pushed fix/1118-0936 from f0ec108a11
All checks were successful
CI / Classify the change (pull_request) Successful in 6s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 10s
CI / Server smoke test (pull_request) Successful in 6s
CI / Docker build (pull_request) Successful in 20s
CI / Test (Node 18) (pull_request) Successful in 52s
CI / Test (Node 20) (pull_request) Successful in 45s
CI / Test (Node 22) (pull_request) Successful in 50s
CI / Arm auto-merge (pull_request) Successful in 14s
to 76389e43e4
All checks were successful
CI / Classify the change (pull_request) Successful in 6s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 6s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 20s
CI / Test (Node 20) (pull_request) Successful in 47s
CI / Test (Node 18) (pull_request) Successful in 56s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Arm auto-merge (pull_request) Successful in 15s
2026-11-18 10:12:06 +00:00
Compare
Author
Owner

This branch conflicts with main, so it was not rebased:

test/close-merged-issues.test.js 

A conflict is a decision about behaviour rather than a mechanical fix, so this is left for a human. Rebasing by hand and force-pushing will let the automation pick it up again.

This branch conflicts with `main`, so it was not rebased: ``` test/close-merged-issues.test.js ``` A conflict is a decision about behaviour rather than a mechanical fix, so this is left for a human. Rebasing by hand and force-pushing will let the automation pick it up again.
jaylouisw force-pushed fix/1118-0936 from 76389e43e4
All checks were successful
CI / Classify the change (pull_request) Successful in 6s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 6s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 20s
CI / Test (Node 20) (pull_request) Successful in 47s
CI / Test (Node 18) (pull_request) Successful in 56s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Arm auto-merge (pull_request) Successful in 15s
to 145e3002d4
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 5s
CI / Server smoke test (pull_request) Successful in 6s
CI / Docker build (pull_request) Successful in 19s
CI / Test (Node 20) (pull_request) Successful in 48s
CI / Test (Node 18) (pull_request) Successful in 56s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Arm auto-merge (pull_request) Successful in 12s
2026-11-18 10:18:23 +00:00
Compare
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!1967
No description provided.