Joseph Doherty
ed78a100e2
feat: port session 05 — Subscription Index (sublist)
...
Port trie-based subject matching engine (81 features, 74 tests).
Includes SubscriptionIndex with cache, wildcard matching (*/>),
queue subscription groups, reverse match, notifications, stats,
and subject validation utilities. Also adds minimal Subscription
and NatsClient stubs needed by the index.
2026-02-26 12:11:06 -05:00
Joseph Doherty
b8f2f66d45
feat: port session 04 — Logging, Signals & Services
...
- NatsLogger.cs: INatsLogger interface (Noticef/Warnf/Fatalf/Errorf/Debugf/Tracef),
ServerLogging state class with atomic debug/trace flags, rate-limited logging
(RateLimitWarnf/RateLimitDebugf), error variants (Errors/Errorc/Errorsc),
MicrosoftLoggerAdapter bridging to ILogger
- SignalHandler.cs: ProcessSignal (Unix kill via Process), CommandToUnixSignal mapping
(Stop→SIGKILL, Quit→SIGINT, Reopen→SIGUSR1, Reload→SIGHUP), ResolvePids via pgrep,
SetProcessName, Run/IsWindowsService stubs for non-Windows
- 11 tests (6 logger, 5 signal/service)
- WASM/Windows signal stubs already n/a
- All 141 tests pass (140 unit + 1 integration)
- DB: features 368/3673 complete, tests 155/3257 complete (9.6% overall)
2026-02-26 11:54:25 -05:00
Joseph Doherty
f08fc5d6a7
feat: port session 03 — Configuration & Options types, Clone, MergeOptions, SetBaseline
...
- ServerOptionTypes.cs: all supporting types — ClusterOpts, GatewayOpts, LeafNodeOpts,
WebsocketOpts, MqttOpts, RemoteLeafOpts, RemoteGatewayOpts, CompressionOpts,
TlsConfigOpts, JsLimitOpts, JsTpmOpts, AuthCalloutOpts, ProxiesConfig,
IAuthentication, IAccountResolver, enums (WriteTimeoutPolicy, StoreCipher, OcspMode)
- ServerOptions.cs: full Options struct with ~100 properties across 10 subsystems
(general, logging, networking, TLS, cluster, gateway, leafnode, websocket, MQTT, JetStream)
- ServerOptions.Methods.cs: Clone (deep copy), MergeOptions, SetBaselineOptions,
RoutesFromStr, NormalizeBasePath, OverrideTls, OverrideCluster, ExpandPath,
HomeDir, MaybeReadPidFile, GetDefaultAuthTimeout, ConfigFlags.NoErrOnUnknownFields
- 17 tests covering defaults, random port, merge, clone, expand path, auth timeout,
routes parsing, normalize path, cluster override, config flags
- Config file parsing (processConfigFileLine 765-line function) deferred to follow-up
- All 130 tests pass (129 unit + 1 integration)
- DB: features 344/3673 complete, tests 148/3257 complete (9.1% overall)
2026-02-26 11:51:01 -05:00
Joseph Doherty
11c0b92fbd
feat: port session 02 — Utilities & Queues (util, ipqueue, scheduler, subject_transform)
...
- ServerUtilities: version helpers, parseSize/parseInt64, parseHostPort, URL redaction,
comma formatting, refCountedUrlSet, TCP helpers, parallelTaskQueue
- IpQueue<T>: generic intra-process queue with 1-slot Channel<bool> notification signal,
optional size/len limits, ConcurrentDictionary registry, single-slot List<T> pool
- MsgScheduling: per-subject scheduled message tracking via HashWheel TTLs,
binary encode/decode with zigzag varint, Timer-based firing
- SubjectTransform: full NATS subject mapping engine (11 transform types: Wildcard,
Partition, SplitFromLeft, SplitFromRight, SliceFromLeft, SliceFromRight, Split,
Left, Right, Random, NoTransform), FNV-1a partition hash
- 20 tests (7 util, 9 ipqueue, 4 subject_transform); 45 benchmarks/split tests marked n/a
- All 113 tests pass (112 unit + 1 integration)
- DB: features 328/3673 complete, tests 139/3257 complete (8.7% overall)
2026-02-26 09:39:36 -05:00
Joseph Doherty
8050ee1897
feat: port session 01 — Foundation Types (const, errors, proto, ring, rate_counter, sdm)
...
Ports server/const.go, errors.go, proto.go, ring.go, rate_counter.go, sdm.go.
- ServerConstants: all protocol constants and version info from const.go
- ServerErrors: ~60 sentinel exceptions plus errCtx/configErr/processConfigErr types
- ProtoWire: protobuf varint encode/decode helpers (proto.go)
- RateCounter: sliding-window rate limiter (rate_counter.go)
- ClosedRingBuffer: fixed-size ring buffer for /connz (ring.go)
- StreamDeletionMeta: SDM tracking for JetStream cluster consensus (sdm.go)
- 5 unit tests passing (errors, ring buffer, rate counter)
- errors_gen.go (code generator tool) and nkey.go Server methods marked n_a
2026-02-26 09:15:20 -05:00
Joseph Doherty
023a5ddb7e
chore: complete phase 5 - verify all .NET mappings
...
All verification checks passed: zero unmapped items, zero collisions,
all PascalCase naming, valid namespaces, all N/A items justified, all
tests targeting correct project. Fixed 8 non-PascalCase method names.
2026-02-26 07:45:05 -05:00
Joseph Doherty
dbc55d2e7b
chore: complete phase 4 - map all Go items to .NET solution design
...
Map 12 modules, 3673 features, and 3257 tests to .NET classes and
methods. 41 platform-specific features marked N/A. Zero naming
collisions. Design reviewed and refined via Codex MCP (renamed
ambiguous classes, applied .NET naming conventions).
2026-02-26 07:38:30 -05:00
Joseph Doherty
f7a4f56ce4
fix: update logger library mapping to Microsoft.Extensions.Logging
2026-02-26 07:21:59 -05:00
Joseph Doherty
1fd7e5193b
chore: complete phase 3 - map all 36 Go libraries to .NET equivalents
...
Map every external Go dependency to its .NET BCL, NuGet, or custom
implementation target, completing the library mapping phase.
2026-02-26 07:20:16 -05:00
Joseph Doherty
c5964c66c5
chore: complete phase 1 - Go codebase decomposition
...
Run Go AST analyzer against nats-server source, populating porting.db
with 12 modules, 3673 features, 3257 unit tests, 11 inter-module
dependencies, and 36 external library imports.
2026-02-26 07:06:57 -05:00