code wiki / _hdl_build / nx_janitor_retire.nx

nx_janitor_retire.nx

buildroot/runtime/_hdl_build/nx_janitor_retire.nx

3268 B55 linesdepth 4pulls 4 transitivereach 2 importersview sourcekind librarytopic janitor
docsdependenciesstructsconstsfunctions

about

nx_janitor_retire.nx -- the RETIRE step = the actual debt count-drop (operator: "keep the debt gone"). Migrating is additive (the original stays, so the auditor still counts it); RETIRING moves the already- backed-up original OUT of the product zone into a fenced `_retired/` dir, so it stops counting and the genuine_debt actually falls (then the ratchet locks the lower floor). SAFETY, by construction: - REFUSES to retire a file whose bytes are not byte-verified in the store (never lose data). - MOVES, never deletes -- the janitor has NO unlink syscall; a retire is sys_renameat (reversible). - jan_unretire moves it straight back = proven reversible (never-brick #26, additive #13). Pair with the auditor fencing `/_retired/` (done) so retired files are no longer product-contaminants. Composes nx_janitor_scrub.jan_migrate for the verify. Sovereign. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_janitor_scrub.nx nx_syscalls.nx nx_janitor_retire.nx nx_collision_retire_safe.nx nx_janitor_retire_gate.nx

imports: nx_janitor_scrub.nxnx_syscalls.nx

imported by: nx_collision_retire_safe.nxnx_janitor_retire_gate.nx

structs

none

consts

12const K_MAGIC_1024: i64 = 1024

functions

15func jan_verify_in_store(src_path: *u8, store_prefix: *u8) -> i64
called by 1: jan_retire calls 2: sys_mmapjan_migrate
23func jan_retire_dest(path: *u8, retdir: *u8, dest: *u8) -> i64
40func jan_retire(src_path: *u8, store_prefix: *u8) -> i64
50func jan_unretire(src_path: *u8, store_prefix: *u8) -> i64