Repository navigation
RSDK-14642: composite engine — server-side resolution & advertisement (1/5) - #6539
Open
Daniel Botros (danielbotros) wants to merge 12 commits into
Open
Daniel Botros (danielbotros) wants to merge 12 commits into
Daniel Botros (danielbotros) wants to merge 12 commits into
Conversation
Daniel Botros (danielbotros)
added this pull request to stack #6544
September 24, 2026 21:18
Daniel Botros (danielbotros)
removed this pull request from stack #6544
September 24, 2026 21:32
Daniel Botros (danielbotros)
added this pull request to stack #6545
September 24, 2026 21:32
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 24, 2026 21:56
e0dee2c to
719fed4
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 24, 2026 22:52
d5e9f88 to
940c6a7
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 24, 2026 23:16
940c6a7 to
b18787a
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 24, 2026 23:25
b18787a to
c6a01f3
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 25, 2026 15:00
c6a01f3 to
ff1c1bf
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 25, 2026 15:02
ff1c1bf to
d11efa5
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 25, 2026 16:10
621300f to
f78e64c
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 25, 2026 16:30
f78e64c to
28e13a8
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 25, 2026 16:51
28e13a8 to
a43e10e
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 25, 2026 16:55
a43e10e to
f380a1b
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3a-server-core
branch
from
September 25, 2026 17:05
f380a1b to
cb4c216
Compare
robot/impl server-side: local_robot resolution (api-less resourceBySimpleName / resolveSimpleNameMatch, specific-API unwrap, StopAll dedup, weak-dep + dependency composite-aliasing, MachineStatus metadata), resource_manager advertisement (ExpandCompositeNames, remote-collision skip, remote metadata), and ResourceFromRobot unwrap. Consumes the resource-graph remote-composite machinery from the core PR. First of the ticket-3 split. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 202fdae)
(cherry picked from commit f93949c)
…onfigure An in-place model rebuild swaps a new resource onto the existing graph node without passing through Set/UpdateSimpleName, so the compositeByAPI index was never refreshed. Growing a composite's served API set left the new co-equal API unresolvable (FindBySimpleNameAndAPI 404), and shrinking it left a dropped API resolving to a node that no longer serves it. Add Graph.ReindexComposite and call it after the in-place SwapResource in the resource manager. Covered by a graph unit test (grow+shrink) and a robot e2e that reconfigures a resource from a single-API model to a composite model and asserts the newly-served API resolves. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit d9d62d8)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tem test to p3e-consumers; rename Modular->Composite in-process test Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The weak-dep matcher runs against each API a composite serves, not only the one its Name() carries. Reword the comment so it no longer implies that API is canonical. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Name a composite's node logger composite/<name> via resource.LogName so its logs are not filed under a single co-equal API, and derive the per-resource log-level pattern the same way so log_configuration still matches. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A composite is one graph node reached under each of its co-equal API names, so it appears in AllNonCollidingResourceNames once per API. SubsByName already fans every served sub in a single pass, so dedupe on the resolved node rather than re-fanning it per alias. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… sub A weak-dependency matcher wired a composite in as the already-unwrapped sub for each matched API, leaving a weak-dep consumer with a single-API resource. Store the wrapper instead; both weak-dep consumers (data capture and motion) unwrap with resource.SubresourceForAPI, and composite data capture needs the full co-equal set to resolve a method to its owning API. An ordinary resource is its own only sub. Co-Authored-By: Claude Opus 4.8 (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.
RSDK-14642 — PR 1/5 of the Composable APIs server-side work (epic RSDK-14329). Stacked on #6521.
The in-process engine that makes a composite resolvable and advertised on one machine. It consumes the graph machinery from #6520 (the single-node model +
compositeByAPIindex) and wires it into the robot's resolution, dependency, lifecycle, and advertisement paths. Three files:local_robot.go— resolution, dependencies, lifecycleResourceByNamesplits on whether the lookup carries an API. An API-qualified lookup goes toFindBySimpleNameAndAPI, which fetches the graph node and unwraps it to that API's sub-resource (SubresourceForAPI) — so an in-process consumer that type-asserts sees the real typed instance, not the multi-API wrapper. An api-less (bareSimpleName) lookup goes toresourceBySimpleName→resolveSimpleNameMatch: a local composite is already one graph node, so it returns that whole multi-API handle; a remote composite arrives as one per-API sub-client node per co-equal API, so it assembles aMultiAPIResourceview over those sub-clients. A genuine same-name collision across distinct resources still errors — the dedup only ever collapses one composite.Dependenciesunder each of its co-equal API names (coequalAPIsOfreports the set — fromAPIsOffor a modular composite, or the node's model for a builtin one), so a consumer resolves it by whichever API it expects. The weak-dependency matcher scan likewise runs per served API and stores the unwrapped sub under each, so a weak-dep consumer (e.g. data capture) gets a typed sub rather than the wrapper.StopAlldedups on the raw pre-unwrap node, so a composite advertised under N actuator APIs is stopped exactly once.MachineStatusfills cloud metadata for a remote composite's non-canonical API rows (findRemoteMetadataByName).resource_manager.go— advertisement, in-place reconfigureAllNonCollidingResourceNamesexpands each composite to its per-API names for advertisement (ExpandCompositeNames), andupdateRemoteResourceNamesexempts a remote composite's own co-equal siblings from the collision check (same-remote exemption), so a composite isn't torn down as a self-collision.A model-only reconfigure swaps a resource in place (
gNode.SwapResource) and keeps the same graph node, bypassing the set/rename paths that maintaincompositeByAPI— so after a composite changed models its co-equal index would still point at the old API set and the new non-canonical APIs would stop resolving.ReindexComposite(added toresource.Graphin #6520's helper) is now called right after the in-place swap, re-running the index so the composite resolves under its current co-equal APIs.robot.goResourceFromRobotunwraps viaresource.AsType, so<pkg>.FromProvider(robot, name)returns the typed sub of a composite; theLocalRobot.FindBySimpleNameAndAPIinterface doc states that unwrap contract.Testing
robot/impl/multiapi_composite_test.go— in-process + remote end-to-end suite: api-less + per-API resolution with close-once, dependency aliasing, genuine simple-name collision handling (local and remote, incl. cross-API), remote composites (direct, prefixed, nested — one table-driven test), in-process typed lookup (theMultiAPIResourceunwrap),StopAlldedup, and frame-system membership.TestCompositeModelReconfigureReindexescovers the in-place model-reconfigure case end to end: a resource reconfigured from a single-API model to a composite model resolves under its new co-equal API. A graph-level unit test forReindexCompositelives in #6520'sresource_graph_test.go.🤖 Generated with Claude Code