rust(feat): serve saved calculated channels from get_data - #737
Open
evan-sift wants to merge 6 commits into
Open
rust(feat): serve saved calculated channels from get_data#737evan-sift wants to merge 6 commits into
evan-sift wants to merge 6 commits into
Conversation
evan-sift
force-pushed
the
rust/mcp-calculated-channels
branch
from
August 26, 2026 07:55
707b4f1 to
6881374
Compare
evan-sift
force-pushed
the
rust/mcp-calculated-channel-data
branch
2 times, most recently
from
August 26, 2026 08:20
ce38cc5 to
b782ed0
Compare
evan-sift
marked this pull request as ready for review
August 26, 2026 08:21
Adds a resolution step to the calculated channel service: names are looked up among active saved channels, then resolved through the API for a single asset and optional run. Names that do not resolve come back reported instead of dropped so a caller can name them.
A channel name with no raw channel on the asset is resolved as an active saved calculated channel and queried with its resolved expression. Raw channels keep precedence on a shared name, so the existing path is unchanged. Channels that do not resolve are named in the result and in next_step, or in a RESOURCE_NOT_FOUND when nothing requested can be served, instead of returning a silently partial file. A calculated channel page carries no channel name, so its column falls back to the query key.
…ed report on failure Batch resolve responses are mapped by position, so compare the echoed calculated channel id against the requested one and fail when they disagree; an absent echo still falls back to position. Drop repeated names before resolution: two queries sharing a channel key merge into one column and repeat timestamps. Carry the unresolved-channel report into a failed data query so an empty window does not read as "the asset has no data" when part of the request never resolved.
evan-sift
force-pushed
the
rust/mcp-calculated-channels
branch
from
August 27, 2026 04:40
b26c94e to
0bbb0e9
Compare
evan-sift
force-pushed
the
rust/mcp-calculated-channel-data
branch
from
August 27, 2026 04:40
b782ed0 to
bc3f432
Compare
lineville
approved these changes
Aug 27, 2026
lineville
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Just the one non-blocking question on partial failures.
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
get_datanow serves saved calculated channels alongside raw channels. A name inchannel_nameswith no raw-channel match on the asset resolves as an active saved calculated channel and is evaluated for the requested asset and run. A raw channel wins a shared name;channel_regexstays raw-only. Resolution works whether the caller identified the asset byasset_nameorasset_id.Saved-name lookup is scoped to the asset. A name matching more than one active calculated channel is reported as ambiguous, naming the colliding calculated channel ids, instead of silently picking one; a truncated lookup page fails explicitly rather than misreporting unseen names as unknown.
Partial resolution is explicit: channels that do not apply to the asset are named, with reasons, in
unresolved_calculated_channelsand innext_step; nothing is silently dropped. When nothing resolves, the call fails with the same message. Batch resolution verifies the echoed channel id on every response and hard-errors on a mismatch.Surface note: this change extends
get_data; it is not a resource and the list / create / update / archive quartet does not apply.Stack note: the bundled agent skill and the 0.5.0 changelog for this whole stack land at the tip (#763).
Verification
cargo test -p sift_mcpon this branch: 350 passed, 0 failed. Coverage includes request construction, partial mapping, reordered and count-mismatched responses, name dedupe, unresolved reports surviving an empty data window, raw-path precedence, asset-scoped lookup, ambiguous-name reporting, and the truncation guard.