This repository was archived by the owner on Jul 2, 2026. It is now read-only.
feat: port drivers to the #00 framework (nested API + owner capability)#9
Merged
Conversation
Bring the component drivers onto the plan #00 framework surface (DoD #1): the nested component API, the `phoxal-api` crate, and the L2 owner capability. - depend on the #00 framework via a pinned git bridge (until it is released to crates.io): `phoxal` and `phoxal-api` at framework rev e8c4ce8. Each crate adds `phoxal-api = { workspace = true }`. - import `use phoxal_api::y2026_1 as api;` (was `phoxal::api`). - nested contract types: `api::component::motor::Command`, `encoder::Sample`, `imu::Sample`, `accelerometer::Sample`, `gyroscope::Sample`, `camera::Frame` + `camera::Encoding`, `depth::Frame` + `depth::Encoding` + `depth::InvalidSamplePolicy`, `range::Sample` + `range::Limits`, `gnss::Sample` (no flat `api::component::<Name>` left). `SensorHealth` is now per-capability (`imu::SensorHealth`, `range::SensorHealth`). - a driver OWNS its component capabilities, so every topic is acquired through the L2 owner builder `api::topic::internal::new(cap).component(i).<kind>(c).<leaf>()` with `let cap = ctx.owner_capability();`. ddsm115 subscribes `motor::Command` (command role) and publishes `encoder::Sample` (state); sensor drivers publish their `*::sample` / `*::frame` (state). Green: cargo build/test/clippy -D warnings/fmt against the #00 framework.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Ports the 5 component drivers (bno085, ddsm115, oak_d_lite, vl53l1x, zed_f9p) onto the plan #00 framework surface — satisfying #00 DoD #1 (no flat component bus API remains).
How
phoxal+phoxal-apipinned at framework reve8c4ce8. Each crate addsphoxal-api.use phoxal_api::y2026_1 as api;(wasphoxal::api).motor::Command,encoder::Sample,imu::Sample,accelerometer::Sample,gyroscope::Sample,camera::Frame/Encoding,depth::Frame/Encoding/InvalidSamplePolicy,range::Sample/Limits,gnss::Sample. No flatapi::component::<Name>left.SensorHealthis now per-capability (imu::SensorHealth,range::SensorHealth).api::topic::internal::new(cap).component(i).<kind>(c).<leaf>()withlet cap = ctx.owner_capability();. ddsm115 subscribesmotor::Command(command role) + publishesencoder::Sample(state); sensors publish their*::sample/*::frame(state).Verification
Workflow (implement + independent verify), then codex cross-review (verdict: ok). Green:
cargo build/test/clippy -D warnings/fmt(11 tests pass). Both flat-signal greps +phoxal::apiare empty; handle directions match roles; per-capabilitySensorHealthand camera/depth/range field fidelity confirmed against the framework structs.Note
The git-bridge dep is a temporary bridge until the #00 framework is released to crates.io, at which point a 1-line switch pins the published version.
🤖 Generated with Claude Code