Fix E2E test gaps and add comprehensive E2E + parity test suites

- Fix pull consumer fetch: send original stream subject in HMSG (not inbox)
  so NATS client distinguishes data messages from control messages
- Fix MaxAge expiry: add background timer in StreamManager for periodic pruning
- Fix JetStream wire format: Go-compatible anonymous objects with string enums,
  proper offset-based pagination for stream/consumer list APIs
- Add 42 E2E black-box tests (core messaging, auth, TLS, accounts, JetStream)
- Add ~1000 parity tests across all subsystems (gaps closure)
- Update gap inventory docs to reflect implementation status
This commit is contained in:
Joseph Doherty
2026-03-12 14:09:23 -04:00
parent 79c1ee8776
commit c30e67a69d
226 changed files with 17801 additions and 709 deletions

View File

@@ -193,9 +193,15 @@ public static class MqttBinaryDecoder
/// Parses the payload bytes of an MQTT SUBSCRIBE packet.
/// </summary>
/// <param name="payload">The payload bytes from <see cref="MqttControlPacket.Payload"/>.</param>
/// <param name="flags">
/// Optional fixed-header flags nibble. When provided, must match SUBSCRIBE flags (0x02).
/// </param>
/// <returns>A populated <see cref="MqttSubscribeInfo"/>.</returns>
public static MqttSubscribeInfo ParseSubscribe(ReadOnlySpan<byte> payload)
public static MqttSubscribeInfo ParseSubscribe(ReadOnlySpan<byte> payload, byte? flags = null)
{
if (flags.HasValue && flags.Value != MqttProtocolConstants.SubscribeFlags)
throw new FormatException("MQTT SUBSCRIBE packet has invalid fixed-header flags.");
// Variable header: packet identifier (2 bytes, big-endian)
// Payload: one or more topic-filter entries, each:
// 2-byte length prefix + UTF-8 filter string + 1-byte requested QoS