Repository navigation
fix(core): reject transform/join input type mismatches at build() (#330) - #336
Merged
Merged
Conversation
1 of 5 tasks
…r and TransformDescriptor
lxsaah
force-pushed
the
fix/330-transform-input-type-check
branch
from
October 24, 2026 09:56
7d0a913 to
08416a7
Compare
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
AimDbBuilder::build()checked that a transform's input key exists, but not its type. A.transform::<Pascal, _>("temp", …)on aCelsiusrecord built fine. At runtime the transform's consumer failed to resolve, so the output never got a value and a join ran without that input. With default features nothing was logged, becauselog_error!compiles to nothing withouttracing/log.build()now reports such a configuration inDbError::InvalidConfiguration, alongside every other finding:Changes
TransformDescriptorrecords each input'sTypeIdand type name (input_types, in the same order asinput_keys). Single transforms andJoinBuilder::input::<I>fill it.AnyRecordgainstransform_input_types()andtype_name().build()checks each input against the record registry'stype_idright after the registry is built. Unregistered inputs are still reported by the dependency graph (TransformInputNotFound).DbErrorvariant. A four-Stringvariant would growDbErrorpast its 64-byte embedded budget (test_error_size_constraint), andbuild()reports findings asConfigErrormessages anyway.[Unreleased] / Changed: this is a behaviour change, because such configurations now fail atbuild()instead of running without the transform.Tests (
aimdb-tokio-adapter/tests/transform_validation.rs)Celsius→Fahrenheit) builds and runs: input and output types may differ.Verified locally:
cargo test -p aimdb-core,cargo test -p aimdb-tokio-adapter, clippy on both crates,cargo check -p aimdb-core --no-default-features,cargo check -p aimdb-wasm-adapter --target wasm32-unknown-unknown --tests, andcargo check -p aimdb-embassy-adapter. The fullmake checkis left to CI.Related Issue
Checklist
make check). Left to CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01YPDjQ947yKjLLAq3Xzgu3e