Skip to content

test(engine): apply the configured value model as decoder on reply direction too - #2381

Merged
jfallows merged 2 commits into
developfrom
claude/zilla-issue-2302-7wu9ht
Aug 14, 2026
Merged

jfallows merged 2 commits into
developfrom
claude/zilla-issue-2302-7wu9ht

Conversation

@jfallows

Copy link
Copy Markdown
Contributor

Description

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.

Adds a second pipeline (supplyDecoder()) applied on the reply direction, mirroring the existing initial-direction encoder, so a real EngineRule+K3poRule IT 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 != null check the existing encoder uses, so every type: test usage without a value model is entirely unaffected. For usages that do configure a value model: audited every type: test binding with a value: 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 regressions
  • checkstyle, license headers clean

Fixes # (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

…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.
…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 jfallows left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jfallows
jfallows merged commit f0f8d5f into develop Aug 14, 2026
80 of 82 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants