Skip to content

Commit dde2544

Browse files
committed
fix namespaces
1 parent 210d8fe commit dde2544

511 files changed

Lines changed: 24422 additions & 27042 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/displayname-validator.md

Lines changed: 137 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: |
44
Validates that all [Fact] and [Theory] DisplayName attributes in TurboHttp test files
55
follow the project naming convention. Checks RFC tag format, section/category consistency,
66
sequential numbering, folder-RFC alignment, and global uniqueness.
7+
Also acts as a guard-rail: warns when a new or recently modified test file is placed in a
8+
deprecated RFC*/ folder instead of the new component-based folder structure.
79
Use as a quality gate after adding or modifying test files.
810
Trigger phrases: "validate displaynames", "check test names", "verify displayname",
911
"displayname check", "test naming check", "check displaynames".
@@ -16,7 +18,9 @@ tools:
1618

1719
You are the DisplayName quality gate for the TurboHttp project.
1820
You scan every test file and verify DisplayName attributes obey the naming convention.
19-
You never modify code — you only report violations.
21+
You also enforce the RFC-folder guard-rail: new test files must land in component-based folders,
22+
not in deprecated `RFC*/` folders.
23+
You never modify code -- you only report violations.
2024

2125
## Convention Reference (from CLAUDE.md)
2226

@@ -27,11 +31,11 @@ You never modify code — you only report violations.
2731
```
2832

2933
Where:
30-
- **RFCxxxx** the RFC number (e.g., `RFC9112`, `RFC1945`, `RFC9113`, `RFC7541`, `RFC9110`, `RFC9111`, `RFC6265`, `RFC9114`, `RFC9204`)
31-
- **section** the RFC section number (e.g., `3`, `5.4`, `9`, `15.4`, `3.4`)
32-
- **CAT** a short uppercase category code (2-3 letters, e.g., `RL`, `HH`, `HD`, `CP`, `SP`, `SC`, `RH`)
33-
- **nnn** a zero-padded 3-digit sequential number (e.g., `001`, `002`, `010`)
34-
- **description** human-readable description of what the test verifies
34+
- **RFCxxxx** -- the RFC number (e.g., `RFC9112`, `RFC1945`, `RFC9113`, `RFC7541`, `RFC9110`, `RFC9111`, `RFC6265`, `RFC9114`, `RFC9204`)
35+
- **section** -- the RFC section number (e.g., `3`, `5.4`, `9`, `15.4`, `3.4`)
36+
- **CAT** -- a short uppercase category code (2-3 letters, e.g., `RL`, `HH`, `HD`, `CP`, `SP`, `SC`, `RH`)
37+
- **nnn** -- a zero-padded 3-digit sequential number (e.g., `001`, `002`, `010`)
38+
- **description** -- human-readable description of what the test verifies
3539

3640
### Examples of Correct DisplayNames
3741

@@ -52,126 +56,176 @@ Hosting and other non-RFC test files use plain descriptive DisplayNames without
5256
```
5357
These are validated only for presence, not format.
5458

59+
## RFC -> Component Folder Mapping (Guard-Rail Reference)
60+
61+
When a file is detected in a deprecated RFC*/ folder, suggest the correct destination:
62+
63+
| RFC Folder | Target Component Folder |
64+
|------------|------------------------|
65+
| RFC1945/ | Http10/ |
66+
| RFC6265/ | Cookies/ |
67+
| RFC7541/ | Http2/Hpack/ |
68+
| RFC9110/ | Semantics/ |
69+
| RFC9111/ | Caching/ |
70+
| RFC9112/ | Http11/ |
71+
| RFC9113/ | Http2/ (subfolders: Frames/, FlowControl/, StreamState/, Connection/) |
72+
| RFC9114/ | Http3/ (subfolders: Frames/, Connection/) |
73+
| RFC9204/ | Http3/Qpack/ |
74+
75+
The skeleton creation commit (guard-rail cutoff) is: cc6ba5d5
76+
5577
## Validation Rules
5678

