nx_provenance_curve_store.nx
buildroot/runtime/nx_provenance_curve_store.nx
about
nx_provenance_curve_store.nx -- versioned content-addressed curve storage.
module: nishi-core.perception.provenance_curve_store
depends: nishi-core.io.syscalls
disk_kb: 5
capability: PERCEPTION
wired_status: PARTIAL_WIRED
MISSING_CAPABILITIES:
- CONTENT_ADDRESSED_HASH (BLAKE2b hash of curve data; queued, depends
on nx_blake2b which is FULLY_WIRED — wire the call site)
- FS_PATH_RESOLUTION (curve store root + per-instrument subdirectory
layout convention)
- SERIALIZATION (JSONL or binary serialization of curve + metadata)
- VERSION_CHAIN (V1 → V2 → V3 of same instrument's calibration over
time, with parent-hash links per Merkle DAG)
- LICENSE_TAGGING (CC0 / CC-BY / family-private per
[[reference-ingest-citation-and-license-discipline]])
license_tier: PUBLIC_NISHI_SUBSTRATE
genealogy_id: feedback-substrate-primitives-meta-not-one-off_2026 +
feedback-end-to-end-bit-traceability-architecture +
reference-ingest-citation-and-license-discipline +
merkle_1979_dag_addressing +
git_2005_content_addressable
Per cardinal [[feedback-substrate-primitives-meta-not-one-off]]:
THIS primitive stores ANY measured curve from ANY transducer or
calibration session. Versioned per-instance, content-addressed for
integrity, with provenance chain back to source samples.
Reuse set served by this single primitive:
- DAC bit-accuracy + THD curves (per-DAC-serial)
- Amplifier FRF + THD-vs-power curves (per-amp-serial)
- Speaker FRF (per-driver-build, especially DIY where each build differs)
- Microphone calibration curves (per-mic-serial)
- Display gamma + gamut curves (per-display-serial)
- Camera response curves (per-sensor-serial)
- Haptic motor force curves
- Hydrophone pressure response
dependencies 1 imports · 7 importers
imports: nx_syscalls.nx
imported by: nx_assembly_guide.nxnx_calibration_drift_monitor.nxnx_chemical_dispenser.nxnx_external_reach_probe.nxnx_instrument_diagnostician.nxnx_perceptual_dataset.nxnx_video_pose_coder.nx
structs
| none |
consts
| 58 | const NX_CURVE_DOMAIN_TEMPORAL_AUDIO: i64 = 1 |
| 59 | const NX_CURVE_DOMAIN_TEMPORAL_VIBRATION: i64 = 2 |
| 60 | const NX_CURVE_DOMAIN_TEMPORAL_SCALAR: i64 = 3 |
| 61 | const NX_CURVE_DOMAIN_TEMPORAL_MULTICHANNEL: i64 = 4 |
| 62 | const NX_CURVE_DOMAIN_SPATIAL_VISUAL: i64 = 5 |
| 63 | const NX_CURVE_DOMAIN_SPATIO_TEMPORAL_VIDEO: i64 = 6 |
| 81 | const NX_CURVE_TYPE_FRF: i64 = 1 // frequency response (mag + phase) |
| 82 | const NX_CURVE_TYPE_THD: i64 = 2 // THD vs frequency at SPL |
| 83 | const NX_CURVE_TYPE_THD_VS_LEVEL: i64 = 3 // THD vs output level at frequency |
| 84 | const NX_CURVE_TYPE_STEP_RESPONSE: i64 = 4 // time-domain step response |
| 85 | const NX_CURVE_TYPE_IMPULSE_RESPONSE: i64 = 5 // h(t) |
| 86 | const NX_CURVE_TYPE_OFF_AXIS_RESPONSE: i64 = 6 // FRF at multiple angles |
| 87 | const NX_CURVE_TYPE_GAMMA_1D: i64 = 7 // visual: per-channel gamma |
| 88 | const NX_CURVE_TYPE_GAMUT_3D: i64 = 8 // visual: color gamut volume |
| 89 | const NX_CURVE_TYPE_LINEARITY: i64 = 9 // sensor input-output mapping |
| 90 | const NX_CURVE_TYPE_TEMPERATURE_DRIFT: i64 = 10 // sensor response vs temperature |
| 91 | const NX_CURVE_TYPE_AGING_DRIFT: i64 = 11 // response vs time-since-calibration |
| 92 | const NX_CURVE_TYPE_DISPENSE_PROFILE: i64 = 12 // chemical: cartridge dispense rate |
| 112 | const NX_CURVE_STORE_OK: i64 = 0 |
| 113 | const NX_CURVE_STORE_FAIL_PATH: i64 = 1 // FS path resolution failed |
| 114 | const NX_CURVE_STORE_FAIL_HASH_MISMATCH: i64 = 2 // content-address verification failed |
| 115 | const NX_CURVE_STORE_FAIL_LICENSE_MISSING: i64 = 3 // no license tag, refused |
| 116 | const NX_CURVE_STORE_FAIL_PROVENANCE_BROKEN: i64 = 4 // parent-hash chain incomplete |
| 117 | const NX_CURVE_STORE_FAIL_DEPENDENCY_MISSING: i64 = 5 // PARTIAL_WIRED default |
functions
| 65 | func nx_curve_domain_name(d: i64) -> *u8 |
| 94 | func nx_curve_type_name(t: i64) -> *u8 |
| 119 | func nx_curve_store_verdict_name(v: i64) -> *u8 |
| 136 | func nx_curve_store_write(instrument_serial_ptr: *u8, instrument_serial_len: i64, |
| 155 | func nx_curve_store_read(instrument_serial_ptr: *u8, instrument_serial_len: i64, |
| 170 | func nx_curve_store_read_by_hash(curve_hash_ptr: *u8, curve_hash_len: i64, |
| 179 | func nx_curve_store_get_last_verdict() -> i64 |
| 187 | func nx_curve_store_get_age_days(instrument_serial_ptr: *u8, instrument_serial_len: i64, |