Skip to content

prove one service over both transports with a hand-driven harness - #284

Merged
eburgos merged 1 commit into
masterfrom
dual-transport-proof
Sep 6, 2026
Merged

eburgos merged 1 commit into
masterfrom
dual-transport-proof

Conversation

@eburgos

@eburgos eburgos commented Sep 6, 2026

Copy link
Copy Markdown
Owner

New test binaries only — nothing under src/ changes.

One DocumentService declaring both transports, one implementation proven (by pointer identity) to serve both loops unmodified. Coverage per operation shape on both loops: header-bound request-reply with both mapped errors, no-payload with a 202 override, bytes with a query field, the annotation-free default binding, and one-way delivery. A RecordingFaultHandler answers 490/491 with its own headers and body, verified against the 404/400 defaults to prove the seam is used.

The loop also exposed a real defect in the published surface: Ok(()) carried over the AMQP envelope decodes as a missing value (Some(()) serializes to null inside Option<T>, which reads back as None), so the client faults where unit success was sent. One test documents the wrong behavior explicitly and fails the moment it is fixed — the fix is filed as its own task.

Gate: just lint and just test-named-features green (18/18 under each serde-enabled combination).

One DocumentService asking for both transports, one implementation
serving both unmodified: a header-bound request-reply operation with a
complete error mapping, a no-payload operation overriding its status,
a bytes operation with a query field, a defaulted operation, and a
one-way operation. The http halves join through an in-memory
plain-terms loop, the amqp halves through the headers-capable seam,
and an installed fault handler is observed answering its own statuses,
headers and payloads against the defaults.

One test documents a defect the loop exposed rather than hiding it: a
unit success carried over the amqp envelope decodes as a missing value
- serde writes the unit as null inside the envelope's optional value
and the reader answers a fault where Ok(()) was sent. The test asserts
today's wrong behavior so the fix cannot land without flipping it.
@eburgos
eburgos merged commit 3acd471 into master Sep 6, 2026
@eburgos
eburgos deleted the dual-transport-proof branch September 6, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant