code wiki / _hdl_build / nx_actlog.nx

nx_actlog.nx

buildroot/runtime/_hdl_build/nx_actlog.nx

85350 B1750 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_actlog.nx -- ACTION LOG + WORKFLOW SEQUENCE MINER (ws=ws-intel3, 2026-07-20). F217 completion (loop design-of-record R3): every cycle action journaled (ws/tool/verb/ outcome) + the nx_workflow_mine half = n-gram mining over per-workstream action sequences. Recurring tool:verb bigrams/trigrams with support >= minsup are the EMPIRICAL workflow candidates (executed patterns, not combinatorial proposals -- the complement of nx_atlas_discover). The loop: sessions/seats/plans LOG actions -> mine surfaces patterns -> proposals enter nx_pm_intake -> PM/LLM seat triages -> catalog verb. Sequences NEVER cross workstream boundaries (per-ws successor chains). State derived, append-only, conflict-free (O_APPEND; ws_sync lineage). Frame: <ts>\t<ws>\t<tool>\t<verb>\t<outcome>\t<note> SCALE LAW: windowed reads + declared envelope (window_bytes/truncated/bigrams_capped/ trigrams_capped); O(n^3) pair scan honest for journal-window scale, declared. license_tier: ORIGINAL No hw writes (Rule 26). log <journal> <ws> <tool> <verb> <outcome> <note> -> ACTLOG OK mine <journal> [minsup] -> JSON (default minsup 2) freq <journal> [topn] -> JSON per-tool:verb counts, ranked (topn: rows emitted, default 30; distinct is always the whole population) (the fallback-log ranking verb; F872 rung 2) harden <journal> [minsup] [filer] -> every tool:verb recurring >= minsup auto-files a hardening debt via the ALLOWLIST-RESOLVED filer (default nx_debt; count-free canonical desc => idempotent) selftest <scratch-journal> -> gate T1..T9 (caller pre-cleans) steps <journal> [minsup] [conf] [topn] [now] -> ES26 STEPS-TO-SOLVE (2026-09-06): recurring adjacent bigrams/trigrams joined to knowledge/stepsolve.conf and classified ONE-STEP-AVAILABLE / DEPENDENCY / REDUCIBLE / UNDECLARED; support-weighted partition, the reason or the composed verb per ritual, the UNDECLARED worklist most common first; spine knowledge/status/stepsolve.spine + gauge stamp knowledge/status/stepsolve.stamp (gauge_pass)

dependencies 5 imports · 0 importers

nx_sovjson_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_stepsolve_lib.nx nx_actlog.nx

imports: nx_sovjson_lib.nxnx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nxnx_stepsolve_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_puts sys_write sys_exit al_vlen sj_vlen al_lit_eq al_selftest gv_ctr 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 ↻ gv_head gv_puts ↻ sys_openat_wr sys_close sys_mmap ↻ al_read sys_openat_rd sys_lseek sys_read sys_close ↻ gv_check gv_puts ↻ al_append sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real

structs

none

consts

35const AL_MAGIC_5381: i64 = 5381
36const AL_MAGIC_1100: i64 = 1100
37const AL_MAGIC_1101: i64 = 1101
38const AL_MAGIC_1102: i64 = 1102
39const AL_MAGIC_1103: i64 = 1103
40const AL_MAGIC_1104: i64 = 1104
41const AL_MAGIC_1105: i64 = 1105
42const AL_MAGIC_1106: i64 = 1106
43const AL_MAGIC_1107: i64 = 1107
44const AL_MAGIC_1108: i64 = 1108
45const AL_MAGIC_1110: i64 = 1110
46const AL_MAGIC_1111: i64 = 1111
47const AL_MAGIC_1112: i64 = 1112
48const AL_MAGIC_1113: i64 = 1113
49const AL_MAGIC_1114: i64 = 1114
50const AL_MAGIC_1115: i64 = 1115
51const AL_MAGIC_4096: i64 = 4096
52const AL_MAGIC_1500: i64 = 1500
53const AL_MAGIC_1024: i64 = 1024
54const AL_MAGIC_4090: i64 = 4090
56const AL_WIN: i64 = 4194304
57const AL_SEEK_SET: i64 = 0
58const AL_SEEK_END: i64 = 2
59const AL_OUT: i64 = 262144
60const AL_SOFT: i64 = 49152
61const AL_NAME_MAX: i64 = 120
62const AL_MINSUP_DEF: i64 = 2
63const AL_BIGRAM_CAP: i64 = 30
64const AL_TRIGRAM_CAP: i64 = 15
65const AL_FREQ_CAP: i64 = 30
66const AL_FREQ_SLOTS: i64 = 256
67const AL_HARDEN_SEV: i64 = 5
68const AL_HARDEN_CAP: i64 = 10
69const AL_ALLOW_BUF: i64 = 131072
70const AL_IX_TVMAX: i64 = 4096
71const AL_IX_HSLOTS: i64 = 8193
72const AL_IX_GMAX: i64 = 16384
73const AL_IX_GHSLOTS: i64 = 32771
74const AL_IX_ARENA: i64 = 1048576
75const AL_IX_HMOD: i64 = 1000003
76const AL_IX_KEYB: i64 = 8192
77const AL_IX_RING: i64 = 9
78const AL_IX_MAXGAP: i64 = 8

functions

81func al_cat(d: *u8, o: i64, s: *u8) -> i64 { return sj_cat(d, o, s) }
82func al_catn(d: *u8, o: i64, v: i64) -> i64 { return sj_catn(d, o, v) }
83func al_vlen(s: *u8) -> i64 { return sj_vlen(s) }
84func al_atoi_z(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8){ let c: i64=s[i] as i64; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } return v }
called by 1: main
98func al_read(path: *u8, buf: *u8, cap: i64) -> i64
109func al_append(journal: *u8, ts: i64, ws: *u8, tool: *u8, verb: *u8, outcome: *u8, note: *u8) -> i64
141func al_le(q: *u8, i: i64, n: i64) -> i64 { return sj_le(q, i, n) }
142func al_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 { return sj_col(q, ls, le, c, out) }
143func al_span_eq(q: *u8, s1: i64, e1: i64, s2: i64, e2: i64) -> i64
called by 2: al_succal_tv_eq
149func al_lit_eq(q: *u8, s: i64, e: i64, lit: *u8) -> i64
called by 2: al_selftestmain
155func al_frames(q: *u8, n: i64) -> i64
163func al_succ(q: *u8, cx: *i64, ls: i64) -> i64
178func al_tv_eq(q: *u8, cx: *i64, l1: i64, l2: i64) -> i64
193func al_bg_eq(q: *u8, cx: *i64, i: i64, j: i64, i2: i64, j2: i64) -> i64
199func al_bg_first(q: *u8, cx: *i64, i: i64, j: i64) -> i64
called by 1: al_mine_json calls 3: al_leal_succal_bg_eq
210func al_bg_support(q: *u8, cx: *i64, i: i64, j: i64) -> i64
223func al_tg_first(q: *u8, cx: *i64, i: i64, j: i64, k2: i64) -> i64
237func al_tg_support(q: *u8, cx: *i64, i: i64, j: i64, k2: i64) -> i64
252func al_jesc(d: *u8, o: i64, q: *u8, s: i64, e: i64, maxb: i64) -> i64
266func al_key(d: *u8, o: i64, name: *u8) -> i64
276func al_qlit(d: *u8, o: i64, s: *u8) -> i64
284func al_emit_tv(d: *u8, o: i64, q: *u8, cx: *i64, l: i64) -> i64
296func al_mine_json(q: *u8, cx: *i64, minsup: i64, d: *u8) -> i64
412func al_find(d: *u8, dn: i64, lit: *u8) -> i64
called by 2: al_bench_caseal_selftest calls 1: al_vlen
430func al_tv_count(q: *u8, cx: *i64, l: i64) -> i64
441func al_tv_first(q: *u8, cx: *i64, l: i64) -> i64
450func al_freq_json(q: *u8, cx: *i64, d: *u8) -> i64
531func al_allow_path(name: *u8, outp: *u8) -> i64 { return sj_allow_path(name, outp) }
called by 1: al_harden_json calls 1: sj_allow_path
532func al_harden_json(q: *u8, cx: *i64, minsup: i64, sev: i64, filer: *u8, d: *u8) -> i64
638func al_z_eq(a: *u8, b: *u8) -> i64
called by 1: al_ix_sintern
644func al_z_hash(s: *u8) -> i64
called by 1: al_ix_sintern
651func al_ix_sintern(z: *u8, hash: *i64, off: *i64, hslots: i64, maxn: i64, ar: *u8, an: *i64, nn: *i64) -> i64
called by 1: al_ix_build calls 3: al_z_hashal_vlenal_z_eq
677func al_ix_kintern(key: i64, hash: *i64, keys: *i64, hslots: i64, maxn: i64, nn: *i64) -> i64
called by 1: al_ix_build
700func al_ix_build(q: *u8, cx: *i64, ix: *i64, maxgap: i64) -> i64
815func al_ix_tv_emit(d: *u8, o: i64, ar: *u8, off: i64) -> i64
823func al_freq_fast(q: *u8, cx: *i64, d: *u8, fcap: i64) -> i64
898func al_bg_is_closed(a: i64, b: i64, sup: i64, tgkey: *i64, tgcnt: *i64, ntg: i64) -> i64
912func al_mine_fast(q: *u8, cx: *i64, minsup: i64, maxgap: i64, closed: i64, d: *u8) -> i64
1065func al_steps_sig(sig: *u8, ar: *u8, offs: *i64, kind: i64, idx: i64, bgkey: *i64, tgkey: *i64) -> i64
called by 2: al_steps_emit_oneal_steps calls 1: al_cat
1079func al_steps_emit_one(d: *u8, p0: i64, sig: *u8, ar: *u8, offs: *i64, bgkey: *i64, tgkey: *i64, cq: *u8, tab: *i64, rt: *i64, kind: i64, idx: i64, sup: i64, fail: i64, cls: i64, row: i64, rule: i64) -> i64
1118func al_steps_emit_rules(d: *u8, p0: i64, cq: *u8, rt: *i64, nrules: i64) -> i64
1138func al_steps(q: *u8, cx: *i64, minsup: i64, confpath: *u8, topn: i64, now: i64, d: *u8) -> i64
1336func al_bench_path(dst: *u8, prefix: *u8, now: i64, sfx: *u8) -> i64
1347func al_bench_case(ctr: *i64, name: *u8, jr: *u8, minsup: i64, maxgap: i64, needle: *u8, want: i64) -> i64
1366func al_bench(prefix: *u8) -> i64
1438func al_selftest(journal: *u8) -> i64
1623func main(argc: i64, argv: *i64) -> i64