code wiki / _hdl_build / nx_janitor_sweep.nx

nx_janitor_sweep.nx

buildroot/runtime/_hdl_build/nx_janitor_sweep.nx

4146 B71 linesdepth 4pulls 4 transitivereach 2 importersview sourcekind librarytopic janitor
docsdependenciesstructsconstsfunctions

about

nx_janitor_sweep.nx -- the JANITOR's AT-SCALE sweep: migrate a whole debt-heavy directory's non-sov FORMAT files into the sovereign seg_store in one pass (operator: "keep going and we want to keep the debt gone"). Honest mechanic: jan_migrate is ADDITIVE (original left intact = reversible/never-brick), so a sweep makes every format file RETIRE-READY (its bytes byte-verified in a store) -- the actual count-drop is the RETIRE step, which stays OPERATOR-GATED because some of these are human-edited sources (e.g. the RACI is "edit here"). The sweep is BOUNDED to one directory (not the 400k-file tree the auditor walks) so it is cheap + safe. Composes nx_janitor_scrub.jan_migrate. Sovereign. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_janitor_scrub.nx nx_syscalls.nx nx_janitor_sweep.nx nx_janitor_sweep_gate.nx nx_janitor_sweep_run.nx

imports: nx_janitor_scrub.nxnx_syscalls.nx

imported by: nx_janitor_sweep_gate.nxnx_janitor_sweep_run.nx

structs

none

consts

10const K_MAGIC_131072: i64 = 131072
11const K_MAGIC_1024: i64 = 1024

functions

13func jsw_lc(c: i64) -> i64 { if c>=65 { if c<=90 { return c+32 } } return c }
called by 1: jsw_is_format
15func jsw_is_format(name: *u8) -> i64
called by 2: jan_sweepmain calls 2: sys_mmapjsw_lc
29func jsw_storename(name: *u8, out: *u8) -> i64
called by 1: jan_sweep
38func jan_sweep(dir: *u8, out_seen: *i64, out_mig: *i64, out_ver: *i64) -> i64