nx_printer_health_test.nx
buildroot/runtime/nx_printer_health_test.nx
about
nx_printer_health_test.nx -- gate for the honest-status / anti-silent-failure model (R1).
Builds real IPP responses with the codec and asserts the health verdict for each, with unique exit
codes per invariant. This is the proof that we surface the truth a Brother UI hides.
1x idle + accepting + reasons='none' -> CAN_PRINT
2x STOPPED + media-jam(bare) + marker-supply-low-warning -> BLOCKED, worst=ERROR, 2 reasons
3x idle + marker-supply-low-warning + toner-low-report -> DEGRADED, worst=WARNING
4x idle but printer-is-accepting-jobs=false -> BLOCKED
7x per-reason severity classifier (suffix rules + bare/stopped vs bare/idle)
8x malformed reasons (value-length overrun) -> UNKNOWN (never a false "ready")
expect_exit: 0
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_ipp_codec.nxnx_printer_health.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 20 | func t_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 22 | func main() -> i64 |