# Events — Gap Analysis

> This file tracks what has and hasn't been ported from Go to .NET for the **Events** module.
> See [stillmissing.md](stillmissing.md) for the full LOC comparison across all modules.

## LLM Instructions: How to Analyze This Category

### Step 1: Read the Go Reference Files

Read each Go source file listed below. For every file:

1. Extract all **exported types** (structs, interfaces, type aliases)
2. Extract all **exported methods** on those types (receiver functions)
3. Extract all **exported standalone functions**
4. Note **key constants, enums, and protocol states**
5. Note **important unexported helpers** that implement core logic (functions >20 lines)
6. Pay attention to **concurrency patterns** (goroutines, mutexes, channels) — these map to different .NET patterns

### Step 2: Read the .NET Implementation Files

Read all `.cs` files in the .NET directories listed below. For each Go symbol found in Step 1:

1. Search for a matching type, method, or function in .NET
2. If found, compare the behavior: does it handle the same edge cases? Same error paths?
3. If partially implemented, note what's missing
4. If not found, note it as MISSING

### Step 3: Cross-Reference Tests

Compare Go test functions against .NET test methods:

1. For each Go `Test*` function, check if a corresponding .NET `[Fact]` or `[Theory]` exists
2. Note which test scenarios are covered and which are missing
3. Check the parity DB (`docs/test_parity.db`) for existing mappings:
   ```bash
   sqlite3 docs/test_parity.db "SELECT go_test, dotnet_test, confidence FROM test_mappings tm JOIN go_tests gt ON tm.go_test_id=gt.rowid JOIN dotnet_tests dt ON tm.dotnet_test_id=dt.rowid WHERE gt.go_file LIKE '%PATTERN%'"
   ```

### Step 4: Classify Each Item

Use these status values:

| Status | Meaning |
|--------|---------|
| **PORTED** | Equivalent exists in .NET with matching behavior |
| **PARTIAL** | .NET implementation exists but is incomplete (missing edge cases, error handling, or features) |
| **MISSING** | No .NET equivalent found — needs to be ported |
| **NOT_APPLICABLE** | Go-specific pattern that doesn't apply to .NET (build tags, platform-specific goroutine tricks, etc.) |
| **DEFERRED** | Intentionally skipped for now (document why) |

### Step 5: Fill In the Gap Inventory

Add rows to the Gap Inventory table below. Group by Go source file. Include the Go file and line number so a porting LLM can jump directly to the reference implementation.

### Key Porting Notes for Events

- System events publish on `$SYS.ACCOUNT.<id>.CONNECT`, `$SYS.ACCOUNT.<id>.DISCONNECT`, etc.
- Events include client info, server info, and reason codes.
- Message tracing allows tracking a specific message through local delivery, routes, gateways, and leaf nodes.
- The system account (`$SYS`) is used for internal server communication.

---

## Go Reference Files (Source)

- `golang/nats-server/server/events.go` — System event generation/publishing (~4,080 lines). Connect/disconnect events, auth events, account events. Publishes on `$SYS.` subjects.
- `golang/nats-server/server/msgtrace.go` — Message tracing (trace a message through the system)

## Go Reference Files (Tests)

- `golang/nats-server/server/events_test.go`
- `golang/nats-server/server/msgtrace_test.go`

## .NET Implementation Files (Source)

- `src/NATS.Server/Events/` (all files)

## .NET Implementation Files (Tests)

- `tests/NATS.Server.Tests/Events/`

---

## Gap Inventory

<!-- After analysis, fill in this table. Group rows by Go source file. -->

