code wiki / (root) / nx_hunt_journal.nx

nx_hunt_journal.nx

buildroot/runtime/nx_hunt_journal.nx

3392 B105 linesdepth 3pulls 3 transitivereach 4 importersview sourcekind librarytopic hunt
docsdependenciesstructsconstsfunctions

about

nx_hunt_journal.nx -- append-only event ring for hunt events. Per [[feedback-hunter-gatherer-meta-primitives-outward-inward-axes]] CARDINAL: "nx_hunt_journal (~/.nishi/hunt.jsonl)." Append-only log of every hunt event (scout / engage / kill / archive) so the session-audit gate can verify hunt_count >= 1 per session, and imbalance flagger can detect 5x ratio for 3 consecutive sessions. V1 ships in-memory ring; on-disk JSONL persistence is queued (matches nx_evict_journal pattern; both write to ~/.nishi/<name>.jsonl in V2). Composes: nx_hunter -- emits events; journal records them nx_gather_journal -- the inward-axis dual; session-audit pairs both for valid-session predicate nx_provenance_chain -- hunt-kill events are transforms; chain-logged

dependencies 3 imports · 4 importers

nx_syscalls.nx nx_tier.nx nx_hunter.nx nx_hunt_journal.nx nx_gather_journal.nx nx_gather_journal_test.nx nx_hunt_journal_test.nx nx_session_audit_compose_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_hunter.nx

imported by: nx_gather_journal.nxnx_gather_journal_test.nxnx_hunt_journal_test.nxnx_session_audit_compose_test.nx

structs

32struct NxHuntEvent
42struct NxHuntJournalRing

consts

24const NX_HEV_SCOUTED: nx_int = 0
25const NX_HEV_ENGAGED: nx_int = 1
26const NX_HEV_KILLED: nx_int = 2
27const NX_HEV_ARCHIVED: nx_int = 3
28const NX_HEV_N_KINDS: nx_int = 4
49const NX_HEV_BYTES: nx_size = 40

functions

51func nx_hev_kind_is_valid(k: nx_int) -> nx_int
57func nx_hunt_journal_new(capacity: nx_size) -> *NxHuntJournalRing
called by 3: mainmainmain calls 1: sys_mmap
67func _hunt_jr_at(j: *NxHuntJournalRing, idx: nx_size) -> *NxHuntEvent
71func nx_hunt_journal_log(j: *NxHuntJournalRing,
90func nx_hunt_journal_count_kind(j: *NxHuntJournalRing, kind: nx_int) -> nx_int
called by 1: main calls 1: _hunt_jr_at
103func nx_hunt_journal_event_count(j: *NxHuntJournalRing) -> nx_size
called by 1: main