Repository navigation
[RSDK-14768] Tag captured data with each method's owning API for composites - #6636
Open
Daniel Botros (danielbotros) wants to merge 1 commit into
Open
Daniel Botros (danielbotros) wants to merge 1 commit into
Daniel Botros (danielbotros) wants to merge 1 commit into
Conversation
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3e-consumers
branch
18 times, most recently
from
October 19, 2026 15:49
3c146d0 to
786fa42
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-datacapture
branch
from
October 19, 2026 16:01
7d5d725 to
d5d2f4d
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3e-consumers
branch
from
October 19, 2026 18:11
786fa42 to
58141d5
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-datacapture
branch
from
October 19, 2026 18:11
d5d2f4d to
f74454e
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3e-consumers
branch
from
October 20, 2026 16:23
58141d5 to
a77bcf1
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-datacapture
branch
3 times, most recently
from
October 20, 2026 16:52
87b1252 to
aed981d
Compare
…sites Data capture froze a collector's component_type from the resource's single configured API and passed the composite resource straight to the collector constructor. For a composite serving several co-equal APIs this (1) mis-tagged data — a camera+sensor's Readings were tagged rdk:component:camera, which ingestion rejects as non-sensor — and (2) could not even build the collector, since constructors type-assert their concrete API and a composite wrapper satisfies none. Resolve each capture method's owning API from the resource's served API set at collector-build time (captureAPIForMethod): a method implemented by exactly one served API tags under that API (Readings -> sensor, GetImage -> camera); a method several served APIs share (e.g. DoCommand) stays under the configured API; a single-API resource is unchanged. The owning API now flows through the collector metadata key, so a method name shared across a composite's APIs keys into distinct per-API streams, and buildCollector unwraps the composite to the owning sub-resource (SubresourceForAPI) before calling the constructor and uses the owning API for component_type, capture-file layout, and metadata. The capture-control auto-enable path resolves the owning API the same way instead of guessing from res.Name().API. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-datacapture
branch
from
October 20, 2026 18:18
aed981d to
ffdce15
Compare
Daniel Botros (danielbotros)
force-pushed
the
composable-apis-p3e-consumers
branch
from
October 20, 2026 18:18
bd5b538 to
44023a9
Compare
Daniel Botros (danielbotros)
marked this pull request as ready for review
October 20, 2026 19:04
Daniel Botros (danielbotros)
requested a review
from Katie Peters (katiepeters)
October 20, 2026 19:20
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.
Problem
Data capture froze a collector's
component_typefrom the resource's single configured API and passed the composite resource straight to the collector constructor. For a composite serving several co-equal APIs this:Readingswere taggedrdk:component:camera, which ingestion rejects as non-sensor; andresource.(Sensor)), and a composite wrapper satisfies none.Change
Resolve each capture method's owning API from the resource's served API set at collector-build time, instead of assuming the configured API owns every method.
captureAPIForMethodresolves the owner overresource.APIsOf(res)via the collector registry: a method implemented by exactly one served API tags under that API (Readings→sensor,GetImage→camera); a method several served APIs share (e.g.DoCommand) stays under the configured API; a single-API resource is unchanged.buildCollectorunwraps the composite to the owning sub-resource (SubresourceForAPI) before calling the constructor, and uses the owning API forcomponent_type, capture-file layout, and metadata.res.Name().API.Tests
New
TestCaptureAPIForMethodbuilds a real composite and asserts owning-API resolution (owned → that API, shared → configured, none → configured, single-API unchanged). Existing capture + builtin suites updated and green;go build ./...and golangci-lint clean.End-to-end validation
Validated against a preview deploy of the app-side match-by-name ingestion (app #14053):
viam-serverfrom this stack and ran thecomplexcombomodulecomposite (combodevice— servescamera+movement_sensor+ customgizmo) on a machine configured undercamera, with data capture + sync.ReadingsandPosition(movement_sensor methods) plusDoCommand.Readings/Positioncaptured and taggedrdk:component:movement_sensor(owning API ≠ the configuredcamera);DoCommand— owned by both camera and movement_sensor — taggedrdk:component:camera(configured API, sinceowners > 1). Confirmed in the on-disk capture layout and over sync.movement_sensor-tagged data synced and ingested against thecamera-configured entry on the deploy — the match-by-name path #14053 adds.Stacked on #6543 (
composable-apis-p3e-consumers).🤖 Generated with Claude Code