Files
amethyst/nestsClient
Claude 44291b956b fix(nestsclient): SubscribeOk narrows startGroup to publisher.nextSequence — moq-lite Lite-03
Lite-03 audit L2: when accepting a SUBSCRIBE, the publisher MAY
narrow the subscriber's `startGroup` / `endGroup` request bounds.
Pre-fix we always echoed `null/null`, which lost the diagnostic
"which group am I about to start sending?" information — particularly
useful for hot-swap continuations where the publisher's
[MoqLitePublisherHandle.nextSequence] is non-zero (the seeded
`startSequence` from the previous moq-lite session).

The fix narrows `startGroup` to `targetPublisher.nextSequence`. The
subscriber decodes this as "the next group on this subscription
will be sequence N" and can log / surface the join-point. `endGroup`
stays null because live audio rooms have no end in sight; the
subscriber's request bound is honoured implicitly when the publisher
closes.

Regression test:
`MoqLiteSessionTest.publisher_subscribeOk_narrows_startGroup_to_next_sequence`.

Audit doc: nestsClient/plans/2026-05-09-moq-lite-rfc-compliance.md (L2).

https://claude.ai/code/session_012TGfo99Ugz7fcCPv85a8Tq
2026-05-09 14:49:55 +00:00
..