code wiki / _hdl_build / nx_log_load.nx
nx_log_load.nx
buildroot/runtime/_hdl_build/nx_log_load.nx
about
nx_log_load.nx -- IM7 (first slice): the team's append-only LOGS become
first-class records on the sovereign store (ONE substrate for corpus +
plan + capability evidence; the info-mgmt unification rung). Sources:
knowledge/status/pm_plan_durable.log (log=pm_plan)
knowledge/status/cap_registry_durable.log (log=capreg)
Each non-empty line -> canonical record {kind: team-log-line, log: <name>,
line: <text>} keyed by its OWN content CID (key = "log:" + nxc1-sha256 of
the canonical bytes):
idempotency BY CONSTRUCTION same line = same CID = same key+bytes =
dup, never re-added (law #10; re-run after
the log grows adds ONLY the new lines)
additive-only loader never deletes/overwrites
chunked commits 64 docs/segment keeps every segment far
under the (LOUD) postings caps; a loud cap
refusal aborts the run with the rc printed
Evidence: LOG-STORE lines -> stdout + knowledge/status/infomgmt_store.log,
plus term + AND probes proving the corpus is searchable. NO SQL.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_canon_cid.nxnx_seg_store.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
| 23 | const LG_MAGIC_4096: i64 = 4096 |
| 24 | const LG_MAGIC_8192: i64 = 8192 |
| 25 | const LG_MAGIC_1000000000: i64 = 1000000000 |
| 26 | const LG_MAGIC_4000: i64 = 4000 |
| 27 | const LG_MAGIC_4100: i64 = 4100 |
| 80 | const LG_CHUNK: i64 = 64 |
| 81 | const LG_SEENCAP: i64 = 4000 |
functions
| 29 | func lg_p(s: *u8) -> i64 |
| 36 | func lg_fp(fd: i64, s: *u8) -> i64 |
| 43 | func lg_fn(fd: i64, v: i64) -> i64 |
| 57 | func lg_memeq(a: *u8, b: *u8, n: i64) -> i64 called by 1: lg_load_file |
| 66 | func lg_streq(a: *u8, b: *u8) -> i64 called by 1: lg_load_file |
| 83 | func lg_flush(prefix: *u8, st: *i64) -> i64 |
| 93 | func lg_load_file(prefix: *u8, path: *u8, logname: *u8, st: *i64) -> i64 |
| 177 | func main(argc: i64, argv: *i64) -> i64 |