code wiki / (root) / nx_haircollide_gate.nx

nx_haircollide_gate.nx

buildroot/runtime/nx_haircollide_gate.nx

8781 B139 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_haircollide_gate.nx -- THE TOOTH THE COLLIDER OWED. Subject: vm_capsule_push (nx_vecmath) and hd_tick_collide (nx_hairdyn_lib), landed 2026-09-04 against the operator's REJECT row beach-hair-colour-wind-0830: "hair clips the body and moves like a mop, not strand by strand". WHY IT EXISTS AS ITS OWN GATE. nx_hairdyn_gate's teeth measure hd_tick, which this change DELIBERATELY left unchanged, so a GREEN from it would say nothing whatever about the collider -- the classic shape of a gate that is counted as coverage while being structurally blind to the thing shipped beside it. * A COMPILING CAPABILITY IS NOT A PROVEN ONE. The lib built clean hours before this file existed, and a clean build is exactly what an absent collider also produces, because absent code has no failure mode. THE ANTI-VACUITY TOOTH IS THE ncap=0 CONTROL: with no capsules the SAME seeded point must remain INSIDE the region a capsule would have covered. Without it, a collider that silently did nothing would pass every "is the point outside?" assertion whenever the seed happened to start outside, and a collider that pushed EVERYTHING would pass them all too -- which is why a positive control (a point outside is left ALONE) sits beside the deny tooth. A suite that only asks "was it pushed?" is blind in both directions. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_vecmath.nx nx_hairdyn_lib.nx nx_haircollide_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_vecmath.nxnx_hairdyn_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ vm_capsule_push vm_isqrt gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap hg_dist_to_axis vm_isqrt ↻ gv_check_near gv_check ↻ gv_puts ↻ gv_num ↻ hd_alloc sd_alloc sys_mmap ↻

structs

none

consts

25const HG_AX: i64 = 0
26const HG_AY: i64 = 0
27const HG_AZ: i64 = 0
28const HG_BX: i64 = 0
29const HG_BY: i64 = 1000
30const HG_BZ: i64 = 0
31const HG_R: i64 = 100
32const HG_MID: i64 = 500 // a y strictly between the endpoints, so the closest point is ON the segment
33const HG_TOL: i64 = 2 // Q256 truncation band: three integer divides, each losing at most 1 unit

functions

35func hg_dist_to_axis(px: i64, py: i64, pz: i64) -> i64
called by 1: main calls 1: vm_isqrt
41func main() -> i64