code wiki / _hdl_build / nx_janitor_scrub.nx

nx_janitor_scrub.nx

buildroot/runtime/_hdl_build/nx_janitor_scrub.nx

4748 B87 linesdepth 3pulls 3 transitivereach 7 importersview sourcekind librarytopic janitor
docsdependenciesstructsconstsfunctions

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

nx_seg_store.nx nx_syscalls.nx nx_janitor_scrub.nx nx_janitor_retire.nx nx_janitor_scrub_gate.nx nx_janitor_sweep.nx

imports: nx_seg_store.nxnx_syscalls.nx

imported by: nx_janitor_retire.nxnx_janitor_scrub_gate.nxnx_janitor_sweep.nx

structs

none

consts

15const JAN_NONE: i64 = 0
16const JAN_MIGRATE: i64 = 1
17const JAN_QUARANTINE: i64 = 2
18const JAN_REVIEW: i64 = 3
19const JAN_QSTORE: *u8 = "knowledge/store/janitor-quarantine"

functions

22func jan_action(audit_class: i64) -> i64
called by 1: main
29func jan_exists(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd>=0 { sys_close(fd); return 1 } return 0 }
called by 3: mainmainmain calls 2: sys_openat_rdsys_close
31func jan_key(k: i64, out: *u8) -> i64
called by 1: jan_migrate calls 1: sys_mmap
41func jan_migrate(src_path: *u8, store_prefix: *u8, totp: *i64, verp: *i64) -> i64
75func jan_quarantine_record(path: *u8) -> i64
81func jan_is_quarantined(path: *u8) -> i64
called by 1: main calls 3: ss_opensys_mmapss_hget