code wiki / _hdl_build / nx_four_pillars.nx

nx_four_pillars.nx

buildroot/runtime/_hdl_build/nx_four_pillars.nx

2923 B48 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_four_pillars.nx -- the ENGINEER's FOUR-PILLAR GUARD: the intelligent, additive guard that makes a defect class un-recurring (operator: "the guard you describe if intelligent and additive is the four pillars work i wanted the engineer to address as its responsibility"). This is the team's established pattern (G1 regalloc guard, nx-int alias guard) formalized + made the Engineer's owned responsibility. The four pillars (ALL required -- a partial guard is not a guard): 1. GATE -- a regression gate that FAILS LOUD if the class recurs (CI smoke). 2. PROBE -- a minimal repro that isolates the root cause (proves we understand it). 3. KAT -- a known-answer test locking the correct behavior forever. 4. PREVENTION -- the structural fix that makes the bad input IMPOSSIBLE (loud-fail / pinned / data-driven). INTELLIGENT = the class is LEARNED from a real captured diagnostic (data-driven, like the Doctor learning the offending keyword), not a hardcoded match. ADDITIVE = adds new artifacts, never clobbers protected source. Owned by the ENGINEER (RACI). license_tier: ORIGINAL Formalizes the poka-yoke in nx_pipeline_metrics.

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_four_pillars.nx nx_charter_test.nx

imports: nx_syscalls.nx

imported by: nx_charter_test.nx

structs

none

consts

16const FP_GATE: i64 = 0
17const FP_PROBE: i64 = 1
18const FP_KAT: i64 = 2
19const FP_PREVENTION: i64 = 3
20const FP_NPILLARS: i64 = 4
22const FP_R_ENGINEER: i64 = 2 // matches dp_owner's ENGINEER -- the four-pillar guard is the Engineer's job

functions

25func fp_complete(gate: i64, probe: i64, kat: i64, prevention: i64) -> i64
called by 2: mainfp_valid
30func fp_pillar_count(gate: i64, probe: i64, kat: i64, prevention: i64) -> i64
called by 1: main
34func fp_intelligent(learned_from_diagnostic: i64) -> i64 { if learned_from_diagnostic == 1 { return 1 } return 0 }
called by 1: fp_valid
36func fp_additive(clobbers_existing: i64) -> i64 { if clobbers_existing == 0 { return 1 } return 0 }
called by 1: fp_valid
38func fp_owner() -> i64 { return FP_R_ENGINEER }
called by 1: main
41func fp_valid(gate: i64, probe: i64, kat: i64, prevention: i64, learned: i64, clobbers: i64) -> i64
48func fp_prevents_recurrence(valid: i64) -> i64 { if valid == 1 { return 1 } return 0 }
called by 1: main