feat(realtime): printer approval over the socket (extension 2.4.0, product 1.1.0) #25

Merged
james.maes merged 1 commits from feat/printer-approval-20261105 into main 2026-11-05 22:22:19 +00:00
Owner

Server half of the printer-approval feature (pairs with protocol 1.1.0 on feat/printer-approval-20261105 and Windows connector 1.2.0). Additive: wire payload v1 and subprotocol qqq-printing.v1 unchanged; 1.0.x connectors keep working.

  • New HELLO / HTTP control-poll capability printer-approval-v1 (HELLO up to 5 capabilities, control poll up to 4; stored in control_capabilities; ControlPollRequest enum extended).
  • New server-to-client frame PRINTERS = { "printers": [ { "printerId", "enabled" } ] }: the complete approval state of every printer in the device's latest accepted inventory. Sent only to connections that advertised the capability, after each accepted INVENTORY's ACK and whenever a printer's approval changes through any path (admin route, native processes, enablePrinter), via the existing commit wakeup and the connection's single serialized writer (change-detected, so an unrelated job wakeup does not repeat it). Empty inventory yields [].
  • PrintingService.printerApprovals(deviceId); native extension 2.4.0 advertised; OpenAPI fragment regenerated; product 1.1.0; CHANGELOG/README/REALTIME/OPERATIONS docs and a dated in-progress session-state note.
  • Tests: five-capability HELLO, ACK-then-PRINTERS ordering, approval via admin route and service, no PRINTERS on unrelated wakeup, empty inventory, four-capability connection never receives PRINTERS, control-poll acceptance and bounds.

Validation: .\mvnw.cmd -Pui-demo verify on the pushed tree: 195 tests, 0 failures, 0 errors, 1 skipped (opt-in workload), 0 Checkstyle violations, BUILD SUCCESS. Nothing tagged, released or published.

🤖 Generated with Claude Code

Server half of the printer-approval feature (pairs with protocol 1.1.0 on `feat/printer-approval-20261105` and Windows connector 1.2.0). Additive: wire payload v1 and subprotocol `qqq-printing.v1` unchanged; 1.0.x connectors keep working. - New HELLO / HTTP control-poll capability `printer-approval-v1` (HELLO up to 5 capabilities, control poll up to 4; stored in `control_capabilities`; `ControlPollRequest` enum extended). - New server-to-client frame `PRINTERS` = `{ "printers": [ { "printerId", "enabled" } ] }`: the complete approval state of every printer in the device's latest accepted inventory. Sent only to connections that advertised the capability, after each accepted INVENTORY's ACK and whenever a printer's approval changes through any path (admin route, native processes, `enablePrinter`), via the existing commit wakeup and the connection's single serialized writer (change-detected, so an unrelated job wakeup does not repeat it). Empty inventory yields `[]`. - `PrintingService.printerApprovals(deviceId)`; native extension 2.4.0 advertised; OpenAPI fragment regenerated; product 1.1.0; CHANGELOG/README/REALTIME/OPERATIONS docs and a dated in-progress session-state note. - Tests: five-capability HELLO, ACK-then-PRINTERS ordering, approval via admin route and service, no PRINTERS on unrelated wakeup, empty inventory, four-capability connection never receives PRINTERS, control-poll acceptance and bounds. Validation: `.\mvnw.cmd -Pui-demo verify` on the pushed tree: 195 tests, 0 failures, 0 errors, 1 skipped (opt-in workload), 0 Checkstyle violations, BUILD SUCCESS. Nothing tagged, released or published. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
james.maes added 1 commit 2026-11-05 21:45:31 +00:00
feat(realtime): printer approval over the socket (extension 2.4.0, product 1.1.0)
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / Scoped workflow [workflow 1b3648d9421543350067e95e54959dfb471b26d5] (pull_request) Successful in 6s
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-business (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / original-voyage (pull_request) Skipped
QRun-IO/ci-policy: ci / original-cli (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: ci / shared-pipeline (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 3s
Shared Java Maven CI / secrets (push) Successful in 15s
QRun-IO/ci-policy: Shared Java Maven CI / secrets (pull_request) Successful in 14s
QRun-IO/ci-policy: Shared Java Maven CI / verify (pull_request) Successful in 3m6s
QRun-IO/ci-policy: Shared Java Maven CI / gate (pull_request) Successful in 8s
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Successful in 3m16s
Shared Java Maven CI / verify (push) Successful in 3m31s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 5s
Shared Java Maven CI / gate (push) Successful in 9s
qrun-release / release (push) Successful in 3m41s
Shared QRun source version / version (push) Successful in 14s
qrun-release / postpublish (push) Successful in 14s
3fa78decc8
Add the printer-approval-v1 capability and the server-to-client PRINTERS frame
so a connector can show per-printer approval for the server it is connected to.

- HELLO accepts up to five capabilities including printer-approval-v1; the HTTP
  control poll accepts up to four and stores it in control_capabilities like the
  others; the ControlPollRequest schema enumeration is extended.
- After an accepted INVENTORY's ACK, a connection that advertised the capability
  receives PRINTERS: { "printers": [ { "printerId", "enabled" } ] } covering every
  printer in the device's latest accepted inventory (empty inventory: []).
- Every approval change (admin route, native approve/disable/set-approval
  processes, PrintingService.enablePrinter) already publishes the commit wakeup;
  the connection's single serialized writer now compares the current approval
  state with the last PRINTERS frame it sent and resends on change only.
  Connections without the capability never receive PRINTERS.
- PrintingService.printerApprovals(deviceId) exposes the list to host code.
- Advertise native extension 2.4.0; regenerate the OpenAPI fragment; bump the
  product to 1.1.0 (pairs with protocol 1.1.0 and Windows connector 1.2.0; wire
  payload v1 and subprotocol unchanged). CHANGELOG, README, REALTIME/OPERATIONS
  docs and a dated in-progress session-state note.
- Tests: five-capability HELLO, ACK-then-PRINTERS ordering with new printers
  disabled, approval via the admin route and the service pushing fresh frames,
  no PRINTERS on an unrelated job wakeup, empty inventory, a four-capability
  connection never receiving PRINTERS, and control-poll acceptance/bounds.

Verified: .\mvnw.cmd -Pui-demo verify -> 195 tests, 0 failures, 0 errors,
1 skipped (opt-in workload), 0 Checkstyle violations, BUILD SUCCESS.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
james.maes merged commit d6edfced8a into main 2026-11-05 22:22:19 +00:00
Sign in to join this conversation.