nx_claim_audit.nx
buildroot/runtime/nx_claim_audit.nx
about
nx_claim_audit.nx -- substrate scanner verifying claim-vs-implementation.
module: nishi-core.audit.claim_audit
depends: nishi-core.audit.wired_status, nishi-core.io.syscalls,
nishi-core.io.csv
disk_kb: 5
capability: CORE_IO
wired_status: PARTIAL_WIRED
(Honest: this file's substrate STRUCTURE is wired; the actual file-
system-walking implementation depends on nx_dir which is queued.
I'm marking PARTIAL_WIRED not FULLY_WIRED accordingly.)
license_tier: PUBLIC_NISHI_SUBSTRATE
genealogy_id: nishi_no_false_ok_cardinal_2026 +
software_engineering_static_analysis +
type_state_implementation_pattern
Per cardinal [[feedback-no-false-ok-substrate-honesty-audit]]:
substrate scanner reads every `.nx` file's module header + function
bodies; compares CLAIMS to IMPLEMENTATION presence; flags
discrepancies.
===== Audit algorithm ============================================
1. For each .nx file in the substrate:
a. Parse the module header comment block — extract:
module / depends / disk_kb / capability / wired_status
b. If wired_status missing → CLAIM_HEADER_MISSING
c. Walk function bodies — count:
- lines of code (non-comment, non-empty)
- functions
- stub-return statements (NX_STUB_* + uninitialized verdict)
d. Infer wired_status from body:
- if every function returns STUB → HONEST_STUB
- if some return STUB, some return real verdicts → PARTIAL_WIRED
- if no STUB returns + has substantive function bodies → FULLY_WIRED candidate
- if all functions are body-less → DECLARED_ONLY
e. Compare declared vs inferred:
- declared FULLY_WIRED but inferred HONEST_STUB → CLAIM_IMPL_DOESNT_MATCH
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_wired_status.nx
imported by: nx_honesty_grader.nx
structs
| 75 | struct ClaimAuditReport |
consts
| 56 | const NX_CA_OK: i64 = 1 |
| 57 | const NX_CA_FILE_READ_FAIL: i64 = 2 |
| 58 | const NX_CA_HEADER_MALFORMED: i64 = 3 |
| 59 | const NX_CA_NO_FUNCTIONS_FOUND: i64 = 4 |
| 60 | const NX_CA_DRIFT_DETECTED: i64 = 5 |
| 61 | const NX_CA_STUB_NOT_WIRED: i64 = -7777 // self-audit: this file's STUB sentinel |
| 93 | const NX_CLAIM_AUDIT_REPORT_BYTES: i64 = 112 // 14 fields * 8 bytes |
| 245 | const NX_CLAIM_PRECOMMIT_PASS: i64 = 1 |
| 246 | const NX_CLAIM_PRECOMMIT_BLOCK: i64 = 2 // refuses commit |
| 247 | const NX_CLAIM_PRECOMMIT_WARN: i64 = 3 // warns but allows commit |
functions
| 63 | func nx_ca_verdict_name(v: i64) -> *u8 |
| 100 | func nx_claim_audit_file( calls 1: sys_mmap |
| 157 | func nx_claim_audit_aggregate( calls 1: sys_mmap |
| 229 | func nx_claim_verify_prose( calls 1: nx_wired_max_claimable_verb |
| 249 | func nx_claim_precommit_verdict(report: *ClaimAuditReport) -> i64 |