code wiki / _hdl_build / nx_cleanserve_resolve.nx
nx_cleanserve_resolve.nx
buildroot/runtime/_hdl_build/nx_cleanserve_resolve.nx
about
nx_cleanserve_resolve.nx -- shared last-resort media-resolve helpers for the clean-serve daemon + nx_cleanview.
Extracted so the URL parser is GATE-TESTABLE (a bug here = a broken <video src> the deploy health-check can't
catch). No state, no network -- pure parsing over a sniff plan + a cheap page pre-check. Co-located in _hdl_build
with nx_video_sniff.nx (its dependency) so imports resolve. license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_video_sniff.nxnx_video_sniff_fetch.nx
imported by: nx_cleanserve_resolve_gate.nx
structs
| none |
consts
| 9 | const CSD_SNIFF_CPU_SECS: i64 = 2 // JS-exec resolve is CPU-bounded; only fires when static extraction found nothing on a video-ish page |
| 10 | const CSD_MAXSRC: i64 = 6 // bounded external <script src> bundles fetched per request -- DoS-amplification guard for the PUBLIC route (1 req !-> unbounded outbound) |
| 11 | const CSD_SRCCAP: i64 = 65536 // <script src> list buffer |
| 12 | const CSD_EXTCAP: i64 = 4194304 // 4 MiB total concat of fetched bundle bodies fed to the JS-VM |
| 13 | const CSD_BUNCAP: i64 = 4194304 // 4 MiB per-bundle fetch buffer |
functions
| 16 | func csd_plan_url(plan: *u8, out: *u8, cap: i64) -> i64 called by 1: main |
| 31 | func csd_looks_videoish(body: *u8, blen: i64) -> i64 |