Repository navigation
feat(core): AimDbBuilder::connect returns a ConnectorHandle (#390, stage 1) - #397
Merged
lxsaah merged 1 commit intoNov 2, 2026
Conversation
connect registers a connector exactly like with_connector and returns a Copy handle holding the builder's id and the connector's index. Each builder takes a fresh id from a static AtomicU32, so a handle can be told apart from another builder's; nothing stores or leaks the scheme. Links through a handle (OutboundLink::on / InboundLink::on) follow in the next stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
Closed
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 1 of 2 for #390, into the #392 feature branch.
ConnectorHandle { builder: u32, index: u16 }inaimdb-core::connector, exported at the crate root. It'sCopy,EqandHash, and holds no string. It's namedConnectorHandlebecause the crate root already exports the session-layerConnection.AimDbBuilder::connect(&mut self, c) -> ConnectorHandleregisters the connector exactly likewith_connector, and the index saturates atu16::MAX.AtomicU32starting at 1, so tests can use 0 as a fixed id. Every target inrust-toolchain.tomlhas this atomic, so noportable-atomicis needed.with_connector's docs point toconnect.Unlike the plan in #390,
RecordRegistrargets itsbuilder_idfield in stage 2, together withOutboundLink::on/InboundLink::onand the check that reads it. In this stage nothing would read it.Tests
builder::connect_tests::connect_hands_out_one_handle_per_connector: indices 0 and 1, the same id within one builder, a different id in another builder, and connectors kept in order.typed_api::tests::connected_connector_serves_links: a connector added withconnectservesbuild()and inbound routing like one added withwith_connector.Checks
CI doesn't run on PRs into the feature branch, so I ran these locally:
aimdb-coretests withstd,tracing,observability(307) and withallocthumbv8mbuild-D warnings), includingthumbv7emwithdefmtcargo docwith-D warningsRelated Issue
🤖 Generated with Claude Code