code wiki / _hdl_build / nx_four_pillars.nx
nx_four_pillars.nx
buildroot/runtime/_hdl_build/nx_four_pillars.nx
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
imports: nx_syscalls.nx
imported by: nx_charter_test.nx
structs
| none |
consts
| 16 | const FP_GATE: i64 = 0 |
| 17 | const FP_PROBE: i64 = 1 |
| 18 | const FP_KAT: i64 = 2 |
| 19 | const FP_PREVENTION: i64 = 3 |
| 20 | const FP_NPILLARS: i64 = 4 |
| 22 | const FP_R_ENGINEER: i64 = 2 // matches dp_owner's ENGINEER -- the four-pillar guard is the Engineer's job |
functions
| 25 | func fp_complete(gate: i64, probe: i64, kat: i64, prevention: i64) -> i64 |
| 30 | func fp_pillar_count(gate: i64, probe: i64, kat: i64, prevention: i64) -> i64 called by 1: main |
| 34 | func fp_intelligent(learned_from_diagnostic: i64) -> i64 { if learned_from_diagnostic == 1 { return 1 } return 0 } called by 1: fp_valid |
| 36 | func fp_additive(clobbers_existing: i64) -> i64 { if clobbers_existing == 0 { return 1 } return 0 } called by 1: fp_valid |
| 38 | func fp_owner() -> i64 { return FP_R_ENGINEER } called by 1: main |
| 41 | func fp_valid(gate: i64, probe: i64, kat: i64, prevention: i64, learned: i64, clobbers: i64) -> i64 |
| 48 | func fp_prevents_recurrence(valid: i64) -> i64 { if valid == 1 { return 1 } return 0 } called by 1: main |