code wiki / (root) / nx_select_test.nx

nx_select_test.nx

buildroot/runtime/nx_select_test.nx

8445 B189 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic select
docsdependenciesstructsconstsfunctions

about

nx_select_test.nx -- smoke for nx_select SA-4 MVP. Exercises six scenarios across the selection pipeline: 1. Empty input -> NX_SEL_BAD_INPUT 2. Single candidate that fits -> returns that index 3. Two candidates, one's ISA mask excludes the host -> picks the fit 4. Two candidates both fit, different cost -> picks lower cost 5. Policy weight swap (throughput vs energy) flips selection 6. Tier filter (variant requires HPC, host is LAPTOP) -> filtered out SA-4 verification gate per NISHI_SELF_ASSEMBLY_ROADMAP.md ยง8: "picks variants A on hardware H_A and B on H_B with both smokes passing on their respective hosts" -- demonstrated in code by synthesizing probes for both hosts and asserting different selections.

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_probe.nx nx_calibrate.nx nx_select.nx nx_select_test.nx

imports: nx_syscalls.nxnx_probe.nxnx_calibrate.nxnx_select.nx

imported by: nobody (leaf or entry point)

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

main _make_probe nx_probe_new sys_mmap nx_policy_throughput_defau sys_mmap ↻ sys_mmap ↻ nx_select nx_select_variant_fits nx_isa_bit nx_select_score nx_manifest_new sys_mmap ↻ nx_isa_bit ↻ nx_policy_energy_default sys_mmap ↻

structs

none

consts

none

functions

26func _make_probe(isa: i64) -> *NxProbeRecord
called by 1: main calls 1: nx_probe_new
39func main() -> i64