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> [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
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
structs
| none |
consts
| 35 | const AL_MAGIC_5381: i64 = 5381 |
| 36 | const AL_MAGIC_1100: i64 = 1100 |
| 37 | const AL_MAGIC_1101: i64 = 1101 |
| 38 | const AL_MAGIC_1102: i64 = 1102 |
| 39 | const AL_MAGIC_1103: i64 = 1103 |
| 40 | const AL_MAGIC_1104: i64 = 1104 |
| 41 | const AL_MAGIC_1105: i64 = 1105 |
| 42 | const AL_MAGIC_1106: i64 = 1106 |
| 43 | const AL_MAGIC_1107: i64 = 1107 |
| 44 | const AL_MAGIC_1108: i64 = 1108 |
| 45 | const AL_MAGIC_1110: i64 = 1110 |
| 46 | const AL_MAGIC_1111: i64 = 1111 |
| 47 | const AL_MAGIC_1112: i64 = 1112 |
| 48 | const AL_MAGIC_1113: i64 = 1113 |
| 49 | const AL_MAGIC_1114: i64 = 1114 |
| 50 | const AL_MAGIC_1115: i64 = 1115 |
| 51 | const AL_MAGIC_4096: i64 = 4096 |
| 52 | const AL_MAGIC_1500: i64 = 1500 |
| 53 | const AL_MAGIC_1024: i64 = 1024 |
| 54 | const AL_MAGIC_4090: i64 = 4090 |
| 56 | const AL_WIN: i64 = 4194304 |
| 57 | const AL_SEEK_SET: i64 = 0 |
| 58 | const AL_SEEK_END: i64 = 2 |
| 59 | const AL_OUT: i64 = 262144 |
| 60 | const AL_SOFT: i64 = 49152 |
| 61 | const AL_NAME_MAX: i64 = 120 |
| 62 | const AL_MINSUP_DEF: i64 = 2 |
| 63 | const AL_BIGRAM_CAP: i64 = 30 |
| 64 | const AL_TRIGRAM_CAP: i64 = 15 |
| 65 | const AL_FREQ_CAP: i64 = 30 |
| 66 | const AL_FREQ_SLOTS: i64 = 256 |
| 67 | const AL_HARDEN_SEV: i64 = 5 |
| 68 | const AL_HARDEN_CAP: i64 = 10 |
| 69 | const AL_ALLOW_BUF: i64 = 131072 |
| 70 | const AL_IX_TVMAX: i64 = 4096 |
| 71 | const AL_IX_HSLOTS: i64 = 8193 |
| 72 | const AL_IX_GMAX: i64 = 16384 |
| 73 | const AL_IX_GHSLOTS: i64 = 32771 |
| 74 | const AL_IX_ARENA: i64 = 1048576 |
| 75 | const AL_IX_HMOD: i64 = 1000003 |
| 76 | const AL_IX_KEYB: i64 = 8192 |
| 77 | const AL_IX_RING: i64 = 9 |
| 78 | const AL_IX_MAXGAP: i64 = 8 |
functions
| 81 | func al_cat(d: *u8, o: i64, s: *u8) -> i64 { return sj_cat(d, o, s) } |
| 82 | func al_catn(d: *u8, o: i64, v: i64) -> i64 { return sj_catn(d, o, v) } called by 11: al_appendal_mine_jsonal_freq_jsonal_harden_jsonal_freq_fastal_mine_fast+5 calls 1: sj_catn |
| 83 | func al_vlen(s: *u8) -> i64 { return sj_vlen(s) } called by 12: al_mine_jsonal_findal_freq_jsonal_harden_jsonal_ix_sinternal_ix_tv_emit+6 calls 1: sj_vlen |
| 84 | 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 |
| 98 | func al_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 109 | 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 |
| 141 | func al_le(q: *u8, i: i64, n: i64) -> i64 { return sj_le(q, i, n) } |
| 142 | func al_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 { return sj_col(q, ls, le, c, out) } |
| 143 | func al_span_eq(q: *u8, s1: i64, e1: i64, s2: i64, e2: i64) -> i64 |
| 149 | func al_lit_eq(q: *u8, s: i64, e: i64, lit: *u8) -> i64 |
| 155 | func al_frames(q: *u8, n: i64) -> i64 |
| 163 | func al_succ(q: *u8, cx: *i64, ls: i64) -> i64 |
| 178 | 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 |
| 193 | func al_bg_eq(q: *u8, cx: *i64, i: i64, j: i64, i2: i64, j2: i64) -> i64 |
| 199 | func al_bg_first(q: *u8, cx: *i64, i: i64, j: i64) -> i64 |
| 210 | func al_bg_support(q: *u8, cx: *i64, i: i64, j: i64) -> i64 |
| 223 | func al_tg_first(q: *u8, cx: *i64, i: i64, j: i64, k2: i64) -> i64 |
| 237 | func al_tg_support(q: *u8, cx: *i64, i: i64, j: i64, k2: i64) -> i64 |
| 252 | func al_jesc(d: *u8, o: i64, q: *u8, s: i64, e: i64, maxb: i64) -> i64 |
| 266 | func al_key(d: *u8, o: i64, name: *u8) -> i64 called by 8: al_mine_jsonal_freq_jsonal_harden_jsonal_freq_fastal_mine_fastal_steps_emit_one+2 calls 1: al_cat |
| 276 | func al_qlit(d: *u8, o: i64, s: *u8) -> i64 called by 7: al_mine_jsonal_freq_jsonal_harden_jsonal_freq_fastal_mine_fastal_steps_emit_one+1 calls 1: al_cat |
| 284 | func al_emit_tv(d: *u8, o: i64, q: *u8, cx: *i64, l: i64) -> i64 |
| 296 | func al_mine_json(q: *u8, cx: *i64, minsup: i64, d: *u8) -> i64 |
| 412 | func al_find(d: *u8, dn: i64, lit: *u8) -> i64 |
| 430 | func al_tv_count(q: *u8, cx: *i64, l: i64) -> i64 |
| 441 | func al_tv_first(q: *u8, cx: *i64, l: i64) -> i64 |
| 450 | func al_freq_json(q: *u8, cx: *i64, d: *u8) -> i64 |
| 531 | func al_allow_path(name: *u8, outp: *u8) -> i64 { return sj_allow_path(name, outp) } |
| 532 | func al_harden_json(q: *u8, cx: *i64, minsup: i64, sev: i64, filer: *u8, d: *u8) -> i64 |
| 638 | func al_z_eq(a: *u8, b: *u8) -> i64 called by 1: al_ix_sintern |
| 644 | func al_z_hash(s: *u8) -> i64 called by 1: al_ix_sintern |
| 651 | func al_ix_sintern(z: *u8, hash: *i64, off: *i64, hslots: i64, maxn: i64, ar: *u8, an: *i64, nn: *i64) -> i64 |
| 677 | func al_ix_kintern(key: i64, hash: *i64, keys: *i64, hslots: i64, maxn: i64, nn: *i64) -> i64 called by 1: al_ix_build |
| 700 | func al_ix_build(q: *u8, cx: *i64, ix: *i64, maxgap: i64) -> i64 called by 3: al_freq_fastal_mine_fastal_steps calls 5: sys_mmapal_leal_colal_ix_sinternal_ix_kintern |
| 815 | func al_ix_tv_emit(d: *u8, o: i64, ar: *u8, off: i64) -> i64 |
| 823 | func al_freq_fast(q: *u8, cx: *i64, d: *u8, fcap: i64) -> i64 |
| 898 | func al_bg_is_closed(a: i64, b: i64, sup: i64, tgkey: *i64, tgcnt: *i64, ntg: i64) -> i64 |
| 912 | func al_mine_fast(q: *u8, cx: *i64, minsup: i64, maxgap: i64, closed: i64, d: *u8) -> i64 |
| 1065 | func al_steps_sig(sig: *u8, ar: *u8, offs: *i64, kind: i64, idx: i64, bgkey: *i64, tgkey: *i64) -> i64 |
| 1079 | func 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 |
| 1118 | func al_steps_emit_rules(d: *u8, p0: i64, cq: *u8, rt: *i64, nrules: i64) -> i64 |
| 1138 | func al_steps(q: *u8, cx: *i64, minsup: i64, confpath: *u8, topn: i64, now: i64, d: *u8) -> i64 called by 1: main calls 25: sys_mmapal_ix_buildss_totals_zerosys_read_filess_capacityss_conf_load+19 |
| 1336 | func al_bench_path(dst: *u8, prefix: *u8, now: i64, sfx: *u8) -> i64 |
| 1347 | func al_bench_case(ctr: *i64, name: *u8, jr: *u8, minsup: i64, maxgap: i64, needle: *u8, want: i64) -> i64 |
| 1366 | func al_bench(prefix: *u8) -> i64 called by 2: al_selftestmain calls 8: gv_ctrgv_headsys_now_realtime_secsys_mmapal_bench_pathal_append+2 |
| 1438 | func al_selftest(journal: *u8) -> i64 |
| 1623 | func main(argc: i64, argv: *i64) -> i64 |