Joseph Doherty
8877df45c8
docs: add E2E cluster tests design and implementation plan
...
16 tests across 5 test files covering cluster resilience, RAFT consensus,
JetStream cluster replication, gateway failover, and leaf node failover.
2026-03-12 23:27:33 -04:00
Joseph Doherty
b5e1786ec2
docs: add E2E cluster & raft tests design document
2026-03-12 23:22:31 -04:00
Joseph Doherty
0e252d6ccf
docs: add E2E full gap coverage implementation plan
...
12 tasks covering all 3 priority tiers: monitoring, headers,
shutdown/drain, JetStream extensions, cluster, leaf node,
gateway, MQTT, WebSocket, and advanced feature tests.
2026-03-12 19:05:48 -04:00
Joseph Doherty
1f122bf56f
docs: add E2E full gap coverage design document
...
Covers all 3 priority tiers from e2e_gaps.md: monitoring,
headers, shutdown/drain, clustering, leaf nodes, gateways,
MQTT, WebSocket, JetStream extensions, and advanced features.
2026-03-12 18:59:32 -04:00
Joseph Doherty
fb19b50231
docs: add implementation plan for test project split
...
13 tasks: create TestUtilities, extract 9 subsystem test projects,
rename remainder to Core.Tests, final verification.
2026-03-12 14:26:58 -04:00
Joseph Doherty
6941d9275b
docs: add design doc for splitting NATS.Server.Tests into feature-focused projects
...
Splits the 609-file monolithic test project into 10 subsystem test projects
plus a shared TestUtilities library for developer ergonomics.
2026-03-12 14:23:06 -04:00
Joseph Doherty
c30e67a69d
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
2026-03-12 14:09:23 -04:00
Joseph Doherty
339c60bac6
docs: mark all remaining gaps as IMPLEMENTED in structuregaps.md
...
Updated gaps 1.5-1.10, 2.4, 2.7-2.12, 3.1, 3.5, 3.8-3.13, 7.1-7.6,
and 8.3-8.8 with IMPLEMENTED status, implementation file references,
task/phase numbers, and test file names. All 93 sub-gaps across 15
sections are now marked as IMPLEMENTED. Updated test count to 6,920.
2026-02-25 13:35:15 -05:00
Joseph Doherty
6f354baae9
docs: add implementation plan files for gap closure phases
...
Includes production gaps plan (15 gaps, 4 phases) and remaining gaps
plan task persistence file (93 gaps, 8 phases) — both fully executed.
2026-02-25 13:27:45 -05:00
Joseph Doherty
2cd71dba00
docs: update test_parity.db — 6,920 .NET tests registered (+1,006 new)
...
Added 1,006 new test entries from the 8-phase remaining gaps
implementation across JetStream, Auth, Routes, LeafNodes, Monitoring,
Events, Config, Gateway, WebSocket, and Internal test directories.
2026-02-25 13:27:40 -05:00
Joseph Doherty
5f50e12829
docs: mark all 93 remaining gaps as IMPLEMENTED in structuregaps.md
...
Updated all gap sections (3-15) with IMPLEMENTED status markers,
implementation file references, and test file names covering all
8 phases of the remaining gaps plan.
2026-02-25 13:25:37 -05:00
Joseph Doherty
9ac29fc6f5
docs: add 93-gap implementation plan (8 phases, Tasks 1-93)
...
Bottom-up dependency ordering: FileStore/RAFT → Cluster/API → Consumer/Stream → Client/MQTT → Config/Gateway → Route/LeafNode → Account → Monitoring/WebSocket. Full test suite every 2 phases.
2026-02-25 07:47:11 -05:00
Joseph Doherty
8e6a53b7c0
docs: add design for remaining 93 gaps across 8 phases
...
Bottom-up dependency ordering: FileStore+RAFT → Cluster+API →
Consumer+Stream → Client+MQTT → Config+Gateway → Route+LeafNode →
Account → Monitoring+WebSocket. Codex-reviewed with fixes for
async locks, token-based filtering, linearizable ReadIndex, and
golden fixture tests for wire format compatibility.
2026-02-25 06:09:43 -05:00
Joseph Doherty
69785b191e
docs: mark 29 production gaps as IMPLEMENTED in structuregaps.md
...
All Tier 1 (CRITICAL) and nearly all Tier 2 (HIGH) gaps closed by
the 27-task production gaps plan. Updated priority summary, test
counts (5,914 methods / ~6,532 parameterized), and overview.
2026-02-25 05:43:52 -05:00
Joseph Doherty
502481b6ba
docs: update test_parity.db — add production gaps test mappings
...
Added 106 new entries to dotnet_tests table covering 15 new test files
created during the production gaps implementation phase:
- JetStreamInflightTrackingTests (9), JetStreamLeadershipTests (7)
- RedeliveryTrackerPriorityQueueTests (8), AckProcessorEnhancedTests (9)
- WaitingRequestQueueTests (8), ConsumerPauseResumeTests (8)
- PriorityGroupPinningTests (7), InterestRetentionTests (7)
- MirrorSourceRetryTests (5), FlushCoalescingTests (5)
- StallGateTests (6), WriteTimeoutTests (6)
- MqttPersistenceTests (4), SignalHandlerTests (5)
- ImplicitDiscoveryTests (12)
Total dotnet_tests rows: 5808 → 5914
2026-02-25 03:54:31 -05:00
Joseph Doherty
6c268c4143
docs: remove inline mapping columns from go_tests and dotnet_tests
...
Drop redundant columns now that test_mappings is the single source of truth:
- go_tests: drop dotnet_test, dotnet_file
- dotnet_tests: drop go_test
- VACUUM to reclaim space
2026-02-25 00:25:12 -05:00
Joseph Doherty
8c8dab735c
docs: map 1,765 additional dotnet tests to Go counterparts
...
Multi-strategy matching:
- Source comment references (// Go: TestXxx): +1,477 mappings
- In-body Go test name references: +249 mappings
- Name similarity with keyword overlap: +368 mappings
- File-context + lower threshold for parity files: +133 mappings
Final state:
- 4,250 / 5,808 dotnet tests mapped (73.2%), up from 2,485 (42.8%)
- 1,558 remaining are genuinely original .NET tests with no Go equivalent
- 59,516 total test_mappings rows
2026-02-25 00:22:21 -05:00
Joseph Doherty
0317370665
docs: update structuregaps.md with current test counts
...
- Source: 39.1K lines, 215 files
- Tests: 5,808 methods (was 3,168), 2,485 linked to Go tests
- Fix stray 'comm' prefix in title
2026-02-25 00:18:44 -05:00
Joseph Doherty
3809a33bd5
docs: backfill all 2,646 Go test mappings in test_parity.db
...
- Fix dotnet_tests scan to handle [Theory]+[InlineData] patterns (was
extracting "InlineData" as test name instead of actual method)
- Rebuild test_mappings with multi-strategy matching: exact path, basename,
class-level, wildcard prefix (ClassName.Prefix*), (N tests) patterns,
fuzzy word overlap, and 31 hand-mapped renames
- All 2,646 mapped Go tests now have entries in test_mappings (was 177 missing)
- 2,485 dotnet tests linked back to Go tests, 5,808 total
- 57,289 total mapping rows
2026-02-25 00:16:05 -05:00
Joseph Doherty
e3dafebfea
docs: refresh test_parity.db — rebuild dotnet_tests and test_mappings
...
- Rescan dotnet_tests table: 3,491 → 5,818 entries matching current test suite
- Rebuild test_mappings join table from go_tests inline mappings (was junk auto data)
- 58,331 mapping rows, 2,469/2,646 Go tests covered, 2,312/5,818 dotnet tests covered
- Back-fill go_test column on dotnet_tests from test_mappings
- Preserve existing metadata (long_running, real_network, failing flags)
2026-02-25 00:10:46 -05:00
Joseph Doherty
f03e72654f
docs: fresh gap analysis and production gaps design
...
Rewrote structuregaps.md with function-by-function gap analysis
comparing current .NET implementation against Go reference.
Added design doc for Tier 1+2 gap closure across 4 phases:
FileStore+RAFT → JetStream Cluster → Consumer/Stream → Client/MQTT/Config.
2026-02-25 00:09:54 -05:00
Joseph Doherty
9bea1956af
docs: clear all failing test flags — 0 remaining
2026-02-25 00:01:21 -05:00
Joseph Doherty
9b9b4d42c3
docs: update test_parity.db — clear 6 fixed failures, 3 remaining
2026-02-25 00:00:12 -05:00
Joseph Doherty
1f83df12e4
docs: add dotnet_tests metadata columns and mark 9 failing tests
...
Add long_running, real_network, test_project, and failing columns to
dotnet_tests table. Set test_project for all 3,491 rows. Mark 9 known
failing tests. Fix slopwatch hook to use absolute path.
2026-02-24 23:48:31 -05:00
Joseph Doherty
8fcf27af5b
docs: update test_parity.db — 2,646 mapped (90.1%), 0 unmapped
...
Wave 3 batch update: +1,136 mappings across all remaining Go test files.
Final status: 2,646 mapped, 272 not_applicable, 19 skipped, 0 unmapped.
2026-02-24 22:37:09 -05:00
Joseph Doherty
d7ba1df30a
docs: update test_parity.db — 1,510 mapped (51.4%)
...
Map 82 additional Go tests from T4/T6/T15/T25 batch:
- store_test.go: 11 mappings (StoreInterfaceTests.cs)
- jetstream_test.go: 20 mappings (JsStorageRecoveryTests.cs)
- jetstream_consumer_test.go: 46 mappings (ConsumerLifecycleTests.cs)
- client_test.go + server_test.go: 17 mappings (ClientServerGoParityTests.cs)
2026-02-24 20:58:29 -05:00
Joseph Doherty
44c9b67d39
docs: update test_parity.db — 1,428 mapped (48.6%)
...
Map 42 new Go tests from T2 (FileStore tombstones), T3 (MemStore parity),
and T22 (configuration/opts) batches.
2026-02-24 20:22:02 -05:00
Joseph Doherty
a9967d3077
test(parity): port consumer pull queue & filter tests (T14) + DB update
...
Port 48 Go parity tests from TestJetStreamConsumerPull* and related
functions in jetstream_consumer_test.go to unit-level .NET tests.
Enhancements to PullConsumerEngine:
- MaxBytes enforcement in FetchAsync loop (stops delivery when budget exceeded)
- PullRequestWaitQueue with priority-ordered stable enqueue and popAndRequeue
round-robin semantics within same-priority groups
- PullWaitingRequest record with Priority, RemainingBatch, Reply fields
Enhancements to ConsumerConfig:
- MaxWaiting, MaxRequestBatch, MaxRequestMaxBytes, MaxRequestExpiresMs
New tests (51 total in ConsumerPullQueueTests.cs):
- Pull MaxAckPending enforcement, FIFO delivery, one-shot semantics
- Pull timeout (ExpiresMs), NoWait behavior, MaxBytes byte budget
- Three-filter and multi-filter subject filtering, filter update
- WaitQueue priority ordering and popAndRequeue round-robin
- Pending count tracking, ack floor advancement, redelivery
- DeliverPolicy Last/LastPerSubject/ByStartTime with filters
- ConsumerIsFiltered detection, overlapping subject filters
DB: 37 Go tests mapped → ConsumerPullQueueTests.cs (1,386 total mapped)
2026-02-24 19:53:25 -05:00
Joseph Doherty
b4ad71012f
test(parity): port FileStore recovery & compaction tests (T1) + DB update
...
Ports 34 Go FileStore tests from filestore_test.go to
FileStoreRecovery2Tests.cs (31 pass, 4 skipped). Tests cover block
recovery, compaction, PSIM indexing, skip-msg handling, TTL expiry,
corrupt index/state detection, and read-only permission checks.
Updates docs/test_parity.db with mapped/skipped status for all 34 tests.
2026-02-24 19:39:40 -05:00
Joseph Doherty
e9b8855dce
chore: mark ~211 Go tests as not_applicable in parity DB
...
norace (126), platform-specific (23), Go-specific (40), benchmarks (22)
2026-02-24 19:22:04 -05:00
Joseph Doherty
2dd807561e
docs: add remaining Go parity implementation plan — 29 tasks, 8 tracks, ~1,418 tests
2026-02-24 19:20:35 -05:00
Joseph Doherty
4ab4f578e3
docs: add remaining Go parity design — 8 tracks, ~1,418 tests
2026-02-24 19:10:40 -05:00
Joseph Doherty
365cbb80ae
test(parity): port 168 RAFT and JetStream cluster Go tests + DB update (B10+B11)
...
- RaftGoParityTests.cs: 86 tests covering elections, log replication, snapshots,
membership changes, peer tracking (Go ref: raft_test.go)
- JetStreamClusterGoParityTests.cs: 66 tests covering stream/consumer CRUD,
placement, leader failover, meta group (Go ref: jetstream_cluster_*_test.go)
- StreamReplicaGroupApplyTests.cs: 16 tests for per-stream RAFT apply logic
- test_parity.db: 1,241 mapped Go tests (up from 1,148, +93 new mappings)
2026-02-24 17:29:48 -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
02531dda58
feat(config+ws): add TLS cert reload, WS compression negotiation, WS JWT auth (E9+E10+E11)
...
E9: TLS Certificate Reload
- Add TlsCertificateProvider with Interlocked-swappable cert field
- New connections get current cert, existing connections keep theirs
- ConfigReloader.ReloadTlsCertificate rebuilds SslServerAuthenticationOptions
- NatsServer.ApplyConfigChanges triggers TLS reload on TLS config changes
- 11 tests covering cert swap, versioning, thread safety, config diff
E10: WebSocket Compression Negotiation (RFC 7692)
- Add WsDeflateNegotiator to parse Sec-WebSocket-Extensions parameters
- Parse server_no_context_takeover, client_no_context_takeover,
server_max_window_bits, client_max_window_bits
- WsDeflateParams record struct with ToResponseHeaderValue()
- NATS always enforces no_context_takeover (matching Go server)
- WsUpgrade returns negotiated WsDeflateParams in upgrade result
- 22 tests covering parameter parsing, clamping, response headers
E11: WebSocket JWT Authentication
- Extract JWT from Authorization header (Bearer token), cookie, or ?jwt= query param
- Priority: Authorization header > cookie > query parameter
- WsUpgrade.TryUpgradeAsync now parses query string from request URI
- Add FailUnauthorizedAsync for 401 responses
- 24 tests covering all JWT extraction sources and priority ordering
2026-02-24 16:03:46 -05:00
Joseph Doherty
c6ecbbfbcc
feat(config): add system account, SIGHUP reload, and auth change propagation (E6+E7+E8)
...
E6: Add IsSystemAccount property to Account, mark $SYS account as system,
add IsSystemSubject/IsSubscriptionAllowed/GetSubListForSubject helpers to
route $SYS.> subjects to the system account's SubList and block non-system
accounts from subscribing.
E7: Add ConfigReloader.ReloadAsync and ApplyDiff for structured async reload,
add ConfigReloadResult/ConfigApplyResult types. SIGHUP handler already wired
via PosixSignalRegistration in HandleSignals.
E8: Add PropagateAuthChanges to re-evaluate connected clients after auth
config reload, disconnecting clients whose credentials no longer pass
authentication with -ERR 'Authorization Violation'.
2026-02-24 15:48:48 -05:00
Joseph Doherty
18acd6f4e2
feat(jetstream): add mirror sync loop and source coordination with filtering (C9+C10)
2026-02-24 15:41:35 -05:00
Joseph Doherty
6ad8ab69bf
docs: update test_parity.db with C7+C8, D4+D5, E4+E5 Go parity mappings
2026-02-24 15:35:55 -05:00
Joseph Doherty
1da1849ed6
docs: update test_parity.db with E4+E5 Go parity mappings
2026-02-24 15:31:48 -05:00
Joseph Doherty
d259a2d03e
docs: update test_parity.db with C5+C6, D2+D3, E2+E3 Go parity mappings
...
- Consumer priority groups and pull timeout/filter mappings
- Route pool accounting and S2 compression mappings
- MQTT session persistence, QoS 2, and retained message mappings
- Total mapped: 924 → 938 of 2,937
2026-02-24 15:14:42 -05:00
Joseph Doherty
21d10582b3
docs: update test_parity.db with C3+C4, D1, E1 Go parity mappings
...
- 10 consumer delivery/redelivery mappings (PushConsumer, RedeliveryTracker)
- 7 gateway interest-only mode mappings (GatewayInterestTracker)
- 10 MQTT binary parser mappings (MqttBinaryDecoder)
- Total mapped: 909 → 924 of 2,937
2026-02-24 15:04:22 -05:00
Joseph Doherty
a201e8019a
test(config): port Go opts_test.go config parsing tests
...
Adds OptsGoParityTests.cs with 49 tests porting 15 unmapped Go test
functions from server/opts_test.go: random port semantics, listen port
config variants, multiple users, authorization block parsing, options
defaults (TestDefaultSentinel), write_deadline parsing, path handling,
variable/env-var substitution chains, and unknown field tolerance.
2026-02-24 14:54:00 -05:00
Joseph Doherty
adee23f853
docs: update test_parity.db with AckProcessor Go parity mappings
2026-02-24 14:52:16 -05:00
Joseph Doherty
4092e15ace
docs: update test_parity.db with FileStore Go parity mappings
...
Map 36 additional Go tests from filestore_test.go to .NET equivalents
in FileStoreGoParityTests.cs. FileStore mapped: 73 -> 109. Total: 893/2937.
2026-02-24 14:44:09 -05:00
Joseph Doherty
2a240c6355
docs: add implementation plan for all 15 structure gaps
...
50 tasks across 5 parallel tracks (A-E) with full TDD steps,
Go reference citations, file paths, and test_parity.db update
protocol. Task persistence file for session resumption.
2026-02-24 12:05:22 -05:00
Joseph Doherty
f1e42f1b5f
docs: add full Go parity design for all 15 structure gaps
...
5-track parallel architecture (Storage, Consensus, Protocol,
Networking, Services) covering all CRITICAL/HIGH/MEDIUM gaps
identified in structuregaps.md. Feature-first approach with
test_parity.db updates. Targets ~1,194 additional Go test mappings.
2026-02-24 11:57:15 -05:00
Joseph Doherty
0a9db430d5
docs: add test_mappings table with FK relationships
...
Many-to-many mapping between go_tests and dotnet_tests via
test_mappings table. 988 mappings linking 857 Go tests to
690 .NET tests. Confidence levels: exact, comment_ref, keyword,
manual, auto.
2026-02-24 10:14:58 -05:00
Joseph Doherty
bff24d29c7
docs: add SQLite parity tracking database
...
test_parity.db contains go_tests (2,937 rows) and dotnet_tests
(2,966 rows) tables for querying Go-to-.NET test mapping across
Claude sessions. 857 mapped, 2,080 unmapped.
2026-02-24 10:12:42 -05:00
Joseph Doherty
0dc2b38415
docs: add Go-to-.NET gap analysis and test mapping
...
Research documents covering implementation gaps (structuregaps.md)
and full test function mapping (testmapping.md + CSV files) between
the Go NATS server and .NET port. 857/2937 Go tests mapped (29.2%),
2080 unmatched, 2966 .NET-only tests.
2026-02-24 10:07:29 -05:00