code wiki / (root) / nx_buildecho.nx

nx_buildecho.nx

buildroot/runtime/nx_buildecho.nx

4809 B108 linesdepth 2pulls 2 transitivereach 30 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_buildecho.nx -- READ WHAT THE BUILDER SAID IT COMPILED (2026-08-07). Extracted from nx_mgmt_api's ma_do_build so the cross-target guard can be BITE-TESTED. It was written inline inside a 296KB daemon that binds a port and needs a live estate, which made the one piece of logic standing between "wrong organ promoted under the right name" and "refused" the piece nobody could exercise. *A GUARD BURIED IN A DAEMON IS A GUARD THAT ONLY GETS TESTED IN PRODUCTION.* WHAT IT PARSES -- the builder's own echo, the ONLY witness to what was actually compiled: [hostctl] buildrun: compile 'nx_seg_store_gate' on the NAS (nx_cc -> nxasm) WHY THE ECHO AND NOT THE OBVIOUS FIELDS (all three measured 2026-08-07): expect_sha256 -- proves the staged bytes are the ones just built. When the WRONG source was compiled that digest IS the wrong binary's digest, so promote installs it and says PROMOTED. A GUARD THAT CHECKS THE ARTIFACT AGAINST THE BUILD CANNOT TELL YOU THE BUILD WAS OF THE WRONG THING. src_path -- ma_gate_src DERIVES it from the REQUESTED name, so it agrees BY CONSTRUCTION whatever the compiler read. A FIELD COMPUTED FROM THE QUESTION CANNOT CORROBORATE THE ANSWER. ABSENCE IS NOT A MISMATCH. A capture without the marker returns 0 and the caller proceeds exactly as before. *A GUARD THAT CANNOT SEE ITS EVIDENCE MUST ABSTAIN, NEVER ACCUSE* -- turning "I could not look" into "it is wrong" would break every build the day the echo format changes. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 1 imports · 8 importers

nx_syscalls.nx nx_buildecho.nx nx_buildecho_gate.nx nx_mgmt_api.nx nx_mgmt_api.pre-toolchain-20260910 nx_mgmt_api_search_candidate_t330. nx_mgmt_api_toolchain_session_2026 nx_mgmt_cap_candidate_t186.nx nx_mgmt_deploy_candidate_t185.nx nx_provcheck.nx

imports: nx_syscalls.nx

imported by: nx_buildecho_gate.nxnx_mgmt_api.nxnx_mgmt_api.pre-toolchain-20260910.nxnx_mgmt_api_search_candidate_t330.nxnx_mgmt_api_toolchain_session_20260910.nxnx_mgmt_cap_candidate_t186.nxnx_mgmt_deploy_candidate_t185.nxnx_provcheck.nx

structs

none

consts

27const BE_NAMEMAX: i64 = 250

functions

33func be_compiled_name(buf: *u8, n: i64, out: *u8) -> i64
called by 2: be_echo_matchesmain
64func be_after_hex(buf: *u8, n: i64, key: *u8, out: *u8) -> i64
95func be_echo_matches(buf: *u8, n: i64, want: *u8) -> i64
called by 1: main calls 2: sys_mmapbe_compiled_name