nx_contentdiff.nx
buildroot/runtime/nx_contentdiff.nx
about
nx_contentdiff.nx -- THE PROMOTE RULER. Answers one question: does the candidate binary still contain
everything the LIVE binary contains?
WHY (debts 1785452162, 1785526315, 1785526809): the ecosystem has ~703 deployed organs awaiting a
rebuild, and the gate guarding that queue was BYTE SIZE. Size is uninformative IN BOTH DIRECTIONS,
proven twice by measurement:
SHRINK is not regression -- 16 live organs had LARGER .prev files, yet the smaller live binaries
were string SUPERSETS (lost_from_live=0). Restoring the bigger ones would have BEEN the regression.
GROWTH is not improvement -- nx_law_warden rebuilt GREW 161951 -> 186696 bytes while losing three
whole detectors (laws_measured 11 -> 8, enforced_permil 1000 -> 727).
A gate keyed on bytes is therefore wrong about half the time and cannot tell you which half.
THE RULER: printable content. Every printable run of >= CD_MINLEN bytes in the LIVE binary must still
be findable somewhere in the candidate. Anything missing is capability the rebuild would DESTROY.
Searching the candidate's RAW BYTES (not a re-extracted string set) is deliberate and stricter: a
string that survived but got tokenized differently still counts as present, so a MISS is a real miss.
FAIL-CLOSED: unreadable input is RED, never "clean". Verdict GREEN iff lost_from_live == 0.
NOT DEDUPED, and it says so in the output: runs are counted as encountered, so the counts are
occurrence counts and lost>0 is the signal -- declaring that beats a silent, prettier number.
nx_contentdiff <live-elf> <candidate-elf>
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.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
| 28 | const CD_CAP: i64 = 4194304 |
| 29 | const CD_MINLEN: i64 = 6 |
| 30 | const CD_PRINT_LO: i64 = 32 |
| 31 | const CD_PRINT_HI: i64 = 126 |
| 32 | const CD_SHOW: i64 = 8 |
| 33 | const CD_WORD: i64 = 8 |
| 34 | const CD_SLOTS: i64 = 8 |
| 35 | const CD_S_RUNS: i64 = 0 |
| 36 | const CD_S_LOST: i64 = 1 |
| 37 | const CD_S_SHOWN: i64 = 2 |
functions
| 39 | func cd_slurp(path: *u8, buf: *u8, cap: i64) -> i64 |
| 53 | func cd_is_print(c: i64) -> i64 called by 1: main |
| 60 | func cd_contains(hay: *u8, hn: i64, ndl: *u8, ns: i64, nl: i64) -> i64 called by 1: main |
| 76 | func main(argc: i64, argv: *i64) -> i64 |