Repository navigation
test(engine): apply the configured value model as decoder on reply direction too - #2381
Merged
Merged
Conversation
…rection too TestBindingFactory (the type: test binding backing k3po *IT.java tests engine-wide) only ever applied a configured value model as an encoder, on the initial/produce direction. Reply-direction data was always forwarded raw, with no model applied at all -- so no k3po IT anywhere could exercise a model's decode-time behavior through a live engine; that coverage only ever existed as plain JUnit tests bypassing the engine entirely. Add a second pipeline (supplyDecoder()) applied on the reply direction, mirroring the existing initial-direction encoder. Gated on the same valueModel != null check, so every existing type: test usage without a value model is unaffected, and every existing one with a value model is unaffected too: audited every value-model-configured type: test binding across the reactor and confirmed none currently sends or asserts a reply-direction payload (every existing scenario is produce/initial-only -- the exact gap this closes). Verified via a full verify of runtime/engine (215 unit + 183 IT) plus runtime/model-avro, model-json, model-protobuf, and model-core (their own ITs share this same test binding), all green.
jfallows
commented
Aug 14, 2026
…e and TestTarget Each side owns the field for the pipeline it actually applies (TestSource encodes on initial, TestTarget decodes on reply), addressing review feedback on PR #2381.
jfallows
pushed a commit
that referenced
this pull request
Aug 15, 2026
Picks up #2381, which lets the type: test binding drive a configured value model's decoder on the reply direction, not just the encoder on initial -- needed so model-core-ext's disclosure IT can exercise the actual decode-time transform through a live engine instead of only proving encode is a no-op.
jfallows
pushed a commit
that referenced
this pull request
Aug 15, 2026
Picks up test(engine): apply the configured value model as decoder on reply direction too (#2381) -- required for JsonModelExtDisclosureIT to exercise decode-time disclosure through a live engine via type: test.
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
TestBindingFactory(thetype: testbinding backing k3po*IT.javatests engine-wide) only ever applied a configured value model as an encoder, on the initial/produce direction. Reply-direction data was always forwarded raw, with no model applied at all — so no k3po IT anywhere could exercise a model's decode-time behavior through a live engine; that coverage only ever existed as plain JUnit tests bypassing the engine entirely.Adds a second pipeline (
supplyDecoder()) applied on the reply direction, mirroring the existing initial-direction encoder, so a realEngineRule+K3poRuleIT can prove decode-time behavior (e.g. a model extension's field substitution) actually fires end-to-end through a live engine.Safety
Gated on the same
valueModel != nullcheck the existing encoder uses, so everytype: testusage without a value model is entirely unaffected. For usages that do configure a value model: audited everytype: testbinding with avalue:model configured across the whole reactor (model-avro.spec,model-json.spec,model-protobuf.spec,model-core.spec) and confirmed none currently sends or asserts a reply-direction payload — every existing scenario is produce/initial-only (the exact gap this closes), so applying a decoder in that direction is a no-op for every existing assertion.Test plan
./mvnw clean verify -pl runtime/engine— 215 unit tests + 183 k3po ITs, all green./mvnw clean verify -pl runtime/model-avro,runtime/model-json,runtime/model-protobuf,runtime/model-core— all four modules' own ITs (which share this same test binding) green, no regressionsFixes # (none — shared test infrastructure enhancement, not tied to a specific issue)
🤖 Generated with Claude Code
https://claude.ai/code/session_01GKWELiLVoasTwsuvaXg2Y3
Generated by Claude Code