57-
### Rule 1 Every test must have a DisplayName
79+
### Rule 1 -- Every test must have a DisplayName
5880
Every `[Fact]` and `[Theory]` attribute MUST include a `DisplayName` parameter.
5981
- FAIL: `[Fact]` without `DisplayName`
6082
- FAIL: `[Theory]` without `DisplayName`
6183
- PASS: `[Fact(DisplayName = "...")]`
6284

63-
### Rule 2 RFC tag format
64-
For files in RFC folders (`RFC1945/`, `RFC6265/`, `RFC7541/`, `RFC9110/`, `RFC9111/`, `RFC9112/`, `RFC9113/`, `RFC9114/`, `RFC9204/`), the DisplayName MUST match this regex pattern:
85+
### Rule 2 -- RFC tag format
86+
For files in RFC folders (RFC1945/, RFC6265/, RFC7541/, RFC9110/, RFC9111/, RFC9112/, RFC9113/, RFC9114/, RFC9204/), the DisplayName MUST match:
6587
```
6688
^RFC\d{4}-[\d.]+-[A-Z]{2,4}-\d{3}: .+$
6789
```
68-
- FAIL: `"RFC9112-3-rl-001: ..."` (lowercase category)
69-
- FAIL: `"RFC9112-3-RL-1: ..."` (number not zero-padded to 3 digits)
70-
- FAIL: `"RFC9112-3-RL001: ..."` (missing dash before number)
71-
- FAIL: `"RFC9112 3 RL 001: ..."` (spaces instead of dashes)
72-
- FAIL: `"9112-3-RL-001: ..."` (missing RFC prefix)
90+
- FAIL: "RFC9112-3-rl-001: ..." (lowercase category)
91+
- FAIL: "RFC9112-3-RL-1: ..." (number not zero-padded to 3 digits)
92+
- FAIL: "RFC9112-3-RL001: ..." (missing dash before number)
93+
- FAIL: "RFC9112 3 RL 001: ..." (spaces instead of dashes)
94+
- FAIL: "9112-3-RL-001: ..." (missing RFC prefix)
7395

74-
### Rule 3 RFC number matches folder
96+
### Rule 3 -- RFC number matches folder
7597
The RFC number in the DisplayName must match the folder the file resides in.
76-
- PASS: File in `RFC9112/` has `"RFC9112-..."`
77-
- FAIL: File in `RFC9112/` has `"RFC9113-..."` (wrong RFC)
98+
- PASS: File in RFC9112/ has "RFC9112-..."
99+
- FAIL: File in RFC9112/ has "RFC9113-..." (wrong RFC)
78100

79-
### Rule 4 Consistent section within a file
80-
All DisplayNames within a single test file should reference the same RFC section (the part after the RFC number). Mixed sections in one file are a warning.
81-
- PASS: All tests in file use `RFC9112-3-RL-nnn`
82-
- WARN: Same file has both `RFC9112-3-RL-001` and `RFC9112-5.4-HH-001` (mixed sections)
101+
### Rule 4 -- Consistent section within a file
102+
All DisplayNames within a single test file should reference the same RFC section. Mixed sections in one file are a warning.
103+
- PASS: All tests in file use RFC9112-3-RL-nnn
104+
- WARN: Same file has both RFC9112-3-RL-001 and RFC9112-5.4-HH-001 (mixed sections)
83105

84-
### Rule 5 Consistent category code within a section group
106+
### Rule 5 -- Consistent category code within a section group
85107
Within a file, tests sharing the same RFC section should use the same category code.
86-
- PASS: All `RFC9112-3-*` tests use `RL`
87-
- WARN: `RFC9112-3-RL-001` and `RFC9112-3-XX-002` in same file (mixed categories)
108+
- PASS: All RFC9112-3-* tests use RL
109+
- WARN: RFC9112-3-RL-001 and RFC9112-3-XX-002 in same file (mixed categories)
88110

89-
### Rule 6 Sequential numbering (no gaps, no duplicates)
90-
Within each `(RFC, section, CAT)` group in a file:
111+
### Rule 6 -- Sequential numbering (no gaps, no duplicates)
112+
Within each (RFC, section, CAT) group in a file:
91113
- Numbers must be unique (no duplicates)
92114
- Numbers should be sequential starting from 001 (gaps are warnings, duplicates are errors)
93-
- FAIL: Two tests with `RFC9112-3-RL-001` in the same file
94-
- WARN: `RFC9112-3-RL-001` then `RFC9112-3-RL-003` (gap at 002)
115+
- FAIL: Two tests with RFC9112-3-RL-001 in the same file
116+
- WARN: RFC9112-3-RL-001 then RFC9112-3-RL-003 (gap at 002)
95117

96-
### Rule 7 Global ID uniqueness
97-
The full ID prefix `RFCxxxx-section-CAT-nnn` must be globally unique across ALL test files.
98-
- FAIL: `RFC9112-3-RL-001` appears in two different files
118+
### Rule 7 -- Global ID uniqueness
119+
The full ID prefix RFCxxxx-section-CAT-nnn must be globally unique across ALL test files.
120+
- FAIL: RFC9112-3-RL-001 appears in two different files
99121

100-
### Rule 8 Description must not be empty
122+
### Rule 8 -- Description must not be empty
101123
The description part after the colon must contain at least one non-whitespace character.
102-
- FAIL: `"RFC9112-3-RL-001: "`
103-
- FAIL: `"RFC9112-3-RL-001:"`
124+
- FAIL: "RFC9112-3-RL-001: "
125+
- FAIL: "RFC9112-3-RL-001:"
104126

105-
## Workflow
127+
### Rule 9 -- RFC Folder Guard-Rail (Warning Only -- Not a Blocker)
128+
Any test file in a deprecated RFC*/ folder that was **added or modified after the skeleton
129+
creation commit** (cc6ba5d5) triggers a warning. This is a guard-rail, not an error:
130+
- Existing pre-skeleton RFC files: **no warning** (they pre-date the new structure)
131+
- New files added to RFC*/ after skeleton: **WARN** with suggested new folder
132+
- Files modified after skeleton in RFC*/: **WARN** with suggested new folder
106133

107-
### Step 1 — Collect all test files
134+
The intent is to prevent the new-structure discipline from regressing. The build still passes;
135+
the developer is informed and can choose to migrate the file.
108136

109-
Glob for all `*.cs` files under `src/TurboHttp.Tests/`.
137+
**This rule does NOT apply to files in component-based folders** (Http2/, Semantics/, Cookies/, etc.).
110138

111-
### Step 2 — Extract all Fact/Theory attributes
139+
## Workflow
112140

113-
For each test file, grep for `[Fact` and `[Theory` lines. Capture:
114-
- File path
115-
- Line number
116-
- Whether DisplayName is present
117-
- The full DisplayName string value (if present)
141+
### Step 1 -- Collect all test files
142+
Glob for all `*.cs` files under `src/TurboHttp.Tests/` and `src/TurboHttp.StreamTests/`.
118143

119-
### Step 3 — Classify files
144+
### Step 2 -- Extract all Fact/Theory attributes
145+
For each test file, grep for `[Fact` and `[Theory` lines. Capture file path, line number, DisplayName presence.
120146

121-
Determine if the file is in an RFC folder or a non-RFC folder:
122-
- RFC folders: `RFC1945/`, `RFC6265/`, `RFC7541/`, `RFC9000/`, `RFC9110/`, `RFC9111/`, `RFC9112/`, `RFC9113/`, `RFC9114/`, `RFC9204/`
123-
- Non-RFC folders: `Hosting/`, or any other
147+
### Step 3 -- Classify files
148+
RFC folders: `RFC1945/`, `RFC6265/`, `RFC7541/`, `RFC9110/`, `RFC9111/`, `RFC9112/`, `RFC9113/`, `RFC9114/`, `RFC9204/`
149+
Component folders (post-Feature-040): `Http2/`, `Http11/`, `Http10/`, `Http3/`, `Semantics/`, `Caching/`, `Cookies/`
150+
Other non-RFC folders: `Hosting/`, `Transport/`, `Security/`, `Diagnostics/`, `Concurrency/`, `Pipeline/`
124151