### events.go — Exported Types / Structs

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `TypedEvent` | `golang/nats-server/server/events.go:468` | PORTED | `src/NATS.Server/Events/EventTypes.cs` | Fields inlined directly into each event class (ConnectEventMsg, DisconnectEventMsg, etc.) rather than embedded; same JSON shape |
| `ServerStatsMsg` | `golang/nats-server/server/events.go:150` | PORTED | `src/NATS.Server/Events/EventTypes.cs:383` | Full field parity |
| `ConnectEventMsg` | `golang/nats-server/server/events.go:155` | PORTED | `src/NATS.Server/Events/EventTypes.cs:191` | Full field parity including schema type constant |
| `DisconnectEventMsg` | `golang/nats-server/server/events.go:167` | PORTED | `src/NATS.Server/Events/EventTypes.cs:211` | Full field parity including schema type constant |
| `OCSPPeerRejectEventMsg` | `golang/nats-server/server/events.go:182` | PORTED | `src/NATS.Server/Events/EventTypes.cs:570` | Added `Peer` CertInfo payload parity (`subject`/`issuer`/`fingerprint`/`raw`) while preserving existing advisory fields |
| `OCSPPeerChainlinkInvalidEventMsg` | `golang/nats-server/server/events.go:196` | PORTED | `src/NATS.Server/Events/EventTypes.cs:624` | Added dedicated parity DTO with `link` + `peer` cert info and matching advisory type string |
| `AccountNumConns` | `golang/nats-server/server/events.go:210` | PORTED | `src/NATS.Server/Events/EventTypes.cs:245` | Full field parity including schema type constant |
| `AccountStat` | `golang/nats-server/server/events.go:217` | PORTED | `src/NATS.Server/Events/EventTypes.cs:245` | Fields embedded inline in `AccountNumConns` — matches Go embedding pattern |
| `ServerInfo` | `golang/nats-server/server/events.go:249` | PORTED | `src/NATS.Server/Events/EventTypes.cs:9` | `EventServerInfo` — all fields present; `Flags` typed as `ulong` (Go `ServerCapability uint64`) |
| `ServerID` | `golang/nats-server/server/events.go:239` | PORTED | `src/NATS.Server/Events/EventTypes.cs:22` | Added `ServerID` DTO with `name`/`host`/`id` JSON fields for IDZ-style responses |
| `ServerCapability` (type + consts) | `golang/nats-server/server/events.go:246` | PORTED | `src/NATS.Server/Events/EventTypes.cs:10` | Added `[Flags] ServerCapability` enum with `JetStreamEnabled`, `BinaryStreamSnapshot`, and `AccountNRG` bits |
| `ClientInfo` | `golang/nats-server/server/events.go:308` | PORTED | `src/NATS.Server/Events/EventTypes.cs:62` | `EventClientInfo` — all fields present; RTT stored as `long RttNanos` vs Go `time.Duration` |
| `ServerStats` | `golang/nats-server/server/events.go:364` | PORTED | `src/NATS.Server/Events/EventTypes.cs:395` | `ServerStatsData` — full field parity; .NET adds `InMsgs/OutMsgs/InBytes/OutBytes` compat fields not in Go (extra, not missing) |
| `RouteStat` | `golang/nats-server/server/events.go:390` | PORTED | `src/NATS.Server/Events/EventTypes.cs:303` | Full field parity |
| `GatewayStat` | `golang/nats-server/server/events.go:398` | PORTED | `src/NATS.Server/Events/EventTypes.cs:326` | Full field parity |
| `MsgBytes` | `golang/nats-server/server/events.go:407` | PORTED | `src/NATS.Server/Events/EventTypes.cs:181` | `MsgBytesStats` — same fields |
| `DataStats` | `golang/nats-server/server/events.go:412` | PORTED | `src/NATS.Server/Events/EventTypes.cs:156` | Full field parity |
| `EventFilterOptions` | `golang/nats-server/server/events.go:1946` | PORTED | `src/NATS.Server/Events/EventTypes.cs:929` | Added shared filter DTO with name/cluster/host/tags/domain fields |
| `StatszEventOptions` | `golang/nats-server/server/events.go:1956` | PORTED | `src/NATS.Server/Events/EventTypes.cs:952` | Added typed options wrapper inheriting `EventFilterOptions` |
| `AccInfoEventOptions` | `golang/nats-server/server/events.go:1962` | PORTED | `src/NATS.Server/Events/EventTypes.cs:953` | Added typed options wrapper inheriting `EventFilterOptions` |
| `ConnzEventOptions` | `golang/nats-server/server/events.go:1968` | PORTED | `src/NATS.Server/Events/EventTypes.cs:954` | Added typed options wrapper inheriting `EventFilterOptions` |
| `RoutezEventOptions` | `golang/nats-server/server/events.go:1974` | PORTED | `src/NATS.Server/Events/EventTypes.cs:955` | Added typed options wrapper inheriting `EventFilterOptions` |
| `SubszEventOptions` | `golang/nats-server/server/events.go:1980` | PORTED | `src/NATS.Server/Events/EventTypes.cs:956` | Added typed options wrapper inheriting `EventFilterOptions` |
| `VarzEventOptions` | `golang/nats-server/server/events.go:1986` | PORTED | `src/NATS.Server/Events/EventTypes.cs:957` | Added typed options wrapper inheriting `EventFilterOptions` |
| `GatewayzEventOptions` | `golang/nats-server/server/events.go:1992` | PORTED | `src/NATS.Server/Events/EventTypes.cs:958` | Added typed options wrapper inheriting `EventFilterOptions` |
| `LeafzEventOptions` | `golang/nats-server/server/events.go:1997` | PORTED | `src/NATS.Server/Events/EventTypes.cs:959` | Added typed options wrapper inheriting `EventFilterOptions` |
| `AccountzEventOptions` | `golang/nats-server/server/events.go:2004` | PORTED | `src/NATS.Server/Events/EventTypes.cs:960` | Added typed options wrapper inheriting `EventFilterOptions` |
| `AccountStatzEventOptions` | `golang/nats-server/server/events.go:2010` | PORTED | `src/NATS.Server/Events/EventTypes.cs:961` | Added typed options wrapper inheriting `EventFilterOptions` |
| `JszEventOptions` | `golang/nats-server/server/events.go:2016` | PORTED | `src/NATS.Server/Events/EventTypes.cs:962` | Added typed options wrapper inheriting `EventFilterOptions` |
| `HealthzEventOptions` | `golang/nats-server/server/events.go:2022` | PORTED | `src/NATS.Server/Events/EventTypes.cs:963` | Added typed options wrapper inheriting `EventFilterOptions` |
| `ProfilezEventOptions` | `golang/nats-server/server/events.go:2028` | PORTED | `src/NATS.Server/Events/EventTypes.cs:964` | Added typed options wrapper inheriting `EventFilterOptions` |
| `ExpvarzEventOptions` | `golang/nats-server/server/events.go:2034` | PORTED | `src/NATS.Server/Events/EventTypes.cs:965` | Added typed options wrapper inheriting `EventFilterOptions` |
| `IpqueueszEventOptions` | `golang/nats-server/server/events.go:2039` | PORTED | `src/NATS.Server/Events/EventTypes.cs:966` | Added typed options wrapper inheriting `EventFilterOptions` |
| `RaftzEventOptions` | `golang/nats-server/server/events.go:2045` | PORTED | `src/NATS.Server/Events/EventTypes.cs:967` | Added typed options wrapper inheriting `EventFilterOptions` |
| `ServerAPIResponse` | `golang/nats-server/server/events.go:2092` | PORTED | `src/NATS.Server/Events/EventTypes.cs:988` | Added generic request/reply envelope with `server`, `data`, and `error` payload |
| `ServerAPIConnzResponse` | `golang/nats-server/server/events.go:2106` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1003` | Added typed server API response wrapper |
| `ServerAPIRoutezResponse` | `golang/nats-server/server/events.go:2113` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1004` | Added typed server API response wrapper |
| `ServerAPIGatewayzResponse` | `golang/nats-server/server/events.go:2119` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1005` | Added typed server API response wrapper |
| `ServerAPIJszResponse` | `golang/nats-server/server/events.go:2126` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1006` | Added typed server API response wrapper |
| `ServerAPIHealthzResponse` | `golang/nats-server/server/events.go:2133` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1007` | Added typed server API response wrapper |
| `ServerAPIVarzResponse` | `golang/nats-server/server/events.go:2141` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1008` | Added typed server API response wrapper |
| `ServerAPISubszResponse` | `golang/nats-server/server/events.go:2148` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1009` | Added typed server API response wrapper |
| `ServerAPILeafzResponse` | `golang/nats-server/server/events.go:2155` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1010` | Added typed server API response wrapper |
| `ServerAPIAccountzResponse` | `golang/nats-server/server/events.go:2162` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1011` | Added typed server API response wrapper |
| `ServerAPIExpvarzResponse` | `golang/nats-server/server/events.go:2169` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1012` | Added typed server API response wrapper |
| `ServerAPIpqueueszResponse` | `golang/nats-server/server/events.go:2175` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1013` | Added typed server API response wrapper |
| `ServerAPIRaftzResponse` | `golang/nats-server/server/events.go:2183` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1014` | Added typed server API response wrapper |
| `KickClientReq` | `golang/nats-server/server/events.go:3180` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1020` | Added request DTO with `cid` payload field |
| `LDMClientReq` | `golang/nats-server/server/events.go:3184` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1030` | Added request DTO with `cid` payload field |
| `UserInfo` | `golang/nats-server/server/events.go:1500` | PORTED | `src/NATS.Server/Events/EventTypes.cs:1040` | Added direct user info DTO with user/account/permissions fields |
| `SlowConsumersStats` | `golang/nats-server/server/events.go:377` | PORTED | `src/NATS.Server/Events/EventTypes.cs:344` | Full field parity |
| `StaleConnectionStats` | `golang/nats-server/server/events.go:379` | PORTED | `src/NATS.Server/Events/EventTypes.cs:363` | Full field parity |

