code wiki / _hdl_build / nx_janitor_retire.nx
nx_janitor_retire.nx
buildroot/runtime/_hdl_build/nx_janitor_retire.nx
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
imports: nx_janitor_scrub.nxnx_syscalls.nx
imported by: nx_collision_retire_safe.nxnx_janitor_retire_gate.nx
structs
| none |
consts
| 12 | const K_MAGIC_1024: i64 = 1024 |
functions
| 15 | func jan_verify_in_store(src_path: *u8, store_prefix: *u8) -> i64 |
| 23 | func jan_retire_dest(path: *u8, retdir: *u8, dest: *u8) -> i64 |
| 40 | func jan_retire(src_path: *u8, store_prefix: *u8) -> i64 |
| 50 | func jan_unretire(src_path: *u8, store_prefix: *u8) -> i64 |