nx_jrnl_archive_gate_t138.nx
buildroot/runtime/nx_jrnl_archive_gate_t138.nx
about
nx_jrnl_archive_gate.nx -- GATE for nx_jrnl_archive (lib composed in-process, nothing forked).
The verb's whole contract is PRESERVE-BEFORE-REMOVE, so the load-bearing teeth are the ones where
the archive step FAILS and the live journal must come out byte-identical (T6), and the one where
the verify step can actually see a corrupted copy (T10 -- a hash compare that cannot fail is not a
verify). Fixtures live under /tmp/nx_jrnl_archive_gate_<pid>/ (data only; nothing is executed from
/tmp, which the NAS mounts noexec). license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_jrnl_archive_lib_t138.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const JAG_FIX_LINES: i64 = 40 // enough rows that a short write is detectable, small enough to read by eye |
| 12 | const JAG_EPOCH_A: i64 = 1700000001 // fixed epochs: archive names must be reproducible across runs |
| 13 | const JAG_EPOCH_B: i64 = 1700000002 |
| 14 | const JAG_EPOCH_C: i64 = 1700000003 |
| 60 | const JAG_SYNC_TIMEOUT_MS: i64 = 10000 |
functions
| 16 | func jg_pid() -> i64 { return __syscall(172, 0, 0, 0, 0, 0, 0) } called by 1: main |
| 17 | func jg_path(base: *u8, leaf: *u8) -> *u8 |
| 24 | func jg_size(path: *u8) -> i64 |
| 32 | func jg_digest(path: *u8, out: *u8) -> i64 |
| 41 | func jg_same(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while i < JA_DIGEST_BYTES { if a[i] != b[i] { return 0 } i = i + 1 } return 1 } called by 1: main |
| 43 | func jg_make_journal(path: *u8) -> i64 |
| 61 | func jg_receive(fd: i64, expected: i64) -> i64 |
| 69 | func jg_child_writer(journal: *u8, commands: i64, events: i64) -> i64 called by 1: jg_process_gate calls 7: ja_locksys_writeja_unlockjg_receivesys_openat_appendsys_fsync+1 |
| 93 | func jg_process_gate(base: *u8, ctr: *i64) -> i64 |
| 160 | func main(argc: i64, argv: *i64) -> i64 |