### events.go — Unexported Types (Important Helpers)

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `internal` struct | `golang/nats-server/server/events.go:124` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:83` | `InternalEventSystem` class — same responsibilities: send/receive queues, sequence counter, SID counter, callback registry, server hash |
| `inSysMsg` struct | `golang/nats-server/server/events.go:112` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:29` | `InternalSystemMessage` sealed class — same fields |
| `pubMsg` struct | `golang/nats-server/server/events.go:421` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:15` | `PublishMessage` sealed class — same fields |
| `sysMsgHandler` type | `golang/nats-server/server/events.go:109` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:67` | `SystemMessageHandler` delegate — same signature shape |
| `serverUpdate` struct | `golang/nats-server/server/events.go:461` | MISSING | — | Tracks seq + ltime for remote server heartbeat ordering; no .NET equivalent |
| `accNumConnsReq` struct | `golang/nats-server/server/events.go:233` | PORTED | `src/NATS.Server/Events/EventTypes.cs:797` | `AccNumConnsReq` — full field parity |
| `accNumSubsReq` struct | `golang/nats-server/server/events.go:2966` | PORTED | `src/NATS.Server/Events/EventTypes.cs:916` | Added account subscription-count request DTO with server + account fields |
| `compressionType` + consts | `golang/nats-server/server/events.go:2082` | PORTED | `src/NATS.Server/Events/EventCompressor.cs:13` | Added `EventCompressionType` enum with `None`, `Gzip`, `Snappy`, and `Unsupported`; compressor now supports both Snappy and Gzip encode/decode paths. |
| `msgHandler` type | `golang/nats-server/server/events.go:2751` | NOT_APPLICABLE | — | Go internal callback type merging header+body bytes; .NET uses the `SystemMessageHandler` delegate with separate header/body params |

### events.go — Exported Methods on ServerInfo

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `(*ServerInfo).SetJetStreamEnabled()` | `golang/nats-server/server/events.go:274` | PORTED | `src/NATS.Server/Events/EventTypes.cs:86` | Added helper to set `JetStream` and capability flag atomically for parity |
| `(*ServerInfo).JetStreamEnabled()` bool | `golang/nats-server/server/events.go:281` | PORTED | `src/NATS.Server/Events/EventTypes.cs:92` | Added flag-check helper using typed `ServerCapability.JetStreamEnabled` |
| `(*ServerInfo).SetBinaryStreamSnapshot()` | `golang/nats-server/server/events.go:287` | PORTED | `src/NATS.Server/Events/EventTypes.cs:95` | Added capability setter for binary stream snapshot support |
| `(*ServerInfo).BinaryStreamSnapshot()` bool | `golang/nats-server/server/events.go:292` | PORTED | `src/NATS.Server/Events/EventTypes.cs:98` | Added capability getter for binary stream snapshot support |
| `(*ServerInfo).SetAccountNRG()` | `golang/nats-server/server/events.go:297` | PORTED | `src/NATS.Server/Events/EventTypes.cs:101` | Added capability setter for account NRG support |
| `(*ServerInfo).AccountNRG()` bool | `golang/nats-server/server/events.go:302` | PORTED | `src/NATS.Server/Events/EventTypes.cs:104` | Added capability getter for account NRG support |

### events.go — Unexported Methods on ClientInfo

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `(*ClientInfo).forAssignmentSnap()` | `golang/nats-server/server/events.go:334` | NOT_APPLICABLE | — | Internal helper for RAFT assignment snapshots; no JetStream clustering yet |
| `(*ClientInfo).forProposal()` | `golang/nats-server/server/events.go:343` | NOT_APPLICABLE | — | Internal helper for RAFT proposals; no JetStream clustering yet |
| `(*ClientInfo).forAdvisory()` | `golang/nats-server/server/events.go:353` | MISSING | — | Strips JWT/Alternates for JS advisory events; no .NET equivalent |

### events.go — Server Methods (Core Event System)

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `(*Server).EventsEnabled()` | `golang/nats-server/server/events.go:807` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:125` | `InternalEventSystem.Start()` activates the system; no public boolean property equivalent on NatsServer |
| `(*Server).TrackedRemoteServers()` | `golang/nats-server/server/events.go:821` | MISSING | — | No .NET equivalent |
| `(*Server).Node()` | `golang/nats-server/server/events.go:1157` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:103` | `ServerHash` property computes SHA-256(8-char) server hash; not exposed as `Node()` on server |
| `(*Server).internalSendLoop()` | `golang/nats-server/server/events.go:495` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:363` | `InternalSendLoopAsync` — Channel-based; handles JSON serialization and SubList delivery |
| `(*Server).internalReceiveLoop()` | `golang/nats-server/server/events.go:476` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:431` | `InternalReceiveLoopAsync` — Channel-based dispatch |
| `(*Server).sendLDMShutdownEventLocked()` | `golang/nats-server/server/events.go:674` | MISSING | — | No .NET equivalent |
| `(*Server).sendShutdownEvent()` | `golang/nats-server/server/events.go:684` | MISSING | — | No .NET equivalent; `LameDuckEventMsg` / `ShutdownEventMsg` types exist but publishing method does not |
| `(*Server).sendInternalAccountMsg()` | `golang/nats-server/server/events.go:703` | MISSING | — | No .NET equivalent |
| `(*Server).sendInternalAccountMsgWithReply()` | `golang/nats-server/server/events.go:708` | MISSING | — | No .NET equivalent |
| `(*Server).sendInternalAccountSysMsg()` | `golang/nats-server/server/events.go:732` | MISSING | — | No .NET equivalent |
| `(*Server).sendInternalMsgLocked()` | `golang/nats-server/server/events.go:750` | MISSING | — | No .NET equivalent |
| `(*Server).sendInternalMsg()` | `golang/nats-server/server/events.go:758` | MISSING | — | No .NET equivalent |
| `(*Server).sendInternalResponse()` | `golang/nats-server/server/events.go:766` | MISSING | — | No .NET equivalent |
| `(*Server).initEventTracking()` | `golang/nats-server/server/events.go:1172` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:150` | `InitEventTracking` registers VARZ/HEALTHZ/SUBSZ/STATSZ/IDZ; missing: account-level services (CONNZ, LEAFZ, JSZ, STATZ, CONNS, INFO), latency tracking, reload/kick/LDM services, NSUBS, debug subscribers |
| `(*Server).sendStatsz()` | `golang/nats-server/server/events.go:891` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:188` | `PublishServerStats()` — publishes stats; missing: interest check before sending, gzip/snappy compression on response, JetStream stats section |
| `(*Server).limitStatsz()` | `golang/nats-server/server/events.go:1068` | MISSING | — | Rate-limit for statsz broadcasts; no .NET equivalent |
| `(*Server).heartbeatStatsz()` | `golang/nats-server/server/events.go:1098` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:134` | Periodic timer in `Start()` fires every 10s; Go ramps from 250ms to statsz interval |
| `(*Server).resetLastStatsz()` | `golang/nats-server/server/events.go:1115` | MISSING | — | No .NET equivalent |
| `(*Server).sendStatszUpdate()` | `golang/nats-server/server/events.go:1119` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:188` | Effectively `PublishServerStats()` |
| `(*Server).startStatszTimer()` | `golang/nats-server/server/events.go:1124` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:134` | Timer started in `Start()`; Go does exponential backoff ramp-up; .NET is fixed 10s interval |
| `(*Server).startRemoteServerSweepTimer()` | `golang/nats-server/server/events.go:1133` | MISSING | — | Orphan remote server sweep; no .NET equivalent |
| `(*Server).checkRemoteServers()` | `golang/nats-server/server/events.go:832` | MISSING | — | No .NET equivalent |
| `(*Server).updateServerUsage()` | `golang/nats-server/server/events.go:848` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:193` | CPU via `Process.GetCurrentProcess()`; Go uses `pse.ProcUsage()` for actual CPU%; .NET does not populate CPU |
| `(*Server).sendAccConnsUpdate()` | `golang/nats-server/server/events.go:2407` | MISSING | — | No .NET equivalent |
| `(*Server).accConnsUpdate()` | `golang/nats-server/server/events.go:2506` | MISSING | — | No .NET equivalent |
| `(*Server).nextEventID()` | `golang/nats-server/server/events.go:2516` | PARTIAL | `src/NATS.Server/Events/EventTypes.cs:943` | `EventBuilder.GenerateEventId()` uses `Guid.NewGuid()`; Go uses nuid (faster nano-ID generator) |
| `(*Server).accountConnectEvent()` | `golang/nats-server/server/events.go:2522` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:322` | Extended `ConnectEventDetail` and event mapping to include JWT/issuer/tags/name-tag/kind/client-type/MQTT client id parity fields |
| `(*Server).accountDisconnectEvent()` | `golang/nats-server/server/events.go:2569` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:355` | Extended `DisconnectEventDetail` and event mapping to include RTT + JWT/issuer/tags/name-tag/kind/client-type/MQTT client id parity fields |
| `(*Server).sendAuthErrorEvent()` | `golang/nats-server/server/events.go:2631` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:277` | `SendAuthErrorEvent()` exists; Go uses `DisconnectEventMsg` shape for auth errors (surprising but correct); .NET uses `AuthErrorEventMsg` with different schema type |
| `(*Server).sendAccountAuthErrorEvent()` | `golang/nats-server/server/events.go:2690` | MISSING | — | Account-level auth error event to account subject; no .NET equivalent |
| `(*Server).sendOCSPPeerRejectEvent()` | `golang/nats-server/server/events.go:3267` | PARTIAL | `src/NATS.Server/Events/EventTypes.cs:612` | `OcspEventBuilder.BuildPeerReject()` helper exists; no publishing method on server; missing `Peer` CertInfo payload |
| `(*Server).sendOCSPPeerChainlinkInvalidEvent()` | `golang/nats-server/server/events.go:3300` | MISSING | — | No .NET equivalent at all; `OcspChainValidationEvent` is a different/new type with non-matching Go advisory shape |
| `(*Server).filterRequest()` | `golang/nats-server/server/events.go:2052` | MISSING | — | Server-side filter by name/host/cluster/tags/domain for Z-endpoint requests; no .NET equivalent |
| `(*Server).zReq()` | `golang/nats-server/server/events.go:2252` | MISSING | — | Generic Z request handler (parse options, filter, call respf, encode response); no .NET equivalent |
| `(*Server).statszReq()` | `golang/nats-server/server/events.go:2190` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:159` | `HandleStatszRequest` registered but implementation thin — no filter options parsing |
| `(*Server).idzReq()` | `golang/nats-server/server/events.go:2217` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:156` | `HandleIdzRequest` registered; no implementation visible in analyzed files |
| `(*Server).remoteConnsUpdate()` | `golang/nats-server/server/events.go:2283` | MISSING | — | No .NET equivalent |
| `(*Server).remoteServerUpdate()` | `golang/nats-server/server/events.go:1704` | MISSING | — | No .NET equivalent |
| `(*Server).remoteServerShutdown()` | `golang/nats-server/server/events.go:1665` | MISSING | — | No .NET equivalent |
| `(*Server).updateRemoteServer()` | `golang/nats-server/server/events.go:1763` | MISSING | — | No .NET equivalent |
| `(*Server).processRemoteServerShutdown()` | `golang/nats-server/server/events.go:1642` | MISSING | — | No .NET equivalent |
| `(*Server).processNewServer()` | `golang/nats-server/server/events.go:1781` | MISSING | — | No .NET equivalent |
| `(*Server).updateNRGAccountStatus()` | `golang/nats-server/server/events.go:1816` | NOT_APPLICABLE | — | JetStream NRG (RAFT) account status; not yet ported |
| `(*Server).ensureGWsInterestOnlyForLeafNodes()` | `golang/nats-server/server/events.go:1838` | NOT_APPLICABLE | — | Gateway + leaf node coordination; not yet ported |
| `(*Server).shutdownEventing()` | `golang/nats-server/server/events.go:1852` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:453` | `DisposeAsync()` cancels loops and drains queues; missing: clearing accounts' eventing state, sending shutdown event before draining |
| `(*Server).connsRequest()` | `golang/nats-server/server/events.go:1886` | MISSING | — | No .NET equivalent |
| `(*Server).leafNodeConnected()` | `golang/nats-server/server/events.go:1925` | NOT_APPLICABLE | — | Leaf node gateway interest mode; not yet ported |
| `(*Server).addSystemAccountExports()` | `golang/nats-server/server/events.go:1556` | NOT_APPLICABLE | — | Multi-tenant account exports; not yet ported |
| `(*Server).registerSystemImports()` | `golang/nats-server/server/events.go:2331` | NOT_APPLICABLE | — | Multi-tenant account imports; not yet ported |
| `(*Server).registerSystemImportsForExisting()` | `golang/nats-server/server/events.go:1532` | NOT_APPLICABLE | — | Multi-tenant; not yet ported |
| `(*Server).enableAccountTracking()` | `golang/nats-server/server/events.go:2366` | MISSING | — | No .NET equivalent |
| `(*Server).sendLeafNodeConnect()` | `golang/nats-server/server/events.go:2383` | NOT_APPLICABLE | — | Leaf node; not yet ported |
| `(*Server).sendLeafNodeConnectMsg()` | `golang/nats-server/server/events.go:2398` | NOT_APPLICABLE | — | Leaf node; not yet ported |
| `(*Server).accountClaimUpdate()` | `golang/nats-server/server/events.go:1608` | NOT_APPLICABLE | — | JWT account claim update; not yet ported |
| `(*Server).userInfoReq()` | `golang/nats-server/server/events.go:1508` | MISSING | — | No .NET equivalent |
| `(*Server).debugSubscribers()` | `golang/nats-server/server/events.go:3001` | MISSING | — | No .NET equivalent |
| `(*Server).nsubsRequest()` | `golang/nats-server/server/events.go:3129` | MISSING | — | No .NET equivalent |
| `(*Server).reloadConfig()` | `golang/nats-server/server/events.go:3168` | MISSING | — | No .NET equivalent |
| `(*Server).kickClient()` | `golang/nats-server/server/events.go:3188` | MISSING | — | No .NET equivalent |
| `(*Server).ldmClient()` | `golang/nats-server/server/events.go:3206` | MISSING | — | No .NET equivalent |
| `(*Server).sysSubscribe()` | `golang/nats-server/server/events.go:2796` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:231` | `SysSubscribe()` — same purpose |
| `(*Server).sysSubscribeQ()` | `golang/nats-server/server/events.go:2801` | MISSING | — | Queue-group variant; no .NET equivalent |
| `(*Server).sysSubscribeInternal()` | `golang/nats-server/server/events.go:2806` | MISSING | — | Internal-only sub (no interest propagation); no .NET equivalent |
| `(*Server).systemSubscribe()` | `golang/nats-server/server/events.go:2810` | PARTIAL | `src/NATS.Server/Events/InternalEventSystem.cs:231` | `SysSubscribe()` combines subscribe + callback registration; Go version supports queue groups and internal-only flag |
| `(*Server).sysUnsubscribe()` | `golang/nats-server/server/events.go:2842` | MISSING | — | No .NET equivalent |
| `(*Server).inboxReply()` | `golang/nats-server/server/events.go:2928` | MISSING | — | WC inbox reply dispatcher; no .NET equivalent |
| `(*Server).newRespInbox()` | `golang/nats-server/server/events.go:2953` | MISSING | — | No .NET equivalent |
| `(*Server).remoteLatencyUpdate()` | `golang/nats-server/server/events.go:2870` | NOT_APPLICABLE | — | Service latency tracking; not yet ported |
| `(*Server).noInlineCallback()` | `golang/nats-server/server/events.go:2760` | NOT_APPLICABLE | — | Routes callback through recvq to avoid blocking route/GW threads; .NET Channel already provides this decoupling |
| `(*Server).noInlineCallbackStatsz()` | `golang/nats-server/server/events.go:2766` | NOT_APPLICABLE | — | Same — statsz queue variant |
| `(*Server).wrapChk()` | `golang/nats-server/server/events.go:3253` | NOT_APPLICABLE | — | Lock + eventsEnabled guard wrapper; idiom not needed in async .NET code |
| `(*Server).sameDomain()` | `golang/nats-server/server/events.go:1660` | MISSING | — | No .NET equivalent |

### events.go — Standalone / Package-Level Functions

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `getHash()` | `golang/nats-server/server/events.go:1141` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:118` | SHA-256 8-char hash; same algorithm |
| `getHashSize()` | `golang/nats-server/server/events.go:1146` | PORTED | `src/NATS.Server/Events/InternalEventSystem.cs:143` | Added `GetHashSize()` and size-aware `GetHash(string, int)` helpers; constructor now uses them for server hash generation |
| `routeStat()` | `golang/nats-server/server/events.go:859` | NOT_APPLICABLE | — | Route stat collection; clustering not yet ported |
| `newPubMsg()` | `golang/nats-server/server/events.go:435` | NOT_APPLICABLE | — | Pool-based pubMsg factory; .NET uses `PublishMessage` record without pooling |
| `(*pubMsg).returnToPool()` | `golang/nats-server/server/events.go:452` | NOT_APPLICABLE | — | Pool return; .NET has no pool |
| `accForClient()` | `golang/nats-server/server/events.go:3224` | MISSING | — | No .NET equivalent |
| `issuerForClient()` | `golang/nats-server/server/events.go:3232` | MISSING | — | No .NET equivalent |
| `clearTimer()` | `golang/nats-server/server/events.go:3244` | NOT_APPLICABLE | — | Go timer management idiom; .NET uses `PeriodicTimer` / `CancellationToken` |
| `totalSubs()` | `golang/nats-server/server/events.go:2973` | MISSING | — | No .NET equivalent |
| `remoteLatencySubjectForResponse()` | `golang/nats-server/server/events.go:2860` | NOT_APPLICABLE | — | Latency tracking; not yet ported |
| `getAcceptEncoding()` | `golang/nats-server/server/events.go:2238` | PORTED | `src/NATS.Server/Events/EventCompressor.cs:192` | Added `EventCompressor.GetAcceptEncoding(string?)` parser: prefers `snappy`/`s2`, falls back to `gzip`, otherwise `unsupported`, matching Go behavior. |
| `(*Account).statz()` | `golang/nats-server/server/events.go:2446` | NOT_APPLICABLE | — | Account stats snapshot; Account class not yet in Events module |

### events.go — Constants / Subjects

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `connectEventSubj` | `golang/nats-server/server/events.go:49` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:13` | `ConnectEvent` — matching subject pattern |
| `disconnectEventSubj` | `golang/nats-server/server/events.go:50` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:14` | `DisconnectEvent` — matching |
| `accConnsEventSubjNew` | `golang/nats-server/server/events.go:58` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:15` | `AccountConnsNew` — matching |
| `accConnsEventSubjOld` | `golang/nats-server/server/events.go:59` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:16` | `AccountConnsOld` — matching |
| `serverStatsSubj` | `golang/nats-server/server/events.go:66` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:19` | `ServerStats` — matching |
| `shutdownEventSubj` | `golang/nats-server/server/events.go:61` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:20` | `ServerShutdown` — matching |
| `lameDuckEventSubj` | `golang/nats-server/server/events.go:60` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:21` | `ServerLameDuck` — matching |
| `authErrorEventSubj` | `golang/nats-server/server/events.go:64` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:22` | `AuthError` — matching |
| `authErrorAccountEventSubj` | `golang/nats-server/server/events.go:65` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:23` | `AuthErrorAccount` — matching |
| `serverDirectReqSubj` | `golang/nats-server/server/events.go:67` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:32` | `ServerReq` — matching |
| `serverPingReqSubj` | `golang/nats-server/server/events.go:68` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:35` | `ServerPing` — matching |
| `accDirectReqSubj` | `golang/nats-server/server/events.go:51` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:38` | `AccountReq` — matching |
| `inboxRespSubj` | `golang/nats-server/server/events.go:73` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:41` | `InboxResponse` — matching |
| `ocspPeerRejectEventSubj` | `golang/nats-server/server/events.go:95` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:54` | Corrected to `$SYS.SERVER.{0}.OCSP.PEER.CONN.REJECT` |
| `ocspPeerChainlinkInvalidEventSubj` | `golang/nats-server/server/events.go:96` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:55` | Added `$SYS.SERVER.{0}.OCSP.PEER.LINK.INVALID` subject constant |
| `leafNodeConnectEventSubj` | `golang/nats-server/server/events.go:71` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:28` | Corrected to account-scoped subject `$SYS.ACCOUNT.{0}.LEAFNODE.CONNECT` |
| `remoteLatencyEventSubj` | `golang/nats-server/server/events.go:72` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:30` | Added remote latency response subject constant |
| `userDirectInfoSubj` | `golang/nats-server/server/events.go:76` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:40` | Added user info request subject constant |
| `userDirectReqSubj` | `golang/nats-server/server/events.go:77` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:41` | Added per-user direct info request subject constant |
| `accNumSubsReqSubj` | `golang/nats-server/server/events.go:81` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:42` | Added account subscription-count request subject constant |
| `accSubsSubj` | `golang/nats-server/server/events.go:84` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:43` | Added account subscription-count response subject constant |
| `clientKickReqSubj` | `golang/nats-server/server/events.go:62` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:44` | Added kick-client request subject constant |
| `clientLDMReqSubj` | `golang/nats-server/server/events.go:63` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:45` | Added lame-duck-mode client request subject constant |
| `serverStatsPingReqSubj` | `golang/nats-server/server/events.go:69` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:46` | Added wildcard statsz ping request subject constant |
| `serverReloadReqSubj` | `golang/nats-server/server/events.go:70` | PORTED | `src/NATS.Server/Events/EventSubjects.cs:47` | Added server reload request subject constant |
| `accPingReqSubj` | `golang/nats-server/server/events.go:52` | MISSING | — | No .NET equivalent |
| `connsRespSubj` | `golang/nats-server/server/events.go:57` | MISSING | — | No .NET equivalent |
| `accLookupReqSubj` / JWT subjects | `golang/nats-server/server/events.go:43` | NOT_APPLICABLE | — | JWT operator resolver subjects; not yet ported |
| `InboxPrefix` | `golang/nats-server/server/events.go:2946` | MISSING | — | No .NET equivalent |
| `acceptEncodingHeader` / `contentEncodingHeader` | `golang/nats-server/server/events.go:2232` | PORTED | `src/NATS.Server/Events/EventCompressor.cs:28` | Added `AcceptEncodingHeader` and `ContentEncodingHeader` constants for compression negotiation headers. |
| `ConnectEventMsgType` | `golang/nats-server/server/events.go:163` | PORTED | `src/NATS.Server/Events/EventTypes.cs:193` | `ConnectEventMsg.EventType` constant — matching value |
| `DisconnectEventMsgType` | `golang/nats-server/server/events.go:177` | PORTED | `src/NATS.Server/Events/EventTypes.cs:214` | `DisconnectEventMsg.EventType` — matching value |
| `OCSPPeerRejectEventMsgType` | `golang/nats-server/server/events.go:191` | PORTED | `src/NATS.Server/Events/EventTypes.cs:522` | `OcspPeerRejectEventMsg.EventType` — matching value |
| `OCSPPeerChainlinkInvalidEventMsgType` | `golang/nats-server/server/events.go:205` | PORTED | `src/NATS.Server/Events/EventTypes.cs:626` | Added `OcspPeerChainlinkInvalidEventMsg.EventType` constant with matching advisory type |
| `AccountNumConnsMsgType` | `golang/nats-server/server/events.go:229` | PORTED | `src/NATS.Server/Events/EventTypes.cs:247` | `AccountNumConns.EventType` — matching value |

---

### msgtrace.go — Exported Types

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `MsgTraceType` | `golang/nats-server/server/msgtrace.go:50` | MISSING | — | No .NET equivalent |
| `MsgTraceEvent` | `golang/nats-server/server/msgtrace.go:63` | MISSING | — | Top-level trace event container; no .NET equivalent |
| `MsgTraceRequest` | `golang/nats-server/server/msgtrace.go:70` | MISSING | — | No .NET equivalent |
| `MsgTraceEvents` | `golang/nats-server/server/msgtrace.go:76` | MISSING | — | Slice type with custom UnmarshalJSON; no .NET equivalent |
| `MsgTrace` | `golang/nats-server/server/msgtrace.go:78` | MISSING | — | Interface; no .NET equivalent |
| `MsgTraceBase` | `golang/nats-server/server/msgtrace.go:83` | MISSING | — | No .NET equivalent |
| `MsgTraceIngress` | `golang/nats-server/server/msgtrace.go:88` | MISSING | — | No .NET equivalent |
| `MsgTraceSubjectMapping` | `golang/nats-server/server/msgtrace.go:98` | MISSING | — | No .NET equivalent |
| `MsgTraceStreamExport` | `golang/nats-server/server/msgtrace.go:103` | MISSING | — | No .NET equivalent |
| `MsgTraceServiceImport` | `golang/nats-server/server/msgtrace.go:109` | MISSING | — | No .NET equivalent |
| `MsgTraceJetStream` | `golang/nats-server/server/msgtrace.go:116` | MISSING | — | No .NET equivalent |
| `MsgTraceEgress` | `golang/nats-server/server/msgtrace.go:124` | MISSING | — | No .NET equivalent |

