fix: the node update echo is typed, not flat Resources - #138
Merged
Merged
Conversation
`POST /resources/update` answered with each node serialized as a plain
`Resource` whatever its real type. The api's node-update refactor made the
pipeline per-type and the echo followed, so a node now comes back in the shape
of its own kind — a timeseries with its `unit` and `valueType`, an asset with
its `geoLocation`.
The old signature was not merely lossy. `Resource` requires `isRoot`, which
only resources and assets carry, so `ResourceService::update` on a timeseries
or a function failed to *deserialize*:
missing field `isRoot` at line 1 column 244
Nothing caught it because every update test in `src/resources/` updates a plain
resource, which does carry `isRoot`. `update_echo_is_typed_per_node_type` drives
the two types that broke and asserts each echoes as its own `Node` variant.
`ResourceService::update` and its blocking mirror now return
`GraphDataWrapper<Node>`. This is a breaking change to a public signature.
`PyGraphResult::from_resource_wrapper` existed only for this one flat echo and
is removed; both binding services use `from_wrapper`, so Python callers get
typed node objects from `resources.update` as they already do from every read.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: jgjesdal <jostein@intellistream.ai>
olavgg
approved these changes
Sep 18, 2026
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.
POST /resources/updateanswered with each node serialized as a plainResourcewhatever its real type. The api's node-update refactor made the pipeline per-type and the echo followed, so a node now comes back in the shape of its own kind — a timeseries with itsunitandvalueType, an asset with itsgeoLocation.The old signature was not merely lossy.
ResourcerequiresisRoot, which only resources and assets carry, soResourceService::updateon a timeseries or a function failed to deserialize:Nothing caught it because every update test in
src/resources/updates a plain resource, which does carryisRoot.update_echo_is_typed_per_node_typedrives the two types that broke and asserts each echoes as its ownNodevariant.ResourceService::updateand its blocking mirror now returnGraphDataWrapper<Node>. This is a breaking change to a public signature.PyGraphResult::from_resource_wrapperexisted only for this one flat echo and is removed; both binding services usefrom_wrapper, so Python callers get typed node objects fromresources.updateas they already do from every read.