nx_assetprobe.nx
buildroot/runtime/nx_assetprobe.nx
about
nx_assetprobe.nx -- CONTENT-TYPED ASSET IDENTIFICATION FOR INGESTION.
WHY (measured 2026-08-07 from vrstormlab.com/dancexr/preparecontent, their own docs): DanceXR
types assets by WHERE THEY SIT and WHAT THEY ARE NAMED -- typed subfolders (actors/ motion/
texture/), same-basename pairing (dance.vmd + dance.ogg), alternative-texture discovery by
matching filename. Every one of those decisions trusts the filename.
*AN EXTENSION IS A CLAIM. THE MAGIC BYTES ARE THE MEASUREMENT. The same law cost us once today:
a grep for bvh matched nx_bvh (a Bounding Volume Hierarchy) and reported a motion format as
supported. A mislabelled asset in a name-driven pipeline fails at PLAY time, deep in a loader,
as a crash or an invisible model. Probed at INGEST time it is one honest row.
THE RULER LIVES IN nx_assetprobe_lib (extracted 2026-09-06): identify / name / cat / claim are ONE function each, shared
with the bundle walker (/compare/modding MD1), so the CLI and the walker cannot drift. This file is the CLI, the zip
central-directory walk and the KAT.
usage: nx_assetprobe probe <file> | zip <file> | --kat
exit 0 ok | 2 unreadable | 3 usage | 4 REFUSED malformed | 5 DISAGREE | 1 KAT RED
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_assetprobe_lib.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
| 23 | const AP_KATBUF: i64 = 8192 |
| 24 | const AP_MAXMEM: i64 = 512 |
| 26 | const AP_EOCD_MIN: i64 = 22 |
| 27 | const AP_CD_MIN: i64 = 46 |
functions
| 29 | func ap_puts(s: *u8) -> i64 { sys_write(1, s, ap_slen(s)); return 0 } |
| 30 | func ap_num(v: i64) -> i64 |
| 45 | func ap_probe(path: *u8, b: *u8, len: i64) -> i64 |
| 68 | func ap_eocd(b: *u8, len: i64) -> i64 |
| 89 | func ap_zip(b: *u8, len: i64) -> i64 |
| 143 | func ap_put(b: *u8, o: i64, s: *u8) -> i64 |
| 149 | func ap_p16(b: *u8, o: i64, v: i64) -> i64 called by 1: ap_kat_zip |
| 152 | func ap_p32(b: *u8, o: i64, v: i64) -> i64 called by 1: ap_kat_zip |
| 158 | func ap_kat_zip(b: *u8) -> i64 |
| 192 | func ap_kat() -> i64 |
| 282 | func main(argc: i64, argv: *i64) -> i64 |