|
| 1 | +> *This was generated by AI during triage.* |
| 2 | +
|
| 3 | +# Add MOQ Lite 04 real QUIC integration tests |
| 4 | + |
| 5 | +Status: ready-for-agent |
| 6 | +Type: enhancement |
| 7 | + |
| 8 | +## Parent |
| 9 | + |
| 10 | +`.scratch/moq-lite-04-protocol/PRD.md` |
| 11 | + |
| 12 | +## What to build |
| 13 | + |
| 14 | +Add explicit integration coverage proving the completed MOQ Lite 04 client APIs |
| 15 | +work over the real `MOQX.Transport.Quicer` backend, not only the deterministic |
| 16 | +`MOQX.Transport.Support` backend. |
| 17 | + |
| 18 | +The first integration slice should use a local real-QUIC self-pair: one endpoint |
| 19 | +acts as the subscriber, the other as the publisher, and the test exercises the |
| 20 | +same public API flow covered by the Support-transport smoke test: |
| 21 | + |
| 22 | +1. subscriber connects with `MOQX.MOQLite04.connect/2`; |
| 23 | +2. subscriber opens a Subscribe transaction stream; |
| 24 | +3. publisher accepts the peer-opened Subscribe stream; |
| 25 | +4. publisher receives `Subscribe`; |
| 26 | +5. publisher sends `SubscribeOk`; |
| 27 | +6. subscriber receives `SubscribeOk`; |
| 28 | +7. publisher opens a unidirectional Group stream with `publish_group/3`; |
| 29 | +8. subscriber accepts the Group stream and receives the original Frame payload. |
| 30 | + |
| 31 | +The test must run against `MOQX.Transport.Quicer` through the |
| 32 | +`MOQX.Transport` facade and public `MOQX.MOQLite04` APIs. It should not match |
| 33 | +raw `quicer` messages in protocol assertions. |
| 34 | + |
| 35 | +## Acceptance criteria |
| 36 | + |
| 37 | +- [ ] An ExUnit integration test exists for the MOQ Lite 04 subscribe/group/frame |
| 38 | + flow over a real local `MOQX.Transport.Quicer` pair. |
| 39 | +- [ ] The test module is tagged `:integration` and remains excluded by default. |
| 40 | +- [ ] The test reuses the caller-managed integration harness conventions from |
| 41 | + `docs/adr/0004-docker-compose-driven-quic-integration-harness.md` and |
| 42 | + does not start Docker from ExUnit. |
| 43 | +- [ ] Certificate, ALPN, host, and port inputs come from explicit test config or |
| 44 | + helper arguments; the test does not mutate `Application` env. |
| 45 | +- [ ] The subscriber side uses `MOQX.MOQLite04.connect/2` with |
| 46 | + `transport: {MOQX.Transport.Quicer, opts}`. |
| 47 | +- [ ] The publisher side uses `MOQX.Transport` listener/accept/handshake APIs and |
| 48 | + wraps the accepted connection in a `MOQX.MOQLite04.Client` with a fresh |
| 49 | + `MOQX.MOQLite04.Session`. |
| 50 | +- [ ] The protocol flow uses public MOQ Lite APIs: |
| 51 | + `subscribe/2`, `accept_stream/2`, `recv/2`, `subscribe_ok/3`, and |
| 52 | + `publish_group/3`. |
| 53 | +- [ ] The final assertion proves the subscriber receives the exact original |
| 54 | + `Frame.payload` sent by the publisher. |
| 55 | +- [ ] Default `mix test` remains fast and hermetic. |
| 56 | +- [ ] `mix test --only integration` or the documented targeted integration |
| 57 | + command runs the new test when the real QUIC harness prerequisites are |
| 58 | + available. |
| 59 | +- [ ] Any external MOQ Lite reference relay/client interop gap is documented as a |
| 60 | + follow-up issue unless this slice adds a stable repo-owned reference |
| 61 | + harness. |
| 62 | + |
| 63 | +## Notes |
| 64 | + |
| 65 | +- Start from the Support-transport smoke test in |
| 66 | + `test/moqx/moq_lite_04/publisher_operations_test.exs`. |
| 67 | +- Reuse the existing Quicer integration patterns in `test/integration/` and |
| 68 | + `test/support/transport_contract.ex`. |
| 69 | +- MOQ Lite draft-04 uses ALPN `moq-lite-04`; the integration options must |
| 70 | + negotiate that ALPN rather than the generic `moqx-test` transport-contract |
| 71 | + ALPN. |
| 72 | + |
| 73 | +## Blocked by |
| 74 | + |
| 75 | +- `.scratch/moq-lite-04-protocol/issues/08-add-role-neutral-moq-lite-publisher-operations.md` |
0 commit comments