code wiki / _hdl_build / nx_actlog.nx
nx_actlog.nx
buildroot/runtime/_hdl_build/nx_actlog.nx
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> -> JSON per-tool:verb counts, ranked
(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)
dependencies 4 imports · 0 importers
imports: nx_sovjson_lib.nxnx_syscalls.nxnx_gate_verdict.nxnx_tool_run.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
| 27 | const AL_MAGIC_5381: i64 = 5381 |
| 28 | const AL_MAGIC_1100: i64 = 1100 |
| 29 | const AL_MAGIC_1101: i64 = 1101 |
| 30 | const AL_MAGIC_1102: i64 = 1102 |
| 31 | const AL_MAGIC_1103: i64 = 1103 |
| 32 | const AL_MAGIC_1104: i64 = 1104 |
| 33 | const AL_MAGIC_1105: i64 = 1105 |
| 34 | const AL_MAGIC_1106: i64 = 1106 |
| 35 | const AL_MAGIC_1107: i64 = 1107 |
| 36 | const AL_MAGIC_1108: i64 = 1108 |
| 37 | const AL_MAGIC_1110: i64 = 1110 |
| 38 | const AL_MAGIC_1111: i64 = 1111 |
| 39 | const AL_MAGIC_1112: i64 = 1112 |
| 40 | const AL_MAGIC_1113: i64 = 1113 |
| 41 | const AL_MAGIC_1114: i64 = 1114 |
| 42 | const AL_MAGIC_1115: i64 = 1115 |
| 43 | const AL_MAGIC_4096: i64 = 4096 |
| 44 | const AL_MAGIC_1500: i64 = 1500 |
| 45 | const AL_MAGIC_1024: i64 = 1024 |
| 46 | const AL_MAGIC_4090: i64 = 4090 |
| 48 | const AL_WIN: i64 = 4194304 |
| 49 | const AL_OUT: i64 = 262144 |
| 50 | const AL_SOFT: i64 = 49152 |
| 51 | const AL_NAME_MAX: i64 = 120 |
| 52 | const AL_MINSUP_DEF: i64 = 2 |
| 53 | const AL_BIGRAM_CAP: i64 = 30 |
| 54 | const AL_TRIGRAM_CAP: i64 = 15 |
| 55 | const AL_FREQ_CAP: i64 = 30 |
| 56 | const AL_FREQ_SLOTS: i64 = 256 |
| 57 | const AL_HARDEN_SEV: i64 = 5 |
| 58 | const AL_HARDEN_CAP: i64 = 10 |
| 59 | const AL_ALLOW_BUF: i64 = 131072 |
| 60 | const AL_IX_TVMAX: i64 = 4096 |
| 61 | const AL_IX_HSLOTS: i64 = 8193 |
| 62 | const AL_IX_GMAX: i64 = 16384 |
| 63 | const AL_IX_GHSLOTS: i64 = 32771 |
| 64 | const AL_IX_ARENA: i64 = 1048576 |
| 65 | const AL_IX_HMOD: i64 = 1000003 |
| 66 | const AL_IX_KEYB: i64 = 8192 |
| 67 | const AL_IX_RING: i64 = 9 |
| 68 | const AL_IX_MAXGAP: i64 = 8 |
functions
| 71 | func al_cat(d: *u8, o: i64, s: *u8) -> i64 { return sj_cat(d, o, s) } |
| 72 | func al_catn(d: *u8, o: i64, v: i64) -> i64 { return sj_catn(d, o, v) } called by 7: al_appendal_mine_jsonal_freq_jsonal_harden_jsonal_freq_fastal_mine_fast+1 calls 1: sj_catn |
| 73 | func al_vlen(s: *u8) -> i64 { return sj_vlen(s) } called by 9: al_mine_jsonal_findal_freq_jsonal_harden_jsonal_ix_sinternal_ix_tv_emit+3 calls 1: sj_vlen |
| 74 | func 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 |
| 75 | func al_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 84 | func al_append(journal: *u8, ts: i64, ws: *u8, tool: *u8, verb: *u8, outcome: *u8, note: *u8) -> i64 called by 3: al_benchal_selftestmain calls 7: sys_now_realtime_secsys_mmapal_catnal_catsys_openat_appendsys_write+1 |
| 116 | func al_le(q: *u8, i: i64, n: i64) -> i64 { return sj_le(q, i, n) } |
| 117 | func al_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 { return sj_col(q, ls, le, c, out) } |
| 118 | func al_span_eq(q: *u8, s1: i64, e1: i64, s2: i64, e2: i64) -> i64 |
| 124 | func al_lit_eq(q: *u8, s: i64, e: i64, lit: *u8) -> i64 |
| 130 | func al_frames(q: *u8, n: i64) -> i64 |
| 138 | func al_succ(q: *u8, cx: *i64, ls: i64) -> i64 |
| 153 | func al_tv_eq(q: *u8, cx: *i64, l1: i64, l2: i64) -> i64 called by 5: al_bg_eqal_tg_firstal_tg_supportal_tv_countal_tv_first calls 4: sys_mmapal_leal_colal_span_eq |
| 168 | func al_bg_eq(q: *u8, cx: *i64, i: i64, j: i64, i2: i64, j2: i64) -> i64 |
| 174 | func al_bg_first(q: *u8, cx: *i64, i: i64, j: i64) -> i64 |
| 185 | func al_bg_support(q: *u8, cx: *i64, i: i64, j: i64) -> i64 |
| 198 | func al_tg_first(q: *u8, cx: *i64, i: i64, j: i64, k2: i64) -> i64 |
| 212 | func al_tg_support(q: *u8, cx: *i64, i: i64, j: i64, k2: i64) -> i64 |
| 227 | func al_jesc(d: *u8, o: i64, q: *u8, s: i64, e: i64, maxb: i64) -> i64 |
| 241 | func al_key(d: *u8, o: i64, name: *u8) -> i64 |
| 251 | func al_qlit(d: *u8, o: i64, s: *u8) -> i64 |
| 259 | func al_emit_tv(d: *u8, o: i64, q: *u8, cx: *i64, l: i64) -> i64 |
| 271 | func al_mine_json(q: *u8, cx: *i64, minsup: i64, d: *u8) -> i64 |
| 387 | func al_find(d: *u8, dn: i64, lit: *u8) -> i64 |
| 405 | func al_tv_count(q: *u8, cx: *i64, l: i64) -> i64 |
| 416 | func al_tv_first(q: *u8, cx: *i64, l: i64) -> i64 |
| 425 | func al_freq_json(q: *u8, cx: *i64, d: *u8) -> i64 |
| 506 | func al_allow_path(name: *u8, outp: *u8) -> i64 { return sj_allow_path(name, outp) } |
| 507 | func al_harden_json(q: *u8, cx: *i64, minsup: i64, sev: i64, filer: *u8, d: *u8) -> i64 |
| 613 | func al_z_eq(a: *u8, b: *u8) -> i64 called by 1: al_ix_sintern |
| 619 | func al_z_hash(s: *u8) -> i64 called by 1: al_ix_sintern |
| 626 | func al_ix_sintern(z: *u8, hash: *i64, off: *i64, hslots: i64, maxn: i64, ar: *u8, an: *i64, nn: *i64) -> i64 |
| 652 | func al_ix_kintern(key: i64, hash: *i64, keys: *i64, hslots: i64, maxn: i64, nn: *i64) -> i64 called by 1: al_ix_build |
| 675 | func al_ix_build(q: *u8, cx: *i64, ix: *i64, maxgap: i64) -> i64 |
| 764 | func al_ix_tv_emit(d: *u8, o: i64, ar: *u8, off: i64) -> i64 |
| 772 | func al_freq_fast(q: *u8, cx: *i64, d: *u8) -> i64 |
| 843 | func al_bg_is_closed(a: i64, b: i64, sup: i64, tgkey: *i64, tgcnt: *i64, ntg: i64) -> i64 called by 1: al_mine_fast |
| 857 | func al_mine_fast(q: *u8, cx: *i64, minsup: i64, maxgap: i64, closed: i64, d: *u8) -> i64 |
| 995 | func al_bench_path(dst: *u8, prefix: *u8, now: i64, sfx: *u8) -> i64 |
| 1006 | func al_bench_case(ctr: *i64, name: *u8, jr: *u8, minsup: i64, maxgap: i64, needle: *u8, want: i64) -> i64 |
| 1025 | func al_bench(prefix: *u8) -> i64 called by 2: al_selftestmain calls 8: gv_ctrgv_headsys_now_realtime_secsys_mmapal_bench_pathal_append+2 |
| 1097 | func al_selftest(journal: *u8) -> i64 |
| 1240 | func main(argc: i64, argv: *i64) -> i64 |