code wiki / _hdl_build / nx_loop_monitor.nx
nx_loop_monitor.nx
buildroot/runtime/_hdl_build/nx_loop_monitor.nx
about
nx_loop_monitor.nx -- the MONITOR/HANDLER organ: the "someone on the team watching the loop and
handling its output" that was MISSING (operator caught it: the overnight loop ran 484 beats banking
0 wins on a DRY vein, with nobody noticing or re-tasking). This organ consumes the beat stream and
classifies the loop's PRODUCTIVITY, then HANDLES it -- continue / re-task to a new opportunity /
restart a stalled process. It is the feedback that turns "motion" into "progress". license_tier:
ORIGINAL Feeds nx_opportunity_loop (re-task -> re-scan) and nx_spec_ingest (productive -> spec).
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_loop_monitor_test.nxnx_parallel_runner.nxnx_research_auto.nx
structs
| none |
consts
| 10 | const LM_PRODUCTIVE: i64 = 1 // banking new wins recently -> keep going |
| 11 | const LM_DRY: i64 = 2 // log advancing but 0 wins for a long streak -> the vein is exhausted |
| 12 | const LM_STALL: i64 = 3 // log NOT advancing -> the process is hung/blocked |
| 14 | const LM_CONTINUE: i64 = 1 |
| 15 | const LM_RETASK: i64 = 2 // hand back to the opportunity loop to pick a different space |
| 16 | const LM_RESTART: i64 = 3 // kill + relaunch the worker |
functions
| 23 | func lm_classify(recent_wins: i64, advancing: i64, zero_streak: i64, dry_threshold: i64) -> i64 |
| 31 | func lm_action(verdict: i64) -> i64 |
| 38 | func lm_wasted_beats(zero_streak: i64, dry_threshold: i64) -> i64 called by 1: main |