Skip to content

refactor(core)!: remove Source, pump_sink, Connector and TopicProvider (design 054) - #295

Merged
lxsaah merged 3 commits into
feat/054-connector-boundaryfrom
feat/054-s16-remove-old-spi
Oct 6, 2026
Merged

lxsaah merged 3 commits into
feat/054-connector-boundaryfrom
feat/054-s16-remove-old-spi

Conversation

@lxsaah

@lxsaah lxsaah commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stage 16 of the design 054 implementation plan: remove the old connector SPI. Breaking.

Base: feat/054-connector-boundary. This PR first targeted main so CI would run the full matrix; that run passed on every check (Format and Lint, Build & Test, Embedded Cross-compilation, Comprehensive Development Check, Build Documentation, Bench Gate, Miri, WASM). To make that possible, main was merged in: it brings #284 (Maximum Packet Size in the embedded CONNECT) into the feature branch. Its conflicts keep the branch's side, which already sends the same CONNECT properties.

Removed

  • aimdb-core:
    • Source, pump_source, pump_sink (session/pump.rs)
    • the Connector trait (ConnectorConfig and PublishError stay)
    • SerializedReader, SerializedSource, SerializedValue, SerializedValueInto, SerializedPayload, RecvSerializedFuture, RecvSerializedIntoFuture
    • SourceFactoryFn, TopicProvider, with_topic_provider
    • OutboundRoute, AimDb::collect_outbound_routes
  • Now crate-private: Router and AimDb::inbound_router; InboundDispatch uses them. ConnectorLink carries only the route factory.
  • Embassy adapter: EmbassySinkRaw, EmbassySink, EmbassySourceRaw, EmbassySource. connectors.rs keeps into_box_future and NetStack.
  • KNX:
    • embassy-sync and the optional critical-section dependency are dropped.
    • critical-section-std-impl is kept as a deprecated no-op, following the crate's existing pattern for deprecated features. It is removed from the README, the Tokio demo and codegen output.

Migrated tests

  • Core:
    • The fused_reader_* cases now run against OutboundRoutes through a scripted buffer.
    • The inbound_router_* tests are folded into the inbound_dispatch_* ones.
    • pump_source_routes_through_the_given_router is removed.
  • Other crates:
    • aimdb-data-contracts link_codec.rs and MQTT link_ext_tests.rs now use OutboundRoutes::routes()/next and InboundDispatch.
    • In the Tokio adapter's outbound_routes.rs, the provider-rejection test is removed and the route-info test no longer compares against collect_outbound_routes.
    • The KNX test for with_topic_provider rejection is removed.

Bench

The inbound_route*, inbound_pump_source_minimal, outbound_scratch_* and outbound_owned_static_topic rows are removed and the baseline replaced. Every remaining row matches the design's §5 targets:

Row Allocations per message
inbound_dispatch, inbound_dispatch_pattern, inbound_dispatch_keyed_known 0
inbound_dispatch_keyed_new 1
outbound_next_static_topic, outbound_next_written_topic 0
outbound_next_owned 1
outbound_next_round_robin, outbound_next_parked 0

Verified locally

  • Test legs:
    • all core Makefile test legs
    • aimdb-data-contracts legs
    • MQTT std
    • aimdb-tokio-adapter
    • KNX std
  • Gate: make bench-gate passes.
  • Leftover names: a grep for the removed names finds them only in CHANGELOGs, design docs and release notes.
  • make check: stopped once in clippy with a build-directory error (failed to create encoded metadata). That's a devcontainer filesystem problem, not a lint: rerunning the failed leg (aimdb-websocket-connector) was clean. CI is the full run.

🤖 Generated with Claude Code

lxsaah and others added 3 commits October 4, 2026 21:08
…r (design 054)

Delete everything `InboundDispatch` and `OutboundRoutes` replaced, so any
caller still on the old path is a compile error.

Removed from aimdb-core: `Source`, `pump_source`, `pump_sink`
(`session/pump.rs`), the `Connector` trait (`ConnectorConfig` and
`PublishError` stay), `SerializedReader`, `SerializedSource`,
`SerializedValue`, `SerializedValueInto`, `SerializedPayload`,
`RecvSerializedFuture`, `RecvSerializedIntoFuture`, `SourceFactoryFn`,
`TopicProvider`, `with_topic_provider`, `OutboundRoute` and
`AimDb::collect_outbound_routes`. `Router` and `AimDb::inbound_router`
are crate-private. `ConnectorLink` carries only the route factory.

Embassy adapter: `EmbassySinkRaw`, `EmbassySink`, `EmbassySourceRaw` and
`EmbassySource` removed; `connectors.rs` keeps `into_box_future` and
`NetStack`.

KNX: `embassy-sync` and the optional `critical-section` dependency are
dropped; `critical-section-std-impl` stays as a deprecated no-op and is
removed from the README, the Tokio demo and codegen output.

Tests: the fused-reader cases run against `OutboundRoutes`, the router
tests are folded into the `InboundDispatch` ones, and `link_codec.rs`,
MQTT `link_ext_tests.rs` and the Tokio adapter tests use the new objects.
Bench: the old rows are dropped and the baseline replaced; every row
matches the design's targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #284 (advertise Maximum Packet Size in the embedded CONNECT). The
branch already sends the same CONNECT properties through `connect_packet`;
the conflicts keep the branch's side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lxsaah
lxsaah changed the base branch from main to feat/054-connector-boundary October 6, 2026 04:31
@lxsaah
lxsaah marked this pull request as ready for review October 6, 2026 04:31
@lxsaah
lxsaah merged commit e34e359 into feat/054-connector-boundary Oct 6, 2026
10 checks passed
@lxsaah
lxsaah deleted the feat/054-s16-remove-old-spi branch October 6, 2026 04:40
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