Skip to content

feat(p3): falcon rate controller P3 stream variant — first control-cascade engine (#168)#188

Merged
avrabe merged 1 commit into
mainfrom
feat/falcon-rate-p3-stream
Jun 15, 2026
Merged

feat(p3): falcon rate controller P3 stream variant — first control-cascade engine (#168)#188
avrabe merged 1 commit into
mainfrom
feat/falcon-rate-p3-stream

Conversation

@avrabe

@avrabe avrabe commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Extends streamification from the cFS engines (LC/SCH/HK/SC, done at v1.65) to the control cascade. The rate controller is the first flight-control engine as a P3 async stream — toward a composed flight-control stream pipeline (iekf→pos→att→rate→mixer).

De-risked approach

Built the proven cFS-stream way (rust_wasm_component_bindgen, wasi p3, deps on the verified :relay-rate Bazel library) rather than the cascade's finicky cargo-component path — with a self-contained WIT (falcon:rate-stream) that does NOT touch the shared, fragile cascade.wit. This collapses the risk to "known pattern, new dep + new types."

What's here

  • wit/falcon-rate-stream/rate_stream.wit: monitor: func(stream<rate-input>) -> stream<torque-setpoint>.
  • wasm/cm/rate/src/stream.rs: async stream transformer driving relay_rate::RatePid::tick (the verified body-rate PID; stateful PID + 1 kHz timestamp, exactly as the sync falcon-rate) — use relay_rate, not an inline copy.
  • //:falcon-rate-stream (wasi=p3) deps :relay-rate; built + exercised in CI (bazel.yml).
  • SWREQ-RELAY-STREAM-P05 -> FV-RELAY-STREAM-005, rivet PASS.

Verification note

The cascade build path is new territory (vs the four proven cFS streams), so the P3 build is CI-validated via the Component Model cascade job. API verified against relay-rate/plain (RatePid::new/tick([f32;3],[f32;3])->[f32;3]/Timestamp).

Falsification: wrong if //:falcon-rate-stream fails to build as a P3 component; if monitor() calls a method absent from relay_rate; or if a copy of the PID logic crept in instead of the :relay-rate dep.

🤖 Generated with Claude Code

…scade engine (#168, STREAM-P05)

Extends streamification from the cFS engines (LC/SCH/HK/SC) to the CONTROL
CASCADE. The rate controller is the first flight-control engine as a P3 async
stream, toward a composed flight-control stream pipeline (iekf->pos->att->rate
->mixer).

De-risked: built the proven cFS-stream way (rust_wasm_component_bindgen, wasi
p3, deps on the verified :relay-rate Bazel library) rather than the cascade's
cargo-component path, with a SELF-CONTAINED WIT (falcon:rate-stream) that does
not touch the shared, fragile cascade.wit.

- wit/falcon-rate-stream/rate_stream.wit: monitor: func(stream<rate-input>) ->
  stream<torque-setpoint>.
- wasm/cm/rate/src/stream.rs: async fn monitor over a StreamReader<RateInput>,
  driving relay_rate::RatePid::tick (the verified body-rate PID; stateful PID +
  1 kHz timestamp like the sync component) — use relay_rate, NOT an inline copy.
- BUILD.bazel: falcon_rate_stream_wit + //:falcon-rate-stream (wasi=p3) deps on
  :relay-rate.
- bazel.yml: builds //:falcon-rate-stream in CI (exercised, #168 lesson).
- SWREQ-RELAY-STREAM-P05 -> FV-RELAY-STREAM-005. rivet validate PASS.

New P3 direction (user-scoped) after the cFS streamification completed at v1.65.
The cascade build path is new territory, so the P3 build is CI-validated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@avrabe avrabe merged commit 20af5e2 into main Jun 15, 2026
29 checks passed
@avrabe avrabe deleted the feat/falcon-rate-p3-stream branch June 15, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant