Skip to content

docs(054): make the connector-boundary design ready for implementation - #274

Merged
lxsaah merged 2 commits into
mainfrom
docs/054-implementation-ready
Oct 3, 2026
Merged

lxsaah merged 2 commits into
mainfrom
docs/054-implementation-ready

Conversation

@lxsaah

@lxsaah lxsaah commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Description

Checks design 054 (zero-allocation connector boundary) against the tree at 137ad2d and fills the gaps that would have blocked implementation. Doc-only change.

Fixes and additions

  • Ready set is lock-free (§4.2). The prototype's spin-locked VecDeque is taken inside route wakers. A producer on an Embassy InterruptExecutor (049) that preempts the transport task while it holds the lock would deadlock a single core. Replaced with a bitmap of AtomicU32s plus futures_util::task::AtomicWaker (both already core dependencies), cleared before each poll and served round-robin. The fairness tests are unchanged, and §6 step 2 re-confirms the timings, which the prototype only measured for the FIFO.
  • Removed API spelled out: the Serialized* types, RecvSerializedFuture, and collect_outbound_routes/OutboundRoute (now crate-private). Adds Send/Sync bounds for OutboundRoutes/InboundDispatch, and keeps ConnectorConfig/PublishError.
  • New §4.8, session clients: pump_client (UDS, TCP, serial, WebSocket client) gets one outbound task over OutboundRoutes and takes InboundDispatch.
  • New §4.9, KNX: Channels, TelegramChannel, CommandChannel, DEFAULT_QUEUE and N are removed, which is a second user-facing break (KnxConnector::new). The connection task dispatches and pulls directly.
  • Embedded write ring (§4.7): defaults to 4,096 B, configurable with with_write_buffer. The new PUBLISH size cap (1,984 B) is documented as a behaviour change. thumbv6m is resolved as an unsupported target.
  • Config parsing (§4.4): an MQTT qos/retain value that doesn't parse now fails the build instead of silently falling back to the default.
  • CI gate (§5): a make bench-gate target and CI job, plus aimdb-mqtt-connector/tests/alloc_round_trip.rs asserting embedded = 0 and native ≤ 11 allocations per round trip.
  • Migration (§6): complete per-crate file/type/test list (the Embassy wrappers live in connectors.rs, not send_wrapper.rs; adds the WebSocket client, the embedded session.rs/tls.rs/manager.rs, examples and changelogs).
  • §7/§8: two new rejected alternatives (spin-locked FIFO, keeping KNX Channels). The remaining open questions are marked non-blocking.

Related Issue

  • n/a

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the project's coding standards.
  • I have added tests to cover my changes. (doc-only)
  • All new and existing tests passed (make check). (doc-only; not run)
  • I have updated the documentation accordingly.

🤖 Generated with Claude Code

https://claude.ai/code/session_013u2xkHp6rrDP8cfrYErosd


Generated by Claude Code

claude added 2 commits October 3, 2026 16:54
…efault, scope fixes (WIP)

Partial revision: ready set made lock-free, removed API listed, config
parsing and transport.rs fate fixed, embedded write-ring default and size
cap, thumbv6m resolved. Still to do: session client (§4.8), KNX (§4.9),
migration table, CI gate details, §7/§8 updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013u2xkHp6rrDP8cfrYErosd
Add §4.8 (pump_client over OutboundRoutes/InboundDispatch) and §4.9 (KNX
without Channels), complete the §6 migration table and order, specify the
CI gate and the MQTT round-trip allocation test (§5), add rejected
alternatives 11-12, and mark the remaining open questions non-blocking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013u2xkHp6rrDP8cfrYErosd
@lxsaah
lxsaah merged commit ae3549a into main Oct 3, 2026
7 checks passed
@lxsaah
lxsaah deleted the docs/054-implementation-ready branch October 3, 2026 19:16
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.

2 participants