code wiki / _hdl_build / nx_adoptsweep.nx
nx_adoptsweep.nx
buildroot/runtime/_hdl_build/nx_adoptsweep.nx
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
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
structs
| none |
consts
| 26 | const AS_MAGIC_20000: i64 = 20000 |
| 27 | const AS_MAGIC_4096: i64 = 4096 |
| 28 | const AS_MAGIC_4095: i64 = 4095 |
| 30 | const AS_CENSUS: *u8 = "knowledge/status/drysweep.log" |
| 31 | const AS_LOG: *u8 = "knowledge/status/adoptsweep.log" |
| 32 | const AS_CAND: *u8 = "/tmp/adoptsweep_cand.nx" |
| 33 | const AS_SRCCAP: i64 = 4194304 |
| 34 | const AS_OUTCAP: i64 = 65536 |
| 35 | const AS_TIMEOUT: i64 = 120000 |
| 36 | const AS_NAMECAP: i64 = 512 |
functions
| 38 | func 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 } |
| 39 | func 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 } |
| 40 | func as_n(fd: i64, v: i64) -> i64 |
| 51 | func as_has(buf: *u8, n: i64, pat: *u8) -> i64 called by 1: main |
| 66 | func as_lastidx(buf: *u8, n: i64, pat: *u8) -> i64 called by 1: main |
| 82 | func as_atoi(s: *u8) -> i64 called by 1: main |
| 89 | func main(argc: i64, argv: *i64) -> i64 |