code wiki / (root) / nx_provenance_curve_store.nx

nx_provenance_curve_store.nx

buildroot/runtime/nx_provenance_curve_store.nx

9749 B193 linesdepth 2pulls 2 transitivereach 14 importersview sourcekind librarytopic provenance
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_provenance_curve_store.nx nx_assembly_guide.nx nx_calibration_drift_monitor.nx nx_chemical_dispenser.nx nx_external_reach_probe.nx nx_instrument_diagnostician.nx nx_perceptual_dataset.nx nx_video_pose_coder.nx

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

58const NX_CURVE_DOMAIN_TEMPORAL_AUDIO: i64 = 1
59const NX_CURVE_DOMAIN_TEMPORAL_VIBRATION: i64 = 2
60const NX_CURVE_DOMAIN_TEMPORAL_SCALAR: i64 = 3
61const NX_CURVE_DOMAIN_TEMPORAL_MULTICHANNEL: i64 = 4
62const NX_CURVE_DOMAIN_SPATIAL_VISUAL: i64 = 5
63const NX_CURVE_DOMAIN_SPATIO_TEMPORAL_VIDEO: i64 = 6
81const NX_CURVE_TYPE_FRF: i64 = 1 // frequency response (mag + phase)
82const NX_CURVE_TYPE_THD: i64 = 2 // THD vs frequency at SPL
83const NX_CURVE_TYPE_THD_VS_LEVEL: i64 = 3 // THD vs output level at frequency
84const NX_CURVE_TYPE_STEP_RESPONSE: i64 = 4 // time-domain step response
85const NX_CURVE_TYPE_IMPULSE_RESPONSE: i64 = 5 // h(t)
86const NX_CURVE_TYPE_OFF_AXIS_RESPONSE: i64 = 6 // FRF at multiple angles
87const NX_CURVE_TYPE_GAMMA_1D: i64 = 7 // visual: per-channel gamma
88const NX_CURVE_TYPE_GAMUT_3D: i64 = 8 // visual: color gamut volume
89const NX_CURVE_TYPE_LINEARITY: i64 = 9 // sensor input-output mapping
90const NX_CURVE_TYPE_TEMPERATURE_DRIFT: i64 = 10 // sensor response vs temperature
91const NX_CURVE_TYPE_AGING_DRIFT: i64 = 11 // response vs time-since-calibration
92const NX_CURVE_TYPE_DISPENSE_PROFILE: i64 = 12 // chemical: cartridge dispense rate
112const NX_CURVE_STORE_OK: i64 = 0
113const NX_CURVE_STORE_FAIL_PATH: i64 = 1 // FS path resolution failed
114const NX_CURVE_STORE_FAIL_HASH_MISMATCH: i64 = 2 // content-address verification failed
115const NX_CURVE_STORE_FAIL_LICENSE_MISSING: i64 = 3 // no license tag, refused
116const NX_CURVE_STORE_FAIL_PROVENANCE_BROKEN: i64 = 4 // parent-hash chain incomplete
117const NX_CURVE_STORE_FAIL_DEPENDENCY_MISSING: i64 = 5 // PARTIAL_WIRED default

functions

65func nx_curve_domain_name(d: i64) -> *u8
94func nx_curve_type_name(t: i64) -> *u8
119func nx_curve_store_verdict_name(v: i64) -> *u8
136func nx_curve_store_write(instrument_serial_ptr: *u8, instrument_serial_len: i64,
155func nx_curve_store_read(instrument_serial_ptr: *u8, instrument_serial_len: i64,
170func nx_curve_store_read_by_hash(curve_hash_ptr: *u8, curve_hash_len: i64,
179func nx_curve_store_get_last_verdict() -> i64
187func nx_curve_store_get_age_days(instrument_serial_ptr: *u8, instrument_serial_len: i64,