Repository navigation
CI rehearsal only (do not merge) - #21
michael-moffett wants to merge 20 commits into
Conversation
…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
|
| 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 |
There was a problem hiding this comment.
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.
| 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"], | |||
There was a problem hiding this comment.
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.
Fork CI only. Do not merge.