code wiki / (root) / nx_jrnl_archive.nx

nx_jrnl_archive.nx

buildroot/runtime/nx_jrnl_archive.nx

1263 B21 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind tooltopic jrnl
docsdependenciesstructsconstsfunctions

about

nx_jrnl_archive.nx -- "archive it deliberately", as a verb (2026-08-23, lane L). The sanctioned reset for an append-only status journal that reached its budget: hash-verified copy to <dir>/archive/<name>.<epoch> (or a named dir), THEN reset the live file -- never the other way round. All logic lives in nx_jrnl_archive_lib.nx (ja_archive) so the gate composes it in-process. nx_jrnl_archive <journal> [archive_dir] exit: 0 archived+reset | 1 empty (nothing to do) | 2 usage | 3 cannot read | 4 archive write failed | 5 verify mismatch (live untouched) | 6 reset failed (archive verified, live untouched) license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_jrnl_archive_lib.nx nx_jrnl_archive.nx

imports: nx_syscalls.nxnx_jrnl_archive_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ja_puts sys_write ja_slen sys_exit ja_archive sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ja_announce ja_puts ↻ ja_pn sys_mmap ↻ sys_write ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_seed_allocated sha256_k sha256_update

structs

none

consts

none

functions

12func main(argc: i64, argv: *i64) -> i64