CI rehearsal only (do not merge) - #13
michael-moffett wants to merge 6 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.
|
| return buildJsonObject { | ||
| put("id", challenge.id) | ||
| put("realm", challenge.realm) | ||
| put("method", challenge.method) | ||
| put("intent", challenge.intent) | ||
| put("request", decodeJson(challenge.request)) | ||
| challenge.expires?.let { put("expires", it) } | ||
| challenge.digest?.let { put("digest", it) } | ||
| challenge.opaque?.let { put("opaque", decodeJson(it)) } | ||
| } |
There was a problem hiding this comment.
| put("request", decodeJson(challenge.request)) | ||
| challenge.expires?.let { put("expires", it) } | ||
| challenge.digest?.let { put("digest", it) } | ||
| challenge.opaque?.let { put("opaque", decodeJson(it)) } |
There was a problem hiding this comment.
Plain opaque values fail parsing The SDK treats
opaque as a pass-through string. When a valid challenge contains a plain value such as trace-123, decoding it as base64url JSON throws, so the runner returns parse_error instead of the parsed challenge.
| challenge.opaque?.let { put("opaque", decodeJson(it)) } | |
| challenge.opaque?.let { put("opaque", it) } |
| val request = challenge["request"] ?: JsonObject(emptyMap()) | ||
| val encoded = Base64.getUrlEncoder().withoutPadding().encodeToString(request.toString().encodeToByteArray()) | ||
| val wire = JsonObject(credential + ("challenge" to JsonObject(challenge + ("request" to JsonPrimitive(encoded))))) | ||
| return MppHeaders.formatAuthorization(json.decodeFromJsonElement(PaymentCredential.serializer(), wire)) |
There was a problem hiding this comment.
This comment has been minimized.
This comment has been minimized.
…in divergences pinned to exact responses, extended to the description and hash gaps, with a missing-binary test
… before exec, so a clean checkout can run it; divergence-map comment trimmed to the changed claim
| @@ -0,0 +1,5 @@ | |||
| { | |||
| "language": "kotlin", | |||
| "command": ["sh", "-c", "gradle -q installDist >&2 && exec build/install/mpp-kotlin-protocol-runner/bin/mpp-kotlin-protocol-runner"], | |||
There was a problem hiding this comment.
Gradle runs for every request The spawned adapter starts a new process for each protocol case, so this command runs
gradle installDist for every Kotlin request—about 13 times in the current suite. Even after the first build, repeated Gradle startup and build checks substantially slow the conformance run. Build the distribution once before running the cases, then launch the installed executable for each request.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Fork CI only. Do not merge.