Skip to content

fix(client): send plain-text bodies on rest api v2 - #26

Merged
plusky merged 1 commit into
mainfrom
fix/adf-v2-bodies
Aug 18, 2026
Merged

fix(client): send plain-text bodies on rest api v2#26
plusky merged 1 commit into
mainfrom
fix/adf-v2-bodies

Conversation

@plusky

@plusky plusky commented Aug 18, 2026

Copy link
Copy Markdown
Owner

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, and create_issue's description (previously encoded in server.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.

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 plusky added bug Something isn't working ai-assisted Found or drafted with AI assistance; claims verified against source, review independently labels Aug 18, 2026
@plusky
plusky enabled auto-merge (rebase) August 18, 2026 10:32
@plusky
plusky merged commit 1ccbc14 into main Aug 18, 2026
11 checks passed
@plusky
plusky deleted the fix/adf-v2-bodies branch August 18, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Found or drafted with AI assistance; claims verified against source, review independently bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADF bodies break every write on REST v2 (Data Center)

1 participant