code wiki / (root) / nx_claim_audit.nx

nx_claim_audit.nx

buildroot/runtime/nx_claim_audit.nx

10631 B255 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind librarytopic claim
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_wired_status.nx nx_claim_audit.nx nx_honesty_grader.nx

imports: nx_syscalls.nxnx_wired_status.nx

imported by: nx_honesty_grader.nx

structs

75struct ClaimAuditReport

consts

56const NX_CA_OK: i64 = 1
57const NX_CA_FILE_READ_FAIL: i64 = 2
58const NX_CA_HEADER_MALFORMED: i64 = 3
59const NX_CA_NO_FUNCTIONS_FOUND: i64 = 4
60const NX_CA_DRIFT_DETECTED: i64 = 5
61const NX_CA_STUB_NOT_WIRED: i64 = -7777 // self-audit: this file's STUB sentinel
93const NX_CLAIM_AUDIT_REPORT_BYTES: i64 = 112 // 14 fields * 8 bytes
245const NX_CLAIM_PRECOMMIT_PASS: i64 = 1
246const NX_CLAIM_PRECOMMIT_BLOCK: i64 = 2 // refuses commit
247const NX_CLAIM_PRECOMMIT_WARN: i64 = 3 // warns but allows commit

functions

63func nx_ca_verdict_name(v: i64) -> *u8
100func nx_claim_audit_file(
calls 1: sys_mmap
157func nx_claim_audit_aggregate(
calls 1: sys_mmap
229func nx_claim_verify_prose(
249func nx_claim_precommit_verdict(report: *ClaimAuditReport) -> i64