interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / docs / dual / DUAL_RECORDS.md

33 lines · 4607 bytes Raw Blame History Source

DUAL records (DUAL-0a), ADR 0031 / ARCH-0031

Standalone module src/dual/ (mk/dual.mk, targets test-dual-types, dual-purity, test-dual; not in all or test; nothing under src/runtime/ includes it). DUAL is scarcity information. It never authorizes, promotes or decides validity.

Records and kind bytes (format version 1)

KindByteDomainFields (canonical little-endian order)
resource1omega.dual.resource.v1u32 resource_id, u32 unit, f64 scale, dig contract
constraint2omega.dual.constraint.v1u32 resource_id, u32 unit, u32 class, f64 budget, dig budget_contract, dig observation_ref, dig estimate_ref, u32 estimate_kind, f64 estimate, f64 uncertainty, dig calibration_ref, f64 lambda, u32 lambda_state, dig controller_id, u64 generation, u64 tick, dig evidence_root, dig parent
controller3omega.dual.controller.v1f64 eta, f64 rho, f64 k_sigma, u64 max_age, u64 cadence, u32 n, n x (u32 resource_id, f64 lambda_max)
price vector4omega.dual.pricevec.v1u64 generation, dig context, u32 n, n x (u32 resource_id, dig state)
recommendation5omega.dual.recommendation.v1dig decision_site, dig price_vector, u64 generation, u32 n_candidates, n x dig, u32 actual, u32 recommended, u32 n_consequences, n x (u32 resource_id, u32 unit, f64 predicted, f64 predicted_sd, u32 has_measured, f64 measured, f64 error), u32 authority (= 0)
outcome6omega.dual.outcome.v1dig recommendation, dig before_vector, dig after_vector, u32 target_resource_id, u64 generation_before, u64 generation_after, f64 lambda_before, f64 lambda_after
site7omega.dual.site.v1u32 site_id, 32 bytes name (printable ASCII, NUL padded), dig owner, u32 max_alternatives
trace8omega.dual.trace.v1u32 trace_kind, u64 seed, u32 n_ticks, n x (u64 generation, f64 estimate, f64 uncertainty, u32 calibrated, u32 evidence_verified, u32 regime_change) (DUAL-1b; replay digest domain omega.dual.replay.v1 over controller_id, trace digest, u32 n, n state digests)

Every encoding starts with u8 kind, u8 version. Doubles are IEEE-754 binary64 bits; -0.0 is written as +0.0; NaN and Inf are refused before encoding. Digest = SHA-256(domain || 0x00 || encoding). Decoders refuse a wrong kind byte, a wrong version, truncation and trailing bytes, then run the same validation as the constructor. No wall-clock value is part of any identity.

Rules enforced by rx_dual_check_* (ADR 0031 section 3 and 4)

Status: DUAL-0a, DUAL-0b (rx_dual_bind.h: binding to est_* records, evidence verification, FRESH/STALE/FROZEN/UNCALIBRATED/REFUSED), DUAL-1a (rx_dual_update.h: reference update) and DUAL-1b (rx_dual_replay.h: digest-bound traces, kind byte 8 omega.dual.trace.v1, deterministic replay with replay digest omega.dual.replay.v1, perf-CSV import; target test-dual-replay) IMPLEMENTED; DUAL_CONSTRAINT_CONTRACT = PASS on host (evidence/DUAL/0b-1a-binding-controller); DUAL_PRICE_REFERENCE = PASS on host over 12 synthetic scenarios and 6 recorded R15 counter traces with a pre-registered negative control (evidence/DUAL/1b-replay). Every replayed price is UNCALIBRATED (EST-3 has not passed for any signal): no price may influence production. Next: DUAL-2 (Pareto integration) needs EST-5 and EST-7.