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
@@ -1,5 +1,7 @@
// Port of Go conf/lex.go token types.
using System.Text.Json;
namespace NATS.Server.Configuration;
public enum TokenType
@@ -7,6 +9,7 @@ public enum TokenType
Error,
Eof,
Key,
Text,
String,
Bool,
Integer,
@@ -22,3 +25,34 @@ public enum TokenType
}
public readonly record struct Token(TokenType Type, string Value, int Line, int Position);
/// <summary>
/// Pedantic token wrapper matching Go conf/parse.go token accessors.
/// </summary>
public sealed class PedanticToken
{
private readonly Token _item;
private readonly object? _value;
private readonly bool _usedVariable;
private readonly string _sourceFile;
public PedanticToken(Token item, object? value = null, bool usedVariable = false, string sourceFile = "")
{
_item = item;
_value = value;
_usedVariable = usedVariable;
_sourceFile = sourceFile ?? string.Empty;
}
public string MarshalJson() => JsonSerializer.Serialize(Value());
public object? Value() => _value ?? _item.Value;
public int Line() => _item.Line;
public bool IsUsedVariable() => _usedVariable;
public string SourceFile() => _sourceFile;
public int Position() => _item.Position;
}