Skip to content

refactor(binding-kafka): rename remaining api Response classes with Kafka prefix - #2244

Merged
jfallows merged 1 commit into
developfrom
feature/binding-kafka-response-class-kafka-prefix
Jul 31, 2026
Merged

jfallows merged 1 commit into
developfrom
feature/binding-kafka-response-class-kafka-prefix

Conversation

@jfallows

Copy link
Copy Markdown
Contributor

Description

runtime/binding-kafka's api package mixes Kafka*-prefixed classes (e.g. KafkaCreateTopicsRequest) with a few that lack the prefix. This PR renames the remaining four to match:

  • CreateTopicsResponse → KafkaCreateTopicsResponse
  • CreateTopicsResponseV7FW → KafkaCreateTopicsResponseV7FW
  • DeleteTopicsResponse → KafkaDeleteTopicsResponse
  • DeleteTopicsResponseV6FW → KafkaDeleteTopicsResponseV6FW

Every class in runtime/binding-kafka/src/main/java/.../api/ now begins with Kafka.

Mechanical rename only, no behavior change. Updates the two consumers of these types:

  • KafkaClientCreateTopicsFactory (binding-kafka)
  • McpKafkaProxyFactory (binding-mcp-kafka)

along with their matching test files (*ResponseV7FWTest, *ResponseV6FWTest) and internal javadoc cross-references between the renamed classes.

Not touched: the unrelated, separately-generated internal.types.codec.create_topics.CreateTopicsResponseFW/CreateTopicsResponsePart2FW (and the delete_topics equivalents) — these come from .idl struct definitions in a different package and are out of scope.

Test plan

  • ./mvnw checkstyle:check -pl runtime/binding-kafka,runtime/binding-mcp-kafka — 0 violations
  • ./mvnw clean verify -pl runtime/binding-kafka,runtime/binding-mcp-kafka — full unit + k3po IT suite green (binding-kafka: 392 tests; binding-mcp-kafka: 32 unit + 23 IT), including the JaCoCo coverage gate

Fixes # (issue)


Generated by Claude Code

…afka prefix

CreateTopicsResponse(V7FW) and DeleteTopicsResponse(V6FW) become
KafkaCreateTopicsResponse(V7FW) and KafkaDeleteTopicsResponse(V6FW), matching
the Kafka* naming already used by every other class in the binding-kafka api
package. Updates the two consumers, KafkaClientCreateTopicsFactory and
McpKafkaProxyFactory, accordingly.

@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 7336a7f into develop Jul 31, 2026
5 checks passed
jfallows pushed a commit that referenced this pull request Jul 31, 2026
…t/proxy kind

Now that binding-mcp-http supports kind: client (implicit sys:http_client
exit via zilla.binding.mcp.http.client.exit, #2243), the generated
mcp_http0 no longer needs to always be kind: proxy defaulting to a
JVM-wide httpClientExit Configuration property owned by mcp_openapi
itself. McpOpenapiCompositeGenerator now mirrors kind: proxy when a
resolved exit exists (whether authored directly or passed through by a
generator like binding-mcp-schema-registry), kind: client otherwise,
relying entirely on mcp-http's own default. Removes the now-redundant
zilla.binding.mcp.openapi.http.client.exit Configuration property.

McpOpenapiClientIT and McpSchemaRegistryClientIT switch their exit
override to zilla.binding.mcp.http.client.exit (owned by mcp-http)
since there is no longer an mcp-openapi-level exit for kind: client.

Also updates the mcp_openapi schema patch's kind: proxy per-route exit
requirement to match binding-mcp-http's actual if/with-then/exit shape
(and binding-tcp's now-fixed #2241 items-based enforcement) rather than
the vacuous array-level "required" this mirrored initially.

Rebased onto latest develop (#2241, #2243, #2244).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SgdvrgkrnhEy7uUpoan62L
jfallows added a commit that referenced this pull request Jul 31, 2026
…xit (#2242)

* feat(binding-mcp-openapi): add kind: proxy variant with operator-declared exit

Widens mcp_openapi's kind enum to [client, proxy]. kind: proxy requires
exit (top-level or per-route, mirroring binding-tcp's kind: server
pattern, written to actually enforce per-route via "contains" rather
than tcp's vacuous array-typed "required"); kind: client keeps
disallowing exit.

McpOpenapiBindingConfig now resolves a binding-level exit from the
engine's own pre-resolved route.id (set generically by EngineManager
for every route before binding-specific code runs) rather than
re-resolving the raw route.exit string, and McpOpenapiCompositeGenerator
prefers it over the configured httpClientExit default when stamping
mcp_http0's routes. McpOpenapiBinding/McpOpenapiBindingContext widen
their kind == CLIENT gates to also accept PROXY, mirroring the
client+proxy dual-kind pattern binding-mcp-schema-registry uses for its
own kind: proxy variant.

Adds McpOpenapiProxyIT (reusing the existing mcp/http .rpt scripts
against a kind: proxy + exit fixture) and SchemaTest coverage for the
valid/invalid kind/exit combinations.

Fixes #2237

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SgdvrgkrnhEy7uUpoan62L

* refactor(binding-mcp-openapi): generate mcp_http0 with matching client/proxy kind

Now that binding-mcp-http supports kind: client (implicit sys:http_client
exit via zilla.binding.mcp.http.client.exit, #2243), the generated
mcp_http0 no longer needs to always be kind: proxy defaulting to a
JVM-wide httpClientExit Configuration property owned by mcp_openapi
itself. McpOpenapiCompositeGenerator now mirrors kind: proxy when a
resolved exit exists (whether authored directly or passed through by a
generator like binding-mcp-schema-registry), kind: client otherwise,
relying entirely on mcp-http's own default. Removes the now-redundant
zilla.binding.mcp.openapi.http.client.exit Configuration property.

McpOpenapiClientIT and McpSchemaRegistryClientIT switch their exit
override to zilla.binding.mcp.http.client.exit (owned by mcp-http)
since there is no longer an mcp-openapi-level exit for kind: client.

Also updates the mcp_openapi schema patch's kind: proxy per-route exit
requirement to match binding-mcp-http's actual if/with-then/exit shape
(and binding-tcp's now-fixed #2241 items-based enforcement) rather than
the vacuous array-level "required" this mirrored initially.

Rebased onto latest develop (#2241, #2243, #2244).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SgdvrgkrnhEy7uUpoan62L

* refactor(binding-mcp-openapi): propagate own kind onto generated mcp_http0 directly

Replace the derived binding.exit != null ? PROXY : CLIENT check with a
direct .kind(binding.kind) propagation. client (no exit anywhere) and
proxy (exit required) now have a precisely-specified meaning enforced
by the schema, and every caller of McpOpenapiBindingConfig lives in
this codebase — so trust the kind a caller sets rather than deriving it
defensively from exit presence. A caller that sets kind and exit
inconsistently (e.g. kind: client with an exit stamped on a route) will
now simply not route correctly, which is the right failure mode: it
gets caught by tests and fixed at the source, rather than silently
papered over here.

Updates the one unit test exercising this path to author its binding
as kind: proxy (the real, schema-valid way to declare an exit) instead
of kind: client + exit (a caller-side inconsistency this no longer
special-cases).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SgdvrgkrnhEy7uUpoan62L

---------

Co-authored-by: Claude <[email protected]>
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