feature: WIT-type the inter-core contract — NavState (16×f32) + ActuatorCmd (4×f32) records (REQ-PIX-007) - #164
Merged
Merged
Conversation
…torCmd (4xf32) records (REQ-PIX-007 typed-contract half; AFD-036 resolved)
Closes REQ-PIX-007's WIT-TYPED-CONTRACT half (the byte-exact crossing was proven in
TEST-PIX-030 last tick; this adds the typed record). The spar maintainer answered
spar#345 and split it honestly: the data-IMPLEMENTATION record path already works on
the CI-pinned spar v0.24.0 — my last-tick "spar emits list<u8> for all data" was a
MODELING ERROR (I bound the port to the BARE type, not the implementation).
Fix (feature-loop: architecture -> spar -> WIT):
- hardware/pixhawk6x-rt.aadl: add a local `data F32` (Data_Size 4 Bytes, Float),
VehicleState.nav (16 f32 IEKF fields: quat/pos/vel/gyro-bias/accel-bias) +
ActuatorCmd.pwm (4 f32 per-motor); bind the 4 inter-core ports to the IMPLEMENTATIONS.
- wit/ regenerated via spar v0.24.0 (the CI pin): falcon/estimator/failsafe.wit now carry
`record vehicle-state-nav {qw..baz: f32}` + `record actuator-cmd-pwm {m0..m3: f32}`
instead of opaque list<u8>. The TEST-PIX-023 WIT-derivation gate passes (committed wit/
== spar codegen).
- AFD-036 -> resolved (records were always available — my modeling error; the separate
Data_Representation=>Array gap was fixed upstream in spar PR#346, not needed here).
- TEST-PIX-030 note: WIT-typing DONE; REQ-PIX-007 now has both crossing + typed contract.
Verified: rivet validate PASS; spar parse + instance OK; WIT-derivation gate OK.
RELEASE-WATCH (same tick): kiln v0.4.4 (resource_limits, SR-45) + spar v0.31.0 - neither
jess-critical; falcon still v1.127 / 14 skips (AFD-035); no inbound.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes REQ-PIX-007's WIT-typed-contract half. The byte-exact NavState crossing was proven last tick (TEST-PIX-030); this adds the typed record so the inter-core ABI reflects the real 64 B payload, not opaque
list<u8>.The spar#345 resolution (honest correction)
The spar maintainer answered spar#345 and split it cleanly:
REQ-CODEGEN-WIT-RECORDS-001). My last-tick "spar emitslist<u8>for all data" was a modeling error — I bound the port to the bare type (out data port VehicleState) while the subcomponents lived on the implementation (VehicleState.nav).Data_Representation=>Arraygap was real and the maintainer fixed it upstream (spar PR#346 →list<f32, 16>); jess doesn't need it — the record path is cleaner.The feature (architecture → spar → WIT)
hardware/pixhawk6x-rt.aadl: a localdata F32(Data_Size => 4 Bytes,Data_Representation => Float),VehicleState.nav(16 f32 IEKF fields),ActuatorCmd.pwm(4 f32 per-motor); the 4 inter-core ports bound to the implementations.wit/regenerated via spar v0.24.0 →record vehicle-state-nav { qw..baz: f32 }+record actuator-cmd-pwm { m0..m3: f32 }. The TEST-PIX-023 WIT-derivation gate passes (committed wit/ == spar codegen).Verification
rivet validate→ PASSspar parse+instance→ OKregen.sh --check, spar v0.24.0) → OKRelease-watch (same tick)
kiln v0.4.4 (resource_limits, SR-45) + spar v0.31.0 — neither jess-critical; falcon still v1.127 / 14 skips (AFD-035); no inbound.
🤖 Generated with Claude Code