code wiki / _hdl_build / nx_analyst_case_led.nx

nx_analyst_case_led.nx source

↩ module page · 84 lines · 6283 B

1// nx_analyst_case_led.nx -- ANALYST CASE 001 v2 RUNNER: evaluates knowledge/analyst/ac_vs_pc_v2.led 2// (the case is DATA; this binary never changes per case) and emits the operator report. v2 = the 3// AN8 fetch-re-earn answer: labor is now a MEASURED build-up (BLS x crew-hours x burden) instead of 4// a $1050 plug, demoted rows re-earned through NEW bias classes, leftover money is a NAMED gap row. 5// license_tier: ORIGINAL 6import "nx_ledger_data.nx" 7import "nx_syscalls.nx" 8const K_MAGIC_491750: i64 = 491750 9 10func cl_wf2(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 } 11func cl_wn2(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(fd,bb,k); return 0 } 12 13func main() -> i64 { 14 let st: *i64 = sys_mmap(8*24) as *i64 15 let out: *i64 = sys_mmap(8*12) as *i64 16 let sup: *i64 = sys_mmap(8*4) as *i64 17 if ld_parse_file("knowledge/analyst/ac_vs_pc_v2.led" as *u8, st) != 1 { 18 cl_wf2(1, "LED PARSE REFUSED (loud)\n" as *u8) 19 sys_exit(1) 20 } 21 ld_eval(st, out) 22 23 let fd: i64 = sys_openat_wr("knowledge/status/analyst_ac_v2.log" as *u8, 0x1a4) 24 cl_wf2(fd, "# ANALYST CASE 001 v2 -- AC vs PC, re-answered after the fetch-re-earn rung (AN8) from the data file ac_vs_pc_v2.led\n" as *u8) 25 cl_wf2(fd, "# 2026-06-10. The case is DATA: this report regenerates from the .led file alone; new case = new file, no recompile.\n\n" as *u8) 26 cl_wf2(fd, "## what changed vs v0/strict\n" as *u8) 27 cl_wf2(fd, " - the $1050 'burdened labor' PLUG is dead: labor = BLS 49-9021 median $28.75/hr [S11, gov class]\n" as *u8) 28 cl_wf2(fd, " x 12 crew-hours [S12 manufacturer, S13 cost-guides] x 1.5 burden [S14 industry guides] = $517.50 MEASURED.\n" as *u8) 29 cl_wf2(fd, " - root price re-earned: manufacturer's own range [S9 trane.com $3.2k-6.5k entry, $5k-25k avg] + vendor breakdown [S10]\n" as *u8) 30 cl_wf2(fd, " now corroborate the lead-gen guides across 3 classes.\n" as *u8) 31 cl_wf2(fd, " - equipment re-earned: trade DISTRIBUTOR posted prices [S15 Ferguson/acwholesalers] join the vendor class [S3].\n" as *u8) 32 cl_wf2(fd, " - pc-margin context re-earned: IDC market research [S16] + academic study (4%->~1%) [S17] break the issuer echo.\n" as *u8) 33 cl_wf2(fd, " - the leftover $532.50 is a NAMED gap row (permits/inspection/lineset variance/pricing noise) -- visible, not smoothed.\n" as *u8) 34 cl_wf2(fd, " - materials ($300) is STILL single-class -> demoted; F3 (supplier invoices / municipal fee schedules) remains owed.\n\n" as *u8) 35 cl_wf2(fd, "## strict evaluation (independence rule live)\n" as *u8) 36 cl_wf2(fd, " closure-fails=" as *u8); cl_wn2(fd, out[7]) 37 cl_wf2(fd, " demotions=" as *u8); cl_wn2(fd, out[6]) 38 cl_wf2(fd, " traced-cents=" as *u8); cl_wn2(fd, out[0]) 39 cl_wf2(fd, " coverage-permil=" as *u8); cl_wn2(fd, out[1]) 40 cl_wf2(fd, " residual-permil=" as *u8); cl_wn2(fd, out[2]); cl_wf2(fd, "\n" as *u8) 41 cl_wf2(fd, " VERDICT=" as *u8); cl_wn2(fd, out[3]) 42 cl_wf2(fd, " (1=EXPLAINED) -- the price IS its traced costs. The 'shenanigan' is not hidden money:\n" as *u8) 43 cl_wf2(fd, " it is the IN-THE-OPEN structure -- a ~40% install gross margin + gatekept equipment channel,\n" as *u8) 44 cl_wf2(fd, " each now corroborated across independent (and for margin, OPPOSED) incentive classes.\n" as *u8) 45 cl_wf2(fd, " CONFIDENCE: " as *u8); cl_wf2(fd, sg_conf_name(out[5])) 46 cl_wf2(fd, " -- weakest admitted leg " as *u8); cl_wn2(fd, out[4]) 47 cl_wf2(fd, " permil (margin's vendor leg is still an expert claim; F6 measured-markup data lifts it)\n" as *u8) 48 cl_wf2(fd, " LIKELIHOOD: residual-money share is 144 permil of price -- below the 150 shenanigan bar; what remains\n" as *u8) 49 cl_wf2(fd, " unexplained is small and NAMED. (Confidence above is stated separately, per the ICD-203 law.)\n\n" as *u8) 50 cl_wf2(fd, "## the answer to the operator question, v2\n" as *u8) 51 cl_wf2(fd, " An installed AC costs ~7x a better computer NOT because the machine is dear ($2100 of $5750, 37%)\n" as *u8) 52 cl_wf2(fd, " and NOT mainly because labor is dear (measured: ~$518, 9%) -- but because the delivery STRUCTURE\n" as *u8) 53 cl_wf2(fd, " attaches ~$2300 (40%) of local-service gross margin to every unit through a licensed, gatekept\n" as *u8) 54 cl_wf2(fd, " channel, while the PC's globalized chain runs on 1-6% margins (SEC + IDC + academic, 3 classes).\n" as *u8) 55 cl_wf2(fd, " Media common-wisdoms (refrigerant, raw materials) remain 0-admitted narrative.\n\n" as *u8) 56 cl_wf2(fd, "## remaining owed (kept loud)\n" as *u8) 57 cl_wf2(fd, " F3 materials via supplier-invoice/municipal class (re-earn the demoted $300 row)\n" as *u8) 58 cl_wf2(fd, " F6 measured markup invoices (lift margin's vendor leg 122 -> confidence MODERATE+)\n" as *u8) 59 sys_close(fd) 60 61 // self-checks (must equal the gate's hand-computed values) 62 let r: *i64 = sys_mmap(8*12) as *i64 63 var t: i64 = 0 64 r[t]=0; if out[7] == 0 { r[t]=1 } t=t+1 65 r[t]=0; if out[6] == 1 { r[t]=1 } t=t+1 66 r[t]=0; if out[0] == K_MAGIC_491750 { r[t]=1 } t=t+1 67 r[t]=0; if out[1] == 855 { r[t]=1 } t=t+1 68 r[t]=0; if out[2] == 144 { r[t]=1 } t=t+1 69 r[t]=0; if out[3] == AN_EXPLAINED { r[t]=1 } t=t+1 70 r[t]=0; if out[4] == 122 { r[t]=1 } t=t+1 71 r[t]=0; if out[5] == SG_CONF_LOW { r[t]=1 } t=t+1 72 r[t]=0; if ld_node_support(st, 4, sup) == 2 { r[t]=1 } t=t+1 73 var pass: i64 = 0 74 var i: i64 = 0 75 while i < t { pass = pass + r[i]; i = i + 1 } 76 cl_wf2(1, "=== ANALYST CASE 001 v2 (from ac_vs_pc_v2.led) ===\n verdict=" as *u8); cl_wn2(1, out[3]) 77 cl_wf2(1, " (1=EXPLAINED) coverage=" as *u8); cl_wn2(1, out[1]) 78 cl_wf2(1, " residual=" as *u8); cl_wn2(1, out[2]) 79 cl_wf2(1, " confidence=" as *u8); cl_wf2(1, sg_conf_name(out[5])) 80 cl_wf2(1, "\n report -> knowledge/status/analyst_ac_v2.log\n checks " as *u8) 81 cl_wn2(1, pass); cl_wf2(1, "/" as *u8); cl_wn2(1, t); cl_wf2(1, "\n" as *u8) 82 if pass == t { sys_exit(0); return 0 } 83 sys_exit(1); return 1 84}