code wiki / _hdl_build / nx_janitor_scrub.nx
nx_janitor_scrub.nx
buildroot/runtime/_hdl_build/nx_janitor_scrub.nx
about
nx_janitor_scrub.nx -- the JANITOR's third-party CLEANUP capability = the unbuilt "sprawl half (X-JAN-002)"
named in nx_janitor.nx's own header (operator: "get s class capabilities in the nishi auditor and janitor to
clean all this up that you fuck up and do"). The auditor (nx_sovereignty_audit) DETECTS the third-party debt
and splits it 3 ways (sav_class_of: 1=THIRDPARTY_LANG 2=NONSOV_FORMAT 3=WEB_BOUNDARY) but nothing ACTS -- so
we scrub by hand, over and over. This composes the auditor's classes and applies the SAFE action per class,
additive-only (#13: never delete production data) + NEVER-BRICK (#26: reversible by construction):
NONSOV_FORMAT -> MIGRATE the bytes into the sovereign seg_store, BYTE-VERIFIED, original left INTACT (reversible).
THIRDPARTY_LANG-> QUARANTINE: record in a ledger for OPERATOR-GATED retirement (a .py can't be auto-rewritten; FLAG).
WEB_BOUNDARY -> REVIEW: flag (Law-1 browser boundary; emitted-vs-vendored is a human call).
The janitor never deletes / never overwrites the source -- it MIGRATES (additive) + FLAGS. Sovereign. license_tier: ORIGINAL
dependencies 2 imports · 3 importers
imports: nx_seg_store.nxnx_syscalls.nx
imported by: nx_janitor_retire.nxnx_janitor_scrub_gate.nxnx_janitor_sweep.nx
structs
| none |
consts
| 15 | const JAN_NONE: i64 = 0 |
| 16 | const JAN_MIGRATE: i64 = 1 |
| 17 | const JAN_QUARANTINE: i64 = 2 |
| 18 | const JAN_REVIEW: i64 = 3 |
| 19 | const JAN_QSTORE: *u8 = "knowledge/store/janitor-quarantine" |
functions
| 22 | func jan_action(audit_class: i64) -> i64 called by 1: main |
| 29 | func jan_exists(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd>=0 { sys_close(fd); return 1 } return 0 } |
| 31 | func jan_key(k: i64, out: *u8) -> i64 |
| 41 | func jan_migrate(src_path: *u8, store_prefix: *u8, totp: *i64, verp: *i64) -> i64 called by 3: jan_verify_in_storemainjan_sweep calls 9: sys_mmapss_readallss_beginjan_keyss_addss_commit+3 |
| 75 | func jan_quarantine_record(path: *u8) -> i64 |
| 81 | func jan_is_quarantined(path: *u8) -> i64 |