Repository navigation
feat(core): OutboundLink::on / InboundLink::on take a ConnectorHandle (#390, stage 2) - #398
Merged
lxsaah merged 1 commit intoNov 2, 2026
Conversation
…#390) A link started from a handle takes the connector's scheme: a bare address ("sensors/temp") becomes "<scheme>://sensors/temp", and a full URL is accepted if its scheme is the connector's, so #[link_address] keys keep working. A different scheme, or a handle from another builder, is a ConfigError reported by build(); the check runs in push_outbound / inbound_link next to the existing link checks. RecordRegistrar carries the builder id to resolve handles against the connector list it already holds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
5 tasks done
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.
Description
Stage 2 of 2 for #390, into the #392 feature branch.
OutboundLink::on(handle, address)/InboundLink::on(handle, address)start a detached link on a connector registered withAimDbBuilder::connect."sensors/temp") takes the connector's scheme.#[link_address]keys keep working.ConfigErrorreported bybuild(). An out-of-range index gets the same message, since only another builder's handle can produce one. The check isconnector::resolve_link_url, called at the top ofpush_outboundandinbound_link, next to the existing link checks. The error names the record and the address as written.connector: Option<ConnectorHandle>field, carried throughnew,attachanddetach.RecordRegistrargets the builder's id (builder_id).on,ConnectorHandleandconnect. The usage guide's "Links as values" example usesconnect+on.Tests
handle_links_take_the_connector_scheme: with connectors[mqtt, knx], index 1 really yieldsknx://in both directions, and a matching full URL is accepted.handle_links_reject_wrong_scheme_and_foreign_handles: wrong scheme in both directions, another builder's handle in both directions, and an out-of-range index. Each case gets its exact error and address, and nothing is registered.handle_links_build_and_foreign_handles_fail_it: the target shape from [FEAT] AimDbBuilder::connect returns a ConnectorHandle; links through a handle need no scheme #390 throughbuild(). A handle from the same builder builds and subscribescommands/temp/indoor; another builder's handle givesInvalidConfigurationnamingtemp.indoor.Checks
CI doesn't run on PRs into the feature branch, so I ran these locally:
aimdb-coretests withstd,tracing,observability(310) and withallocthumbv8mbuild-D warnings)cargo docwith-D warningscargo check -p tokio-mqtt-connector-demolink_ext_testsaimdb-data-contractslib testsThe changelog for #390 follows in a separate PR, as for #389.
Related Issue
🤖 Generated with Claude Code