fix(client): send plain-text bodies on rest api v2 - #26
Merged
Conversation
Text-to-body codec now lives on JiraClient (text_body): v3 wraps in ADF, v2 sends the plain string. add_comment, transition comments, and the create_issue description all route through it. Wiremock pins both wire shapes. Guard semantics stay version-independent (I2, I3, I4); no invariant weakened — write-path correctness on the v2 surface.
plusky
enabled auto-merge (rebase)
August 18, 2026 10:32
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.
Fixes #15.
The text-to-body decision now lives in exactly one place:
JiraClient::text_body, returning the ADF document on v3 and a plain JSON string on v2. All three call sites route through it —add_comment, the transition comment update, andcreate_issue's description (previously encoded inserver.rs).Tests: exact-body wiremock matchers pin the wire shape on both versions at all three call sites, with an
.expect(0)guard proving zero v3 traffic in the v2 create test. The reviewer restored the pre-fix sources and confirmed the v2-shape tests fail while the v3-shape tests pass on both trees — pinning both the fix and the unchanged v3 direction.Process: AI-assisted — implemented and independently adversarially reviewed against
docs/DESIGN.md(verdict: approve). Guard code untouched. Full verification suite green.