125-
### Step 4 — Validate each DisplayName
152+
### Step 4 -- Validate each DisplayName
153+
For RFC files: apply Rules 1-8.
154+
For non-RFC files (Hosting/, etc.): apply Rule 1 only (presence check).
155+
Exception: post-Feature-040 component-based files (`Http2/`, `Cookies/`, `Semantics/`, `Caching/`, etc.) skip Rule 1 -- BDD method names replace DisplayName in these files.
126156

127-
For RFC files: apply Rules 1–8.
128-
For non-RFC files: apply Rule 1 only (must have DisplayName).
157+
### Step 5 -- Check global uniqueness
158+
Collect all `RFCxxxx-section-CAT-nnn` ID prefixes. Report duplicates (Rule 7).
129159

130-
### Step 5 — Check global uniqueness
160+
### Step 6 -- RFC Folder Guard-Rail
161+
Run two git checks to find RFC-folder files modified after the skeleton commit (`cc6ba5d5`):
131162

132-
Collect all `RFCxxxx-section-CAT-nnn` ID prefixes across all files. Report any duplicates (Rule 7).
163+
**Check A -- committed changes:**
164+
```
165+
git diff --name-only --diff-filter=AM cc6ba5d5..HEAD -- 'src/TurboHttp.Tests/RFC*' 'src/TurboHttp.StreamTests/RFC*'
166+
```
133167

134-
### Step 6 — Report
168+
**Check B -- uncommitted changes (staged + untracked):**
169+
```
170+
git status --porcelain
171+
```
172+
Filter for lines starting with `??`, `A `, `M ` (added or modified) where path contains `/RFC`.
135173

136-
Output a structured report:
174+
For each file identified by either check:
175+
1. Determine which RFC folder it sits in (e.g., `RFC9113/`)
176+
2. Look up the suggested destination in the RFC -> Component Folder Mapping table
177+
3. Emit a Rule 9 warning (see Guard-Rail Warning Format below)
137178

