code wiki / (root) / nx_gather_journal.nx

nx_gather_journal.nx

buildroot/runtime/nx_gather_journal.nx

5310 B154 linesdepth 4pulls 5 transitivereach 2 importersview sourcekind librarytopic gather
docsdependenciesstructsconstsfunctions

about

nx_gather_journal.nx -- append-only event ring for gather events. Per [[feedback-hunter-gatherer-meta-primitives-outward-inward-axes]] CARDINAL: "nx_gather_journal (~/.nishi/gather.jsonl)." Append-only log of every gather event (field sown / yield harvested) so the session-audit gate can verify gather_count >= 1 per session. Mirrors nx_hunt_journal structure; pairs with it for the dual-axis audit predicate (valid session = hunt_count >= 1 AND gather_count >= 1). Composes: nx_gatherer -- emits events; journal records them nx_hunt_journal -- the outward-axis dual

dependencies 4 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_gatherer.nx nx_hunt_journal.nx nx_gather_journal.nx nx_gather_journal_test.nx nx_session_audit_compose_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_gatherer.nxnx_hunt_journal.nx

imported by: nx_gather_journal_test.nxnx_session_audit_compose_test.nx

structs

31struct NxGatherEvent
42struct NxGatherJournalRing

consts

19const NX_MAGIC_1024: i64 = 1024
23const NX_GEV_SOWN: nx_int = 0
24const NX_GEV_HARVESTED: nx_int = 1
25const NX_GEV_FALLOWED: nx_int = 2 // field set aside for season
26const NX_GEV_COMPOSTED: nx_int = 3 // prior-arc knowledge re-applied
27const NX_GEV_N_KINDS: nx_int = 4
49const NX_GEV_BYTES: nx_size = 48

functions

51func nx_gev_kind_is_valid(k: nx_int) -> nx_int
57func nx_gather_journal_new(capacity: nx_size) -> *NxGatherJournalRing
called by 2: mainmain calls 1: sys_mmap
67func _gather_jr_at(j: *NxGatherJournalRing, idx: nx_size) -> *NxGatherEvent
71func nx_gather_journal_log(j: *NxGatherJournalRing,
92func nx_gather_journal_count_kind(j: *NxGatherJournalRing, kind: nx_int) -> nx_int
called by 1: main calls 1: _gather_jr_at
105func nx_gather_journal_event_count(j: *NxGatherJournalRing) -> nx_size
called by 1: main
118func nx_session_audit_valid(hunt: *NxHuntJournalRing,
called by 2: mainmain
134func nx_session_imbalance_q10(hunt: *NxHuntJournalRing,
148func nx_session_is_imbalanced(hunt: *NxHuntJournalRing,
called by 2: mainmain calls 1: nx_session_imbalance_q10