0.2.0 Matter Bridge: scaffold + cluster mapping + hub --matter wiring#27
Merged
Conversation
…ring
Lands the *interface* for SWARCH-WOHL-006 (CCSDS sensors + hub as Matter
Bridge) without pulling in rs-matter. The verified sensor line stays
untouched; the unverified Matter stack remains explicitly hub-side.
- New crate `crates/wohl-matter-bridge` (no rs-matter dep):
* `MatterBridge` trait — the contract wohl-hub calls.
* Typed `MatterCluster` / `MatterAttribute` enums + exhaustive
`mapping_for_alert` / `mapping_for_reading` tables (19 unit tests
pinning every cluster id to Matter App-Cluster-Spec 1.3 values).
* `LoggingBridge` stderr stub for end-to-end wiring validation.
- wohl-hub: optional Matter bridge field + `--matter` flag (or
`WOHL_MATTER=1`). Default off — wohl-hub behaves identically to 0.1.0
when the flag is unset. 2 new tests cover both states.
- `DESIGN.md`: rationale for scaffold-first, cluster decisions,
rs-matter target version, commissioning approach (`/var/lib/wohl/matter/`),
multi-admin behavior, attestation cert path, 3 open questions for 0.3.0.
- `WORKSPACE_INTEGRATION.md`: exact root Cargo.toml edits the
orchestrator needs to apply (workspace member + workspace.dependency).
Verification (Rust 1.85.0): fmt --check clean, clippy --all-targets
-D warnings clean, 19/19 wohl-matter-bridge tests pass, 30/30 wohl-hub
tests pass (including the 2 new bridge-wiring tests). wohl-alert tests
re-run to confirm verified core untouched.
Refs SWARCH-WOHL-006.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the new crate as a workspace member and registers it under [workspace.dependencies] so wohl-hub can use the `.workspace = true` form (matching every other intra-workspace dep). The scaffold commit intentionally left this orchestration-layer edit out so the scaffold itself stayed reviewable on its own. Verified: cargo +1.85.0 fmt --check cargo +1.85.0 clippy --workspace --all-targets -- -D warnings cargo +1.85.0 test -p wohl-matter-bridge -p wohl-hub cargo +1.85.0 check --workspace Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
wohl-matter-bridgelays the scaffold for the Matter integration decided inSWARCH-WOHL-006: CCSDS sensors + the hub as a Matter Bridge.MatterBridgetrait + cluster mapping table; shipsLoggingBridgeas the only impl in 0.2.0.wohl-hub --matter(orWOHL_MATTER=1) routes alerts + readings through the bridge alongside the existing stdout JSON. Default off — wohl-hub behaves identically to 0.1.0 when not set.wohl-{leak,temp,air,door,power,alert,ota},wohl-fw-door-bench). The Kani-verified line and Verus proofs are untouched.What this PR is NOT
rs-matterdependency. No mDNS / UDP / Matter wire bytes. No commissioning. Those are 0.3.0 scope, behind a futurers-matter-backendfeature gate.crates/wohl-matter-bridge/DESIGN.mdcaptures the open questions for the 0.3.0 implementor.Cluster mapping (enum-encoded)
Verified locally
cargo +1.85.0 fmt --checkcargo +1.85.0 clippy --workspace --all-targets -- -D warningscargo +1.85.0 test -p wohl-matter-bridge(all green)cargo +1.85.0 test -p wohl-hub(bridge off: identical 0.1.0 behavior; with--matter: bridge receives readings + alerts)cargo +1.85.0 check --workspaceOpen questions for 0.3.0 (from DESIGN.md §7)
Test plan
🤖 Generated with Claude Code