Conversation
…user_prompt
Backend's UserPromptPayload is kotlinx.serialization @SerialName("user_prompt");
strict deserialization rejected the client's { prompt } body with a 400. Every
non-dry-run call to leadbay_refine_prompt and the granular leadbay_set_user_prompt
was broken. The dry_run preview printed the same wrong shape, which hid the
mismatch from anyone who inspected it.
Three new unit tests pin the wire key (setUserPrompt body, refinePrompt body,
refinePrompt dry_run preview) so the contract can't silently reappear.
Checked every other requestVoid("POST", …, body) call site — no other Kotlin
snake_case endpoints were being hit with camelCase-keyed bodies.
Versions: core 0.2.1→0.2.2 (private), mcp + leadclaw 0.2.2→0.2.3
(openclaw.plugin.json synced).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UserPromptPayloadis@SerialName("user_prompt")with strict kotlinx.serialization, so the client's{ prompt }body was rejected with a 400. Bothleadbay_refine_promptand the granularleadbay_set_user_promptnow send{ user_prompt }, and theirdry_runpreviews reflect the real wire shape.requestVoid("POST", …, body)call site — no other Kotlin snake_case endpoints were being hit with camelCase bodies.@leadbay/core0.2.1→0.2.2 (private),@leadbay/mcp+@leadbay/leadclaw0.2.2→0.2.3 (withopenclaw.plugin.jsonsynced), CHANGELOG entries in both published packages.Test plan
pnpm -r typecheckcleanpnpm -r test— 127/127 pass (95 core / 12 leadclaw / 20 mcp), including the 3 new contract testsnpx -y @leadbay/mcp+leadbay_refine_promptagainst staging returns 204, not a JSON deserialization 400🤖 Generated with Claude Code