Files
natsnet/docs/plans/phases/phase6sessions/session-01.md
Joseph Doherty 88b1391ef0 feat: port session 07 — Protocol Parser, Auth extras (TPM/certidp/certstore), Internal utilities & data structures
Session 07 scope (5 features, 17 tests, ~1165 Go LOC):
- Protocol/ParserTypes.cs: ParserState enum (79 states), PublishArgument, ParseContext
- Protocol/IProtocolHandler.cs: handler interface decoupling parser from client
- Protocol/ProtocolParser.cs: Parse(), ProtoSnippet(), OverMaxControlLineLimit(),
  ProcessPub/HeaderPub/RoutedMsgArgs/RoutedHeaderMsgArgs, ClonePubArg(), GetHeader()
- tests/Protocol/ProtocolParserTests.cs: 17 tests via TestProtocolHandler stub

Auth extras from session 06 (committed separately):
- Auth/TpmKeyProvider.cs, Auth/CertificateIdentityProvider/, Auth/CertificateStore/

Internal utilities & data structures (session 06 overflow):
- Internal/AccessTimeService.cs, ElasticPointer.cs, SystemMemory.cs, ProcessStatsProvider.cs
- Internal/DataStructures/GenericSublist.cs, HashWheel.cs
- Internal/DataStructures/SubjectTree.cs, SubjectTreeNode.cs, SubjectTreeParts.cs

All 461 tests pass (460 unit + 1 integration). DB updated for features 2588-2592 and tests 2598-2614.
2026-02-26 13:16:56 -05:00

49 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Session 01: Foundation Types
## Summary
Constants, error types, error catalog, protocol definitions, ring buffer, rate counter, stream distribution model, and NKey utilities. These are the leaf types with no internal dependencies — everything else builds on them.
## Scope
| Go File | Features | Feature IDs | Go LOC |
|---------|----------|-------------|--------|
| server/const.go | 2 | 582583 | 18 |
| server/errors.go | 15 | 833847 | 92 |
| server/errors_gen.go | 6 | 848853 | 158 |
| server/proto.go | 6 | 25932598 | 237 |
| server/ring.go | 6 | 28892894 | 34 |
| server/rate_counter.go | 3 | 27972799 | 34 |
| server/sdm.go | 5 | 29662970 | 39 |
| server/nkey.go | 3 | 24402442 | 14 |
| **Total** | **46** | | **626** |
## .NET Classes
- `Constants` — server constants and version info
- `ServerErrorCatalog` — generated error codes and messages
- `Protocol` — NATS protocol string constants
- `RingBuffer` — fixed-size circular buffer
- `RateCounter` — sliding window rate measurement
- `StreamDistributionModel` — stream distribution enum/types
- `NkeyUser` — NKey authentication types
## Test Files
| Test File | Tests | Test IDs |
|-----------|-------|----------|
| server/errors_test.go | 2 | 297298 |
| server/ring_test.go | 2 | 27942795 |
| server/rate_counter_test.go | 1 | 2720 |
| server/nkey_test.go | 9 | 23622370 |
| server/trust_test.go | 3 | 30583060 |
| **Total** | **17** | |
## Dependencies
- None (leaf session)
## .NET Target Location
- `dotnet/src/ZB.MOM.NatsNet.Server/` — types and enums at root or `Internal/`