code wiki / _hdl_build / nx_compilefix_pm.nx

nx_compilefix_pm.nx source

↩ module page · 51 lines · 3707 B

1// nx_compilefix_pm.nx -- the PM TAKES the foundational assignment "<10s daemon builds" and routes it to 2// the team with tutoring (operator: "have the pm take this assignment and help tutor the nishi team"). 3// It is the TOP priority because it BLOCKS the daemon build, which blocks site-live -- highest Cost of 4// Delay in the whole project. Spec: knowledge/specs/2026-06-06-fast-compiler-crypto-assignment.md 5// license_tier: ORIGINAL 6import "nx_pm_decision_matrix.nx" 7import "nx_pm_review_log.nx" 8import "nx_syscalls.nx" 9 10func cf_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 11 12func main() -> i64 { 13 cf_puts("=== PM TAKES ASSIGNMENT: <10s daemon builds (fast compiler compiles crypto) ===\n" as *u8) 14 cf_puts(" foundational -- blocks daemon build -> blocks site-live -> highest Cost of Delay\n\n" as *u8) 15 16 // Cost of Delay: hw(compiler/toolchain)=5, sw(every build forever)=9, user(unblocks the site)=5, 17 // time-criticality(operator is blocked NOW)=10. Effort=4 build-units (bounded: the 8x32 twin exists). 18 let cod: i64 = dm_cost_of_delay(5, 9, 5, 10, 1, 1, 1, 1) 19 let wsjf: i64 = dm_wsjf(cod, 4) 20 cf_puts(" priority: WSJF=" as *u8) 21 let bb: *u8=sys_mmap(28); var m: i64=wsjf; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var qi: i64=0; while qi<k{bb[qi]=t[k-1-qi];qi=qi+1}; sys_write(1,bb,k) 22 cf_puts(" (top of the project)\n\n" as *u8) 23 24 let fd: i64 = sys_openat_append("/tmp/nishi_pm_plan.log" as *u8, 0x1a4) 25 pm_w(fd, "\n# FOUNDATIONAL (PM took 2026-06-06): <10s daemon builds via fast-compiler crypto path\n" as *u8) 26 pm_w(fd, "READY fast-compiler-crypto (gate intrinsics behind NX_FAST_INTRINSICS; default 8x32 oracle) status=WORKING-NEXT\n" as *u8) 27 pm_w(fd, "BLOCKED-ON-ABOVE integrate router into daemon + deploy (was 40min compile -> becomes seconds)\n" as *u8) 28 sys_close(fd) 29 30 cf_puts(" RACI routing (the team does it, Claude tutors):\n" as *u8) 31 cf_puts(" - BUILDER (Accountable to author): investigate callers of u256_mul_wide_4x64; gate the\n" as *u8) 32 cf_puts(" intrinsic path behind @ifdef NX_FAST_INTRINSICS; default-dispatch to u256_mul_wide (8x32).\n" as *u8) 33 cf_puts(" - CLAUDE (tutor): supplies the exact @ifdef template when the Builder raises its hand (novel\n" as *u8) 34 cf_puts(" crypto edit = the LLM-gap); does NOT hand-author it.\n" as *u8) 35 cf_puts(" - ENGINEER (verify): nx_umulhi_kat + nx_adc_acc_kat + nx_u256_mul4_fuzz (byte-exact) MUST pass,\n" as *u8) 36 cf_puts(" PLUS a NEW timing gate: known-good compiles a P-256 driver in <10s + ECDSA sign/verify parity.\n" as *u8) 37 cf_puts(" - COUNCIL (admit): additive-only, separation of duties (author != admitter).\n\n" as *u8) 38 39 let pm: i64 = pm_open("/tmp/nishi_pm_review.log" as *u8) 40 pm_flag(pm, "ASSIGN" as *u8, "compile/fast-crypto" as *u8, "TOP-PRIORITY" as *u8, 41 "fast compiler compiles crypto -> <10s builds" as *u8, 42 "Builder authors @ifdef gating (tutored); 8x32 oracle already verified; Engineer gates on existing KATs + new <10s timing gate" as *u8) 43 pm_flag(pm, "TUTOR" as *u8, "compile/fast-crypto" as *u8, "READY-TO-TUTOR" as *u8, 44 "Builder will raise a hand on the crypto @ifdef edit" as *u8, 45 "Claude supplies the precise template; Builder applies; no hand-authoring by Claude" as *u8) 46 sys_close(pm) 47 48 cf_puts(" >>> TEAM WORKS NEXT: Builder investigates u256_mul_wide_4x64 callers; Claude tutors the @ifdef.\n" as *u8) 49 cf_puts("---- PM assignment recorded; daemon-integrate + deploy re-queued behind it ----\n" as *u8) 50 sys_exit(0); return 0 51}