Commit Graph

8 Commits

Author SHA1 Message Date
Joseph Doherty
4ba87c4175 feat: add OCSP peer reject and chain validation events (Gap 10.10)
Add OcspChainValidationEvent DTO, OcspStatus enum, and OcspEventBuilder
helper with BuildPeerReject, BuildChainValidation, and ParseStatus methods.
Register OcspChainValidationEvent in EventJsonContext source-gen context.
Add OcspPeerReject and OcspChainValidation subject constants to EventSubjects.
10 new tests in OcspEventTests cover all DTOs, builder methods, status
parsing, and JSON round-trip.
2026-02-25 13:15:44 -05:00
Joseph Doherty
b314e3f510 feat: add S2 compression for system events (Gap 10.9)
Add EventCompressor static class with Snappy/S2 compress/decompress,
threshold-based ShouldCompress, CompressIfBeneficial with stats tracking,
and GetCompressionRatio helpers. Port 10 tests covering round-trip,
threshold logic, stats (TotalCompressed, BytesSaved, ResetStats).
Go reference: server/events.go:2082-2098 compressionType / snappyCompression.
2026-02-25 13:15:24 -05:00
Joseph Doherty
4b9384dfcf feat: add auth error event publication (Gap 10.5)
Add SendAuthErrorEvent, SendConnectEvent, SendDisconnectEvent to
InternalEventSystem, plus AuthErrorEventCount counter and the three
companion detail record types (AuthErrorDetail, ConnectEventDetail,
DisconnectEventDetail). 10 new tests in AuthErrorEventTests all pass.
2026-02-25 13:12:52 -05:00
Joseph Doherty
10ac904b5c feat: add remote server events for cluster visibility (Gap 10.8)
Add RemoteServerShutdownEvent, RemoteServerUpdateEvent, LeafNodeConnectEvent,
and LeafNodeDisconnectEvent types plus matching EventSubjects constants, with
10 unit tests covering type identity, field assignment, format placeholders,
and JSON roundtrip serialization.
2026-02-25 13:11:59 -05:00
Joseph Doherty
a6e7778c6c feat: complete system event payload fields (Gap 10.6)
Add EventBuilder static class to EventTypes.cs with helpers for constructing
fully-populated ConnectEventMsg, DisconnectEventMsg, AccountNumConns, and
ServerStatsMsg. Also add RemoteServerShutdownEvent, RemoteServerUpdateEvent,
LeafNodeConnectEvent, and LeafNodeDisconnectEvent advisory types.

Add FullEventPayloadTests.cs (10 tests) covering all builders, GenerateEventId
uniqueness, GetTimestamp ISO 8601 format, DataStats zero defaults, and
ConnectEventMsg JSON roundtrip.
2026-02-25 13:11:58 -05:00
Joseph Doherty
579063dabd test(parity): port 373 Go tests across protocol and services subsystems (C11+E15)
Protocol (C11):
- ClientProtocolGoParityTests: 45 tests (header stripping, tracing, limits, NRG)
- ConsumerGoParityTests: 60 tests (filters, actions, pinned, priority groups)
- JetStreamGoParityTests: 38 tests (stream CRUD, purge, mirror, retention)

Services (E15):
- MqttGoParityTests: 65 tests (packet parsing, QoS, retained, sessions)
- WsGoParityTests: 58 tests (compression, JWT auth, frame encoding)
- EventGoParityTests: 56 tests (event DTOs, serialization, health checks)
- AccountGoParityTests: 28 tests (route mapping, system account, limits)
- MonitorGoParityTests: 23 tests (connz filtering, pagination, sort)

DB: 1,148/2,937 mapped (39.1%), up from 1,012 (34.5%)
2026-02-24 16:52:15 -05:00
Joseph Doherty
94878d3dcc feat(monitoring+events): add connz filtering, event payloads, and message trace context (E12+E13+E14)
- Add ConnzHandler with sorting, filtering, pagination, CID lookup, and closed connection ring buffer
- Add full Go events.go parity types (ConnectEventMsg, DisconnectEventMsg, ServerStatsMsg, etc.)
- Add MessageTraceContext for per-message trace propagation with header parsing
- 74 new tests (17 ConnzFilter + 16 EventPayload + 41 MessageTraceContext)
2026-02-24 16:17:21 -05:00
Joseph Doherty
51e47fbe67 feat: add server event and advisory tests (Go parity)
16 tests in tests/NATS.Server.Tests/Events/ServerEventTests.cs covering
server lifecycle stats, account stats isolation, slow consumer / stale
connection counters, JetStream API counters, EventSubjects format
validation, InternalEventSystem sequence generation, and
BuildEventServerInfo identity. References events_test.go.
2026-02-24 09:00:01 -05:00