code wiki / _hdl_build / nx_adoptsweep.nx

nx_adoptsweep.nx

buildroot/runtime/_hdl_build/nx_adoptsweep.nx

21765 B382 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_adoptsweep.nx -- WHAT FRACTION OF THE ADOPTER CLASS ACTUALLY MIGRATES? The D001 census (nx_drysweep, debt 1786236504) found adopter=605 of 2312 gates. But ADOPTER only means dry_apply EMITS a candidate -- it does NOT mean nx_gate_migrate verify ACCEPTS it. Proven end-to-end on exactly ONE gate (nx_activities_gate: 400 D001 -> ships, debt 1786236952), so the ACCEPTANCE RATE is 1/1 and publishing "605 migrate" would be an overclaim off a sample of one. This measures the rate. ★COMPOSES TWO RULERS AND RE-IMPLEMENTS NEITHER. The worklist is read from knowledge/status/drysweep.log -- the census is the single source of truth, not a second walk that could silently disagree -- and each gate is judged by forking nx_gate_dry_apply then nx_gate_migrate verify. This organ only TALLIES. ⚠THIS ORGAN MUTATES SOURCE. nx_gate_migrate verify COMMITS on acceptance (keeping <gate>.nx.premigrate, rule 13) and RESTORES on any divergence -- that commit-or-restore is what makes a bounded batch safe, but it is still a real edit to real gates. <max> is therefore MANDATORY and small by default: measure the rate on a batch, read the result, THEN decide the size of the next one. Never sweep 605 blind. ★NO SILENT CAPS: the DEFERRED remainder is printed; resume with <skip>. ★DURABLE AS IT GOES: one row per gate to knowledge/status/adoptsweep.log BEFORE any summary, so an interruption costs the remainder and not the run. nx_adoptsweep <max> [skip] exit: 0 all ACCEPTED | 1 at least one REFUSED/ERROR (tally still printed) | 2 usage 3 NO-CONCLUSION (census log or a ruler unresolvable) license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_artifact_root.nx nx_tool_run.nx nx_adoptsweep.nx

imports: nx_syscalls.nxnx_artifact_root.nxnx_tool_run.nx

imported by: nobody (leaf or entry point)

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

main as_puts sys_write sys_exit as_atoi 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 ↻ ar_resolve ar_resolve_with ar_exists sys_openat_rd sys_close sys_mmap ↻ ar_read sys_openat_rd ↻ sys_read sys_close ↻ ar_read ↻ tr_run_capture_to tr_run_capture_tr tr_run_capture_core tr_run_capture_core_owned tr_run_capture_core_eviden sys_mmap_shared tr_clock_ms sys_munmap sys_pipe2

structs

none

consts

26const AS_MAGIC_20000: i64 = 20000
27const AS_MAGIC_4096: i64 = 4096
28const AS_MAGIC_4095: i64 = 4095
30const AS_CENSUS: *u8 = "knowledge/status/drysweep.log"
31const AS_LOG: *u8 = "knowledge/status/adoptsweep.log"
32const AS_CAND: *u8 = "/tmp/adoptsweep_cand.nx"
33const AS_SRCCAP: i64 = 4194304
34const AS_OUTCAP: i64 = 65536
35const AS_TIMEOUT: i64 = 120000
36const AS_NAMECAP: i64 = 512

functions

38func as_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
39func as_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
40func as_n(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
51func as_has(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main
66func as_lastidx(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main
82func as_atoi(s: *u8) -> i64
called by 1: main
89func main(argc: i64, argv: *i64) -> i64