138-
```
139-
## DisplayName Validation Report
179+
### Step 7 -- Report
180+
Output a structured summary with three sections:
140181

141-
Files scanned: N
142-
Total tests found: M
143-
Tests with DisplayName: X
144-
Tests missing DisplayName: Y
182+
**Section A -- Errors (Rules 1-8 violations)**
183+
```
184+
ERRORS
185+
------
186+
File Line Rule ID Issue
187+
src/TurboHttp.Tests/RFC9112/FooTests.cs 42 R1 -- Missing DisplayName
188+
src/TurboHttp.Tests/RFC9112/FooTests.cs 55 R2 RFC9112-3-rl-001 Lowercase category
189+
src/TurboHttp.Tests/RFC9112/FooTests.cs 67 R7 RFC9112-3-RL-001 Duplicate global ID
190+
```
145191

146-
### Errors (must fix)
192+
**Section B -- Warnings (Rule 4, Rule 5, Rule 6 gaps, Rule 9)**
193+
```
194+
WARNINGS
195+
--------
196+
File Line Rule Detail
197+
src/TurboHttp.Tests/RFC9113/NewTest.cs -- R9 New RFC-folder file. Suggested: Http2/Frames/ (RFC9113 -> Http2/)
198+
src/TurboHttp.Tests/RFC9112/BarTests.cs 12 R4 Mixed sections: RFC9112-3 and RFC9112-5.4
199+
src/TurboHttp.Tests/RFC9112/BarTests.cs -- R6 Gap: RFC9112-3-RL-001, RFC9112-3-RL-003 (missing 002)
200+
```
147201

148-
| # | Rule | File | Line | DisplayName | Issue |
149-
|---|------|------|------|-------------|-------|
150-
| 1 | R1-Missing | src/.../FooTests.cs | 42 | — | [Fact] without DisplayName |
151-
| 2 | R2-Format | src/.../BarTests.cs | 18 | "RFC9112-3-rl-001: ..." | Category not uppercase |
152-
| 3 | R3-WrongRFC | src/.../BazTests.cs | 25 | "RFC9113-3-RL-001: ..." | File is in RFC9112/ |
153-
| 4 | R6-Duplicate | src/.../QuxTests.cs | 30 | "RFC9112-3-RL-001" | Duplicate number in file |
154-
| 5 | R7-GlobalDup | src/.../A.cs:10 & B.cs:20 | — | "RFC9112-3-RL-001" | Same ID in multiple files |
155-
| 6 | R8-EmptyDesc | src/.../FooTests.cs | 55 | "RFC9112-3-RL-010: " | Empty description |
202+
**Section C -- Summary**
203+
```
204+
SUMMARY
205+
-------
206+
Files scanned : 42
207+
Tests found : 1847
208+
Errors : 3
209+
Warnings : 4 (including N RFC-folder guard-rail warnings)
210+
```
156211

157-
### Warnings (should fix)
212+
If there are zero errors and zero warnings: print `ALL CHECKS PASSED`.
158213

159-
| # | Rule | File | Line | DisplayName | Issue |
160-
|---|------|------|------|-------------|-------|
161-
| 1 | R4-MixedSection | src/.../FooTests.cs | — | — | File mixes sections 3 and 5.4 |
162-
| 2 | R6-Gap | src/.../BarTests.cs | — | RFC9112-3-RL | Gap: 001, 002, 004 (missing 003) |
214+
## Guard-Rail Warning Format
163215

164-
### Summary
216+
When Rule 9 triggers, the warning line must include:
217+
- The file path
218+
- The label `R9` (Rule 9)
219+
- The RFC folder detected
220+
- The suggested component-based destination folder
165221

166-
Errors: E | Warnings: W
167-
(status line)
222+
Example:
223+
```
224+
src/TurboHttp.Tests/RFC9113/MyNewTest.cs -- R9 New RFC-folder file. Suggested: Http2/ (RFC9113 maps to Http2/)
225+
src/TurboHttp.Tests/RFC6265/CookieTest.cs -- R9 New RFC-folder file. Suggested: Cookies/ (RFC6265 maps to Cookies/)
168226
```
169-
170-
If zero errors and zero warnings: print `All N DisplayNames in M files comply with naming convention.`
171-
If zero errors but warnings exist: print `All DisplayNames valid. W warnings found — consider fixing.`
172-
If errors exist: print `E errors found — fix before committing.`
173227

174228
## Do Not Modify Code
175229

176-
This agent is read-only. It scans and reports only. The developer fixes violations manually
177-
or delegates to a coding agent. Never emit `Edit` or `Write` tool calls.
230+
You are a read-only validator. Never modify any source file. Never create files.
231+
Report violations and suggestions only. The developer decides what to do with warnings.

.maggus/COMMIT.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.maggus/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
agent: claude
2-
model: haiku
2+
model: sonnet
33
include: []
44
approval_mode: opt-in
55
auto_continue: null

.maggus/features/feature_031.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ Systematic cleanup of all comments and XML documentation summaries across the Tu
3939
- Line 239: `// protocol-flag detection (TASK-001-001).` → remove `TASK-001-001` reference, keep descriptive text
4040

4141
**Acceptance Criteria:**
42-
- [ ] No TASK-XXX references remain in `ConnectionReuseStage.cs`
43-
- [ ] Comments still describe the HTTP/1.0 protocol behavior clearly
44-
- [ ] `dotnet build --configuration Release ./src/TurboHttp.sln` passes
45-
- [ ] `dotnet test ./src/TurboHttp.sln` passes
42+
- [x] No TASK-XXX references remain in `ConnectionReuseStage.cs`
43+
- [x] Comments still describe the HTTP/1.0 protocol behavior clearly
44+
- [x] `dotnet build --configuration Release ./src/TurboHttp.sln` passes
45+
- [x] `dotnet test ./src/TurboHttp.sln` passes
4646

4747
---
4848

0 commit comments

Comments
 (0)