### msgtrace.go — Exported Constants

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `MsgTraceDest` | `golang/nats-server/server/msgtrace.go:28` | MISSING | — | Header name constant; no .NET equivalent |
| `MsgTraceDestDisabled` | `golang/nats-server/server/msgtrace.go:29` | MISSING | — | No .NET equivalent |
| `MsgTraceHop` | `golang/nats-server/server/msgtrace.go:30` | MISSING | — | No .NET equivalent |
| `MsgTraceOriginAccount` | `golang/nats-server/server/msgtrace.go:31` | MISSING | — | No .NET equivalent |
| `MsgTraceOnly` | `golang/nats-server/server/msgtrace.go:32` | MISSING | — | No .NET equivalent |
| `MsgTraceIngressType` | `golang/nats-server/server/msgtrace.go:55` | MISSING | — | No .NET equivalent |
| `MsgTraceSubjectMappingType` | `golang/nats-server/server/msgtrace.go:56` | MISSING | — | No .NET equivalent |
| `MsgTraceStreamExportType` | `golang/nats-server/server/msgtrace.go:57` | MISSING | — | No .NET equivalent |
| `MsgTraceServiceImportType` | `golang/nats-server/server/msgtrace.go:58` | MISSING | — | No .NET equivalent |
| `MsgTraceJetStreamType` | `golang/nats-server/server/msgtrace.go:59` | MISSING | — | No .NET equivalent |
| `MsgTraceEgressType` | `golang/nats-server/server/msgtrace.go:60` | MISSING | — | No .NET equivalent |

