Sweeper: report requests a family member already answers, and stop calling an accessory a device #1203

Merged
jaylouisw merged 1 commit from fix/sweeper-hints into main 2026-11-09 13:03:14 +00:00
Owner

Fixes #1202. Two failures from one code path, in opposite directions.

It hid requests that were already done. #6 "Microsoft Xbox" and #7 "Amazon Fire TV Stick" sat open while devices/microsoft/xbox-series-x.json and fire-tv-stick-4k-max-2nd-gen.json were in the catalogue, because the sweep only accepts an exact normalised model name. That exactness is right - closing someone's request by pointing at a different product is the mistake this script exists to avoid - but the tool therefore reported "nothing to do" over a backlog with answers in it.

A hint tier now reports what it cannot close: request words that are a prefix of a same-vendor model name the candidate and its file, and --close never reads that list. Microsoft Xbox -> microsoft/Xbox Series X; Amazon Fire TV Stick -> amazon/Fire TV Stick 4K Max (2nd gen).

It closed an accessory as a device. #246 "Iso-Beam-19 RF Isolator Shield for NanoBeam NBE-M2-13, NBE-M5-19" matched NBE-M5-19, the radio the shield clips onto. The guard is positional, not a word list: if the matched model is named after an accessory preposition (for, compatible with, fits, works with, mounts on), the request is about something that fits it - reported, never closed. A model named before the preposition, and a title that never names the model, both stay non-accessories: a guard that fires on uncertainty would silence real requests.

What made this findable: a dry run over 138 open requests reported one match, and it was wrong. It now reports one accessory reading and two family hints - and the auto-closeable count is honestly zero. 94 checks in the sweeper's suite, including both real catalogue cases. Full suite: 114 suites, 5,356 assertions.

Fixes #1202. Two failures from one code path, in opposite directions. **It hid requests that were already done.** #6 "Microsoft Xbox" and #7 "Amazon Fire TV Stick" sat open while `devices/microsoft/xbox-series-x.json` and `fire-tv-stick-4k-max-2nd-gen.json` were in the catalogue, because the sweep only accepts an exact normalised model name. That exactness is right - closing someone's request by pointing at a different product is the mistake this script exists to avoid - but the tool therefore reported "nothing to do" over a backlog with answers in it. A **hint tier** now reports what it cannot close: request words that are a prefix of a same-vendor model name the candidate and its file, and `--close` never reads that list. `Microsoft Xbox` -> `microsoft/Xbox Series X`; `Amazon Fire TV Stick` -> `amazon/Fire TV Stick 4K Max (2nd gen)`. **It closed an accessory as a device.** #246 "Iso-Beam-19 RF Isolator Shield for NanoBeam NBE-M2-13, NBE-M5-19" matched `NBE-M5-19`, the radio the shield clips onto. The guard is positional, not a word list: if the matched model is named *after* an accessory preposition (`for`, `compatible with`, `fits`, `works with`, `mounts on`), the request is about something that fits it - reported, never closed. A model named before the preposition, and a title that never names the model, both stay non-accessories: a guard that fires on uncertainty would silence real requests. What made this findable: a dry run over 138 open requests reported **one** match, and it was wrong. It now reports one accessory reading and two family hints - and the auto-closeable count is honestly zero. **94 checks** in the sweeper's suite, including both real catalogue cases. Full suite: 114 suites, 5,356 assertions.
Sweeper: report requests a family member already answers, and stop calling an accessory a device
All checks were successful
CI / Classify the change (pull_request) Successful in 11s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 14s
CI / Test (Node 20) (pull_request) Successful in 1m49s
CI / Test (Node 18) (pull_request) Successful in 1m54s
CI / Server smoke test (pull_request) Successful in 35s
CI / Docker build (pull_request) Successful in 38s
CI / Test (Node 22) (pull_request) Successful in 1m42s
3e336ffc65
Two failures, one code path, from opposite directions.

**It hid two requests that were already done.** #6 "Microsoft Xbox" and #7 "Amazon Fire TV Stick"
sat open while `devices/microsoft/xbox-series-x.json` and
`devices/amazon/fire-tv-stick-4k-max-2nd-gen.json` were in the catalogue, because the sweep only
accepts an exact normalised model name. That exactness is correct - closing somebody's request by
pointing at a different product is the one mistake this script exists to avoid - but it meant the
tool reported "nothing to do" over a backlog that had answers in it.

So a **hint tier** now reports what it cannot close: when a request's words are a prefix of a
same-vendor catalogue model, the report names the candidate and its file, and `--close` does not
read that list. `Microsoft Xbox` -> `microsoft/Xbox Series X`, `Amazon Fire TV Stick` ->
`amazon/Fire TV Stick 4K Max (2nd gen)`. Against the live backlog it surfaces all three stale
requests it was blind to, and closes none of them.

**It closed an accessory as a device.** #246 "Iso-Beam-19 RF Isolator Shield for NanoBeam
NBE-M2-13, NBE-M5-19" matched `NBE-M5-19`, which is the radio the shield clips onto. The guard is
positional rather than a vocabulary list: if the matched model is named *after* an accessory
preposition (`for`, `compatible with`, `fits`, `works with`, `mounts on`), the request is about
something that fits it, so it is reported as a hint and never closed. A model named before the
preposition ("NBE-M5-19 shield kit for outdoor use") and a title that never names the model both
stay non-accessories - a guard that fires on uncertainty would silence real requests.

The evidence that made this findable: a dry run over 138 open requests reported **one** match, and
that match was wrong. It now reports one accessory reading and two family hints, and the number of
auto-closeable matches is honestly zero.

94 checks in the sweeper's own suite, including both real catalogue cases.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-09 13:03:11 +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!1203
No description provided.