nx_smoke_harness.nx
buildroot/runtime/nx_smoke_harness.nx
about
nx_smoke_harness.nx -- adapter smoke-test runner.
module: nishi-core.ingest.smoke_harness
depends: nishi-core.ingest.synthetic_upstream,
nishi-core.ingest.source_adapter,
nishi-core.io.syscalls, nishi-core.io.iso8601
disk_kb: 5
capability: CORE_IO
license_tier: PUBLIC_NISHI_SUBSTRATE
genealogy_id: golang_testing_pattern + xunit_pattern_meyer_2003 +
aaa_pattern_arrange_act_assert +
nishi_build_the_system_cardinal_2026
Test-runner for NX-INGEST adapters. Per cardinal [[feedback-build-
the-system-not-manual-output]]: this is THE SYSTEM that proves
adapter correctness without manual catalog entry.
Each smoke case:
1. ARRANGE: load adapter + synthetic upstream + expected output
2. ACT: invoke adapter.fetch_and_canonicalize() with fixture
3. ASSERT: emitted JSONL matches expected canonical record
Per Cardinal 14 graceful-degradation: failed assertions don't
crash the harness — they emit DIAGNOSTIC events + continue with
next case. Aggregate report at end.
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_iso8601.nxnx_synthetic_upstream.nxnx_source_adapter.nx
imported by: nobody (leaf or entry point)
structs
| 66 | struct SmokeCase |
| 87 | struct SmokeRun |
consts
| 41 | const NX_SMOKE_PENDING: i64 = 1 |
| 42 | const NX_SMOKE_RUNNING: i64 = 2 |
| 43 | const NX_SMOKE_PASSED: i64 = 3 |
| 44 | const NX_SMOKE_FAILED: i64 = 4 |
| 45 | const NX_SMOKE_FIXTURE_MISSING: i64 = 5 |
| 46 | const NX_SMOKE_ADAPTER_CRASHED: i64 = 6 |
| 47 | const NX_SMOKE_TIMEOUT: i64 = 7 |
| 48 | const NX_SMOKE_SKIPPED: i64 = 8 |
| 83 | const NX_SMOKE_CASE_BYTES: i64 = 104 // 13 fields * 8 bytes |
| 100 | const NX_SMOKE_RUN_BYTES: i64 = 80 // 10 fields * 8 bytes |
| 104 | const NX_SMOKE_RUN_ALL_PASS: i64 = 1 |
| 105 | const NX_SMOKE_RUN_PARTIAL: i64 = 2 |
| 106 | const NX_SMOKE_RUN_ALL_FAIL: i64 = 3 |
| 107 | const NX_SMOKE_RUN_INFRASTRUCTURE_FAIL: i64 = 4 // can't even load fixtures |
| 159 | const NX_SMOKE_MAX_CASES: i64 = 1024 |
| 216 | const NX_SMOKE_DIFF_BUF_BYTES: i64 = 16384 |
functions
| 50 | func nx_smoke_state_name(s: i64) -> *u8 |
| 109 | func nx_smoke_run_verdict_name(v: i64) -> *u8 |
| 125 | func nx_smoke_run_case( called by 1: nx_smoke_run_cases |
| 161 | func nx_smoke_run_cases( |
| 218 | func nx_smoke_diff_jsonl( |