code wiki / _hdl_build / nx_evoracle_attest.nx

nx_evoracle_attest.nx

buildroot/runtime/_hdl_build/nx_evoracle_attest.nx

9970 B220 linesdepth 2pulls 4 transitivereach 0 importersview sourcekind tooltopic evoracle
docsdependenciesstructsconstsfunctions

about

nx_evoracle_attest.nx -- THE ORACLE PRODUCER. The missing writer that makes an oracle attestation a DERIVED FACT instead of hand-typed prose. WHY THIS ORGAN EXISTS (measured 2026-07-31): EV_CLASS_ORACLE had exactly ONE consumer (nx_sota_status.nx:220) and NO producer. The only way an oracle row could ever exist was for an agent to type `class=oracle ref=RFC7748` into a conf file -- having compared absolutely nothing. A class whose only writer is prose is not evidence, it is a claim wearing evidence's clothes. WHAT "DERIVED" MEANS HERE, MECHANICALLY. This organ refuses to emit a row unless it has itself just: 1 READ the subject source and classified its party-ness with nx_evoracle -- and got THIRD. A first-party subject is REFUSED. Its answers are ours; agreement with ourselves is not independence. 2 EXTRACTED the external authority actually named in that source, so ref= is a QUOTE, not a label. 3 HASHED the exact bytes it classified (sha256) -> refdig=. Prose can CLAIM RFC 7748; a digest commits to the bytes. If the vectors are later edited, the digest moves and the old row stops matching. 4 FORKED AND RUN the gate binary and required exit 0. ★A GREEN GATE IS THE ONLY THING THAT LICENSES THE WORD "pass". An attestation written without running anything is the exact defect this whole workstream was opened to delete. Any step failing is a REFUSAL with a named reason, never a downgraded row: a partially-earned oracle row looks like proof while being unverifiable, which is strictly worse than no row. ⚠⚠HONESTY BOUNDARY, STATED IN THE ORGAN SO IT CANNOT BE MISREAD AS WORKING: THE ROW THIS EMITS IS UNSIGNED, AND at_verify_row WILL REFUSE IT. That is correct and deliberate. knowledge/attest_keys.conf is ABSENT, and nx_fs_write DENIES paths matching `key` -- a load-bearing refusal, because an agent that can write the signer registry can register its own key as role=human and certify its own work. This organ does NOT route around that. It produces the DERIVATION; a registered key must supply the ATTRIBUTION. Emitting an unsigned row that is visibly refused is the honest end state for an agent; silently minting a key to make the number move would be the dishonest one. ⚠ALSO MEASURED: nx_evattest.nx defines MECH|LLM|HUMAN and has NO AT_CLASS_ORACLE. Oracle rows are permitted there only by FALL-THROUGH (the role rules constrain HUMAN and LLM and never mention oracle). Permitted by omission is not permitted by declaration -- a future default-deny would silently kill the class, and the loader and the verifier currently disagree about the vocabulary. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_sha256_wasm.nx nx_evoracle.nx nx_evoracle_attest.nx

imports: nx_syscalls.nxnx_sha256_wasm.nxnx_evoracle.nx

imported by: nobody (leaf or entry point)

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

main 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 ↻ w sys_write ↻ attest w ↻ sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close evo_classify evo_self_oracle evo_has evo_find evo_starts evo_cites_spec evo_has ↻ evo_cites_refimpl evo_has ↻ extract_ref evo_find ↻ nx_sha256_one_shot

structs

none

consts

36const K_MAGIC_1024: i64 = 1024

functions

38func w(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 3: nnattestmain calls 1: sys_write
39func wb(b: *u8, n: i64) -> i64 { sys_write(1, b, n); return 0 }
called by 1: attest calls 1: sys_write
41func nn(v: i64) -> i64
called by 2: attestmain calls 3: wsys_mmapsys_write
55func hexnib(v: i64) -> i64 { if v < 10 { return 48 + v } return 87 + v }
called by 1: attest
60func extract_ref(b: *u8, n: i64, out: *u8, cap: i64) -> i64
called by 1: attest calls 1: evo_find
106func run_gate(elf: *u8) -> i64
128func attest(c: *i64, src: *u8, elf: *u8, scope: *u8, signer: *u8) -> i64
194func main() -> i64