Skip to content

Fix USB printer discovery and reconnect recovery with Windows setting guidance - #996

Merged
sridharkalaibala merged 3 commits into
developfrom
codex/printer-discovery-recovery
Sep 27, 2026
Merged

sridharkalaibala merged 3 commits into
developfrom
codex/printer-discovery-recovery

Conversation

@sridharkalaibala

@sridharkalaibala sridharkalaibala commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Windows retains phantom USBPRINT records after reconnecting identical printers. Posnic previously treated those records as an unresolved identity and permanently failed jobs before submission. Match only currently present devices for the configured port; report absent, ambiguous, stale-binding and enumeration failures separately, without replacing a saved destination.

Recover the exact legacy identification failure only when durable state explicitly proves no submission, acceptance, observation or spooler job ID. Cover startup, background polling and repeated enqueue, keeping original job IDs and bytes. Temporary discovery failures use bounded retries and resume after recovery. Submitted and uncertain tickets are not replayed.

Hardware Manager now checks Windows Sleep, Hibernate and USB selective suspend read-only and shows specific instructions for enabled or unverifiable settings. It warns about the diagnostic keep-alive helper. Optional app idle initialization is suppressed if that helper is running or cannot be checked, and supports the observed POS-80C primary Idle / extended Unknown combination through the existing per-printer lock.

Validation: 61 queue/discovery/multi-printer and Hardware Manager rendering checks passed locally and on the new Windows CI job. That workflow runs the real PowerShell resolver tests on Windows for future printer changes. Windows-only tests execute the actual PowerShell resolver with synthetic records, including phantom history, ambiguity, stale IDs, mismatched ports and enumeration failure. The desktop suite passed 3,473 tests with four skips; its one environment failure (unavailable WSL Bash) passed when rerun using Git Bash. Packaging and attribution checks passed. The Windows power audit was also exercised read-only.

No production tickets were replayed and no installed archive, power policy, driver or external diagnostic helper was modified. The handoff's physical USB disappearance is not a proven software or hardware root cause; docs describe retiring the helper and comparing a short direct USB cable with the extender across the same idle interval.

…ings

Signed-off-by: Sridhar Bala <sridharkalaibala@gmail.com>
Signed-off-by: Sridhar Bala <sridharkalaibala@gmail.com>
Signed-off-by: Sridhar Bala <sridharkalaibala@gmail.com>
@sridharkalaibala
sridharkalaibala merged commit f52b2b4 into develop Sep 27, 2026
11 checks passed
@github-actions github-actions Bot added the ready for QA Merged to develop and live on develop.posnic.io - anyone can test it label Sep 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Merged to develop. Anyone can test this - you do not need write access.

Try it at https://develop.posnic.io, or run it yourself:

git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev   # then http://localhost:3000

When you have tested it, say what you did and what happened, and set
QA passed or QA failed. If you cannot set labels, just comment -
a maintainer will.

Reporting that something is broken is as useful as fixing it. It is
better found here than by a shopkeeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for QA Merged to develop and live on develop.posnic.io - anyone can test it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant