code wiki / (root) / nx_adversarial_pattern_audit_test.nx

nx_adversarial_pattern_audit_test.nx

buildroot/runtime/nx_adversarial_pattern_audit_test.nx

8100 B168 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic adversarial
docsdependenciesstructsconstsfunctions

about

nx_adversarial_pattern_audit_test.nx -- end-to-end smoke. Exercises: 1. nx_apa_count_substring on canned needle/haystack pairs (positive + negative + multi-match + edge cases) 2. nx_apa_scan_file_returns on three known runtime files via sys_read_file: a) runtime/nx_canary_value.nx (FULLY_WIRED, 0 STUB) b) runtime/nx_threat_model.nx (FULLY_WIRED, 0 STUB) c) runtime/nx_adversarial_pattern_audit.nx (self-scan; file MUST contain its own NX_APA_STUB_NOT_WIRED sealed-enum decl + verdict_name resolver) 3. nx_apa_judge_file_consistency on each scan -> CONSISTENT.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_adversarial_pattern_audit.nx nx_adversarial_pattern_audit_t

imports: nx_syscalls.nxnx_adversarial_pattern_audit.nx

imported by: nobody (leaf or entry point)

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

main test_count_substring sys_mmap nx_apa_count_substring sys_mmap ↻ make_path_canary scan_path sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_apa_scan_file_returns sys_mmap ↻ nx_apa_make_needle_stub nx_apa_count_substring ↻ nx_apa_make_needle_partial nx_apa_make_needle_fully nx_apa_make_needle_honest nx_apa_make_needle_funcdec nx_apa_make_needle_return_ nx_apa_judge_file_consiste make_path_threat make_path_apa

structs

none

consts

21const NX_TEST_NOW_UNIX: i64 = 1747436400

functions

25func test_count_substring() -> i64
called by 1: main calls 2: sys_mmapnx_apa_count_substring
71func make_path_canary(out: *u8)
called by 1: main
82func make_path_threat(out: *u8)
called by 1: main
93func make_path_apa(out: *u8)
called by 1: main
107func scan_path(path: *u8, path_len: i64) -> *ApaFileScanCounts
117func main() -> i64