Skip to content

Commit 7ae9060

Browse files
committed
TASK-033-004: Update ARCHITECTURE.md — Protocol Engine Core section
Updated the Protocol Engine Core section to document the actual implementation: - Replaced description of four per-version GroupByRequestKey instances with single shared GroupByRequestKey - Clarified maxSubstreams as a single shared ceiling (not per-version), configurable via TurboClientOptions.MaxEndpointSubstreams (default 256) - Preserved note about async boundary between feature chain and engine core - Updated topology diagram to show Partition(version) inside per-endpoint substreams, not as initial stage
1 parent 880de5f commit 7ae9060

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ This feature inverts the topology: group by endpoint once at the top level, then
114114
**Model:** haiku
115115

116116
**Acceptance Criteria:**
117-
- [ ] The **Protocol Engine Core** section in `ARCHITECTURE.md` is updated to show the new topology:
117+
- [x] The **Protocol Engine Core** section in `ARCHITECTURE.md` is updated to show the new topology:
118118
```
119119
RequestEnricherStage
120120
→ GroupByRequestKey(RequestEndpoint, max=MaxEndpointSubstreams)
@@ -123,10 +123,10 @@ This feature inverts the topology: group by endpoint once at the top level, then
123123
→ Merge(4)
124124
→ MergeSubstreams
125125
```
126-
- [ ] The old description of four per-version `GroupByRequestKey` instances is removed
127-
- [ ] `maxSubstreams` note is updated: single shared ceiling, configurable via `TurboClientOptions.MaxEndpointSubstreams`, default 256
128-
- [ ] The note "An async boundary separates the feature chain from the engine core" is preserved if still accurate
129-
- [ ] No other sections of `ARCHITECTURE.md` are modified
126+
- [x] The old description of four per-version `GroupByRequestKey` instances is removed
127+
- [x] `maxSubstreams` note is updated: single shared ceiling, configurable via `TurboClientOptions.MaxEndpointSubstreams`, default 256
128+
- [x] The note "An async boundary separates the feature chain from the engine core" is preserved if still accurate
129+
- [x] No other sections of `ARCHITECTURE.md` are modified
130130

131131
---
132132

ARCHITECTURE.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,19 @@ Request flows top-to-bottom; response flows bottom-to-top. Only BidiFlows for no
9696

9797
### Protocol Engine Core
9898

99-
`ProtocolCoreGraphBuilder` wires the engine graph:
99+
The protocol engine core routes requests by endpoint and version, then wires them through version-specific connection flows:
100100

101101
```
102102
RequestEnricherStage
103-
Partition(version) [Out0: 1.0 | Out1: 1.1 | Out2: 2.0 | Out3: 3.0]
104-
→ GroupByHostKey(RequestEndpoint)
105-
→ per-host substream: ExtractOptionsEngine BidiFlow ↔ ConnectionStage
106-
→ ConnectionReuseFlowStage
103+
GroupByRequestKey(RequestEndpoint) [per-endpoint substream]
104+
→ per-endpoint substream: Partition(version) [Out0: 1.0 | Out1: 1.1 | Out2: 2.0 | Out3: 3.0]
105+
[H10|H11|H20|H30] engines ↔ ConnectionStage ↔ ConnectionReuseStage
106+
→ Merge(4)
107107
→ MergeSubstreams
108-
→ Merge(4)
109108
```
110109

111110
- `RequestEndpoint` key = `(Scheme, Host, Port, Version)` — case-insensitive.
112-
- `maxSubstreams`: HTTP/1.x → 256, HTTP/2/3 → 64.
111+
- `maxSubstreams`: Single shared ceiling per endpoint, configurable via `TurboClientOptions.MaxEndpointSubstreams`. Default is 256.
113112
- An async boundary separates the feature chain from the engine core (protocol work runs on its own dispatcher).
114113

115114
### Per-Version Engine Assembly

0 commit comments

Comments
 (0)