Skip to content

CI rehearsal only (do not merge) - #21

Open
michael-moffett wants to merge 20 commits into
mainfrom
pay-kit-89-m1-kotlin-runner-a1-next
Open

michael-moffett wants to merge 20 commits into
mainfrom
pay-kit-89-m1-kotlin-runner-a1-next

Conversation

@michael-moffett

Copy link
Copy Markdown
Member

Fork CI only. Do not merge.

michael-moffett and others added 20 commits October 3, 2026 06:46
…matrix

A Gradle stdin/stdout runner over the Kotlin SDK's protocol functions, plus `harness/protocol-runners/kotlin.json`, so the spawned-runner block drives Kotlin.

No protocol-layer vector reaches Kotlin today. Milestone 1 of our harness proposal puts Kotlin in the divergence matrix.
…-run steps in the kotlin harness job, and asserted Kotlin divergences in the spawned-runner matrix
…cratch (--rerun-tasks); 5/5 MainTest cases pass, the vitest suite is still unrun
…l as a must-pass case (TS reference re-parses Kotlin's header) and lists receipt.format as a known unsupported divergence
…lDist test) and Main.kt gains its 3-line header comment
…ned-runner block, with Kotlin's SDK gaps asserted by exact response
…elds after whole-object serialization (Go omitempty), with its unit test asserting the omission
…d digest; an empty request now returns parse_error, with a MainTest case for it
…ed as a known divergence with its exact response; the opaque and vector-coverage findings are answered with the earlier rulings
…d credential.format case through the runner; the other seven SDKs keep their smoke cases
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 3/5

[High risk] Adds Kotlin test harness to CI pipeline.

The PR should not be merged until opaque challenge parsing and fresh-checkout full-suite execution are fixed.

Findings

  1. P1 Opaque challenge values are decoded ▶
  2. P1 Default tests require an unbuilt runner ▶

Summary

The PR adds a Kotlin mpp-protocol runner, registers it for conformance testing, and adds a targeted Kotlin CI build and test step.

  • Challenge parsing mishandles opaque values.
  • Registering the prebuilt runner breaks fresh-checkout full-suite runs without a build prerequisite.

Reviews (1) · Last reviewed commit: "greptile.json: review on request only"

val fields = Json.encodeToJsonElement(PaymentChallenge.serializer(), challenge).jsonObject
return JsonObject(
fields.filter { (name, value) -> name !in setOf("expires", "digest") || value != JsonPrimitive("") }.mapValues { (name, value) ->
if (name == "request" || name == "opaque") decodeJson(value.jsonPrimitive.content) else value

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Opaque challenge values are decoded

When a valid Payment challenge includes opaque, this runner treats it as base64url-encoded JSON, although the Kotlin SDK preserves it as a string and the runner contract expects the raw value. A value such as trace-123 therefore produces a parse_error instead of a parsed challenge; encoded JSON is returned in the wrong form.

Suggested change
if (name == "request" || name == "opaque") decodeJson(value.jsonPrimitive.content) else value
if (name == "request") decodeJson(value.jsonPrimitive.content) else value

@@ -0,0 +1,5 @@
{
"language": "kotlin",
"command": ["sh", "-c", "exec build/install/mpp-kotlin-protocol-runner/bin/mpp-kotlin-protocol-runner"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Default tests require an unbuilt runner

In a fresh checkout, pnpm test discovers this Kotlin runner, but the configured command points to an installDist executable that has not been built. Kotlin cases then fail with a runner startup error. The targeted Kotlin CI job builds the distribution first, but the default full-suite command has no such prerequisite.

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.

1 participant