code wiki / _hdl_build / nx_param_tune.nx
nx_param_tune.nx
buildroot/runtime/_hdl_build/nx_param_tune.nx
about
nx_param_tune.nx -- X-PRM-003 rung1: autonomous single-variable param tuning (RSI).
Picks ONE TUNABLE param (triage_drill_cap, the documented first target), reads its CURRENT value
from params.tsv, MEASURES its named effect meter over REAL data (the failure-evidence DEMAND =
count of RED rows the cap must cover), does a seed-fixed sweep over [2,8], and PROPOSES a new value
(gate-judged, NOT auto-applied -- written to param_proposals.tsv). Honest no-overclaim: the meter
here is failure-coverage (real); fuller factors (Doctor route-time, token-cost model) = rung2.
CONSERVATIVE: a QUIET signal (demand=0) proposes HOLD -- never tune a cap down on a momentary lull.
Self-validating: synthetic controls prove the proposal RESPONDS to the measured demand (no false-green).
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 10 | const K_MAGIC_262144: i64 = 262144 |
| 11 | const K_MAGIC_262128: i64 = 262128 |
| 12 | const K_MAGIC_2097152: i64 = 2097152 |
| 13 | const K_MAGIC_2097136: i64 = 2097136 |
functions
| 15 | func pt_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 16 | func pt_n(fd: i64, v: i64) -> i64 |
| 22 | func pt_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 31 | func pt_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64 |
| 42 | func pt_slice_eq(a: *u8, s: i64, e: i64, name: *u8) -> i64 called by 1: pt_param_value |
| 48 | func pt_int(buf: *u8, s: i64, e: i64) -> i64 called by 1: pt_param_value |
| 54 | func pt_param_value(buf: *u8, n: i64, name: *u8) -> i64 |
| 69 | func pt_count_status(buf: *u8, n: i64, sb: i64) -> i64 |
| 84 | func pt_target(current: i64, demand: i64, lo: i64, hi: i64) -> i64 called by 1: main |
| 91 | func main(argc: i64, argv: *i64) -> i64 |