### msgtrace.go — Exported Methods on MsgTraceEvent

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `(*MsgTraceEvent).Ingress()` | `golang/nats-server/server/msgtrace.go:193` | MISSING | — | No .NET equivalent |
| `(*MsgTraceEvent).SubjectMapping()` | `golang/nats-server/server/msgtrace.go:200` | MISSING | — | No .NET equivalent |
| `(*MsgTraceEvent).StreamExports()` | `golang/nats-server/server/msgtrace.go:209` | MISSING | — | No .NET equivalent |
| `(*MsgTraceEvent).ServiceImports()` | `golang/nats-server/server/msgtrace.go:219` | MISSING | — | No .NET equivalent |
| `(*MsgTraceEvent).JetStream()` | `golang/nats-server/server/msgtrace.go:229` | MISSING | — | No .NET equivalent |
| `(*MsgTraceEvent).Egresses()` | `golang/nats-server/server/msgtrace.go:238` | MISSING | — | No .NET equivalent |
| `(*MsgTraceEvents).UnmarshalJSON()` | `golang/nats-server/server/msgtrace.go:160` | MISSING | — | Polymorphic JSON deserialization of trace event list; no .NET equivalent |

### msgtrace.go — Unexported Core Functions (>20 lines)

| Go Symbol | Go File:Line | Status | .NET Equivalent | Notes |
|-----------|:-------------|--------|:----------------|-------|
| `(*client).initMsgTrace()` | `golang/nats-server/server/msgtrace.go:332` | MISSING | — | Trace header parsing and msgTrace struct initialization; no .NET equivalent |
| `(*client).isMsgTraceEnabled()` | `golang/nats-server/server/msgtrace.go:285` | MISSING | — | No .NET equivalent |
| `(*client).msgTraceSupport()` | `golang/nats-server/server/msgtrace.go:295` | MISSING | — | No .NET equivalent |
| `(*client).initAndSendIngressErrEvent()` | `golang/nats-server/server/msgtrace.go:596` | MISSING | — | No .NET equivalent |
| `(*msgTrace).traceOnly()` | `golang/nats-server/server/msgtrace.go:626` | MISSING | — | No .NET equivalent |
| `(*msgTrace).setOriginAccountHeaderIfNeeded()` | `golang/nats-server/server/msgtrace.go:630` | MISSING | — | No .NET equivalent |
| `(*msgTrace).setHopHeader()` | `golang/nats-server/server/msgtrace.go:646` | MISSING | — | No .NET equivalent |
| `(*msgTrace).setIngressError()` | `golang/nats-server/server/msgtrace.go:657` | MISSING | — | No .NET equivalent |
| `(*msgTrace).addSubjectMappingEvent()` | `golang/nats-server/server/msgtrace.go:663` | MISSING | — | No .NET equivalent |
| `(*msgTrace).addEgressEvent()` | `golang/nats-server/server/msgtrace.go:676` | MISSING | — | No .NET equivalent |
| `(*msgTrace).addStreamExportEvent()` | `golang/nats-server/server/msgtrace.go:713` | MISSING | — | No .NET equivalent |
| `(*msgTrace).addServiceImportEvent()` | `golang/nats-server/server/msgtrace.go:730` | MISSING | — | No .NET equivalent |
| `(*msgTrace).addJetStreamEvent()` | `golang/nats-server/server/msgtrace.go:745` | MISSING | — | No .NET equivalent |
| `(*msgTrace).updateJetStreamEvent()` | `golang/nats-server/server/msgtrace.go:759` | MISSING | — | No .NET equivalent |
| `(*msgTrace).sendEventFromJetStream()` | `golang/nats-server/server/msgtrace.go:774` | MISSING | — | No .NET equivalent |
| `(*msgTrace).sendEvent()` | `golang/nats-server/server/msgtrace.go:788` | MISSING | — | No .NET equivalent |
| `genHeaderMapIfTraceHeadersPresent()` | `golang/nats-server/server/msgtrace.go:509` | MISSING | — | Parses raw NATS header bytes for trace headers; no .NET equivalent |
| `getConnName()` | `golang/nats-server/server/msgtrace.go:300` | MISSING | — | No .NET equivalent |
| `getCompressionType()` | `golang/nats-server/server/msgtrace.go:318` | MISSING | — | No .NET equivalent |
| `sample()` | `golang/nats-server/server/msgtrace.go:494` | MISSING | — | Probabilistic sampling for external trace; no .NET equivalent |

---

## Keeping This File Updated

After porting work is completed:

1. **Update status**: Change `MISSING → PORTED` or `PARTIAL → PORTED` for each item completed
2. **Add .NET path**: Fill in the ".NET Equivalent" column with the actual file:line
3. **Re-count LOC**: Update the LOC numbers in `stillmissing.md`:
   ```bash
   # Re-count .NET source LOC for this module
   find src/NATS.Server/Events/ -name '*.cs' -type f -exec cat {} + | wc -l
   # Re-count .NET test LOC for this module
   find tests/NATS.Server.Tests/Events/ -name '*.cs' -type f -exec cat {} + | wc -l
   ```
4. **Add a changelog entry** below with date and summary of what was ported
5. **Update the parity DB** if new test mappings were created:
   ```bash
   sqlite3 docs/test_parity.db "INSERT INTO test_mappings (go_test_id, dotnet_test_id, confidence, notes) VALUES (?, ?, 'manual', 'ported in YYYY-MM-DD session')"
   ```

## Change Log

| Date | Change | By |
|------|--------|----|
| 2026-02-26 | Ported events compression parity helpers: added typed compression enum, gzip/snappy encode-decode support, Accept-Encoding parser, and header-name constants with focused events compression tests. | codex |
| 2026-02-25 | File created with LLM analysis instructions | auto |
| 2026-02-25 | Full gap inventory populated from Go source analysis | auto |
| 2026-02-25 | Ported Events API option DTOs, server API response wrappers, OCSP peer/link advisory payloads, missing request subjects, account connect/disconnect parity fields, and hash-size helpers; validated with focused Events tests | codex |
