nx_behaveprobe.nx
buildroot/runtime/nx_behaveprobe.nx
about
nx_behaveprobe.nx -- paired workload observations for reviewed promotion evidence.
Complete capture and matching outputs/exits are observations, not sufficient proof of behavior,
workload coverage, or deployment quality. The caller must qualify the workload and exit contract.
Running a supplied workload executes it twice; the caller owns its side-effect authorization.
Existing CLI directions and helper entrypoints remain available.
dependencies 3 imports · 4 importers
imports: nx_tool_run.nxjson_emit.nxnx_itoa_lib.nx
imported by: nx_adopt_observation_candidate_t313.nxnx_adoptgate.nxnx_behavior_evidence_gate_t297.nxnx_body_matched_serving_probe_t345.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 68 | struct NxBehaviorRequest { live:*u8,other:*u8,cwd:*u8,args:*i64,arg_count:i64,timeout_ms:i64,max_capture_bytes:i64 } |
| 69 | struct NxBehaviorResult { state:i64,matched:i64,same_output:i64,same_exit:i64,grade:i64,live_rc:i64,other_rc:i64,live_bytes:i64,other_bytes:i64,first_diff:i64,live_wait:i64,other_wait:i64,live_exit:i64,other_exit:i64,live_signal:i64,other_signal:i64,live_setup:i64,other_setup:i64,live_exec:i64,other_exec:i64,live_reaped:i64,other_reaped:i64,live_capacity:i64,other_capacity:i64,live_timeout:i64,other_timeout:i64,coverage_verified:i64 } |
| 132 | struct BpRecordWriter { owned:*NxBufOwned,number:*u8,max_bytes:i64,error:i64 } |
consts
| 10 | const BP_HOST: *u8 = "/volume1/homes/elderwesto/nishihost" |
| 11 | const BP_CAP: i64 = 262144 |
| 12 | const BP_TMO: i64 = 120000 |
| 20 | const BP_SIGNAL_RC_BASE: i64 = 128 |
| 61 | const BP_UNQUALIFIED:i64=-301 |
| 62 | const BP_INVALID:i64=-302 |
| 63 | const BP_G_WEAK:i64=1 |
| 64 | const BP_G_HARNESS:i64=2 |
| 65 | const BP_G_SIGNALLED:i64=3 |
| 66 | const BP_G_GRADED:i64=4 |
| 67 | const BP_G_STRONG:i64=5 |
functions
| 21 | func bp_eq(a: *u8, b: *u8) -> i64 called by 1: main |
| 28 | func bp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 29 | func be(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(2,s,n); return 0 } called by 1: main |
| 30 | func bn(v:i64)->i64{return nxi_out(v)} calls 1: nxi_out |
| 31 | func bcat(d: *u8, o: i64, s: *u8) -> i64 { var x: i64=o; var i: i64=0; while s[i]!=(0 as u8){d[x]=s[i];x=x+1;i=i+1} return x } called by 1: main |
| 32 | func bexists(p: *u8) -> i64 { let fd: i64 = sys_openat_rd(p); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 42 | func bp_has(buf: *u8, n: i64, needle: *u8) -> i64 |
| 70 | func bp_result_init(r:*NxBehaviorResult)->i64 |
| 77 | func bp_run_result(q:*NxBehaviorRequest,r:*NxBehaviorResult)->i64 called by 4: ag_observe_resultag_observe_resultmainmain calls 3: bp_result_inittr_run_capture_owned_resultbp_has |
| 130 | func bp_len(s:*u8)->i64{var n:i64=0;while s[n]!=(0 as u8){n=n+1};return n} |
| 133 | func bp_record_bytes(w:*BpRecordWriter,s:*u8,n:i64)->i64 |
| 137 | func bp_record_literal(w:*BpRecordWriter,s:*u8)->i64{return bp_record_bytes(w,s,bp_len(s))} |
| 138 | func bp_record_string(w:*BpRecordWriter,s:*u8)->i64 |
| 151 | func bp_record_number(w:*BpRecordWriter,name:*u8,value:i64)->i64 |
| 159 | func bp_grade_text(grade:i64)->*u8 called by 1: bp_build_result |
| 166 | func bp_build_result(target:*u8,mode:*u8,r:*NxBehaviorResult,owned:*NxBufOwned,max_bytes:i64)->i64 called by 2: bp_emit_result_fdmain calls 4: bp_record_literalbp_record_stringbp_record_numberbp_grade_text |
| 197 | func bp_write_record(fd:i64,b:*NxBufOwned)->i64 |
| 208 | func bp_emit_result_fd(fd:i64,target:*u8,mode:*u8,r:*NxBehaviorResult)->i64 |
| 215 | func bp_emit_result(target:*u8,mode:*u8,r:*NxBehaviorResult)->i64{return bp_emit_result_fd(1,target,mode,r)} |
| 217 | func main(argc:i64,argv:*i64)->i64 |