Skip to content

Commit 29ba164

Browse files
thcedclaude
andcommitted
docs: Mark combinators plan tasks complete
All three tasks plus the final verification checklist are done; flip every step in the plan to [x] to reflect the merged state of the branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 883e7f0 commit 29ba164

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

docs/superpowers/plans/2026-05-08-combinators-implementation.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Combinators Implementation Plan
22

3-
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
3+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [x]`) syntax for tracking.
44
55
**Goal:** Implement runtime validation for OpenAPI 3.1 combinators (`allOf`, `anyOf`, `oneOf`, `not`) and let combinators co-exist with sibling base assertions (`type`, `properties`, etc.) per JSON Schema 2020-12.
66

@@ -22,7 +22,7 @@
2222

2323
### Step 1.1: Write failing validator tests
2424

25-
- [ ] **Step 1: Add tests for combinator validation**
25+
- [x] **Step 1: Add tests for combinator validation**
2626

2727
Replace the existing `combinatorThrowsUnsupported` test in `src/test/java/com/retailsvc/http/validate/DefaultValidatorDispatchTest.java` with the following block (delete the old test, append the new ones at the end of the class). Keep the existing imports and add: `AllOfSchema`, `AnyOfSchema`, `NotSchema`, `StringSchema`.
2828

@@ -124,15 +124,15 @@ void notFailsWhenInnerPasses() {
124124
}
125125
```
126126

127-
- [ ] **Step 2: Run the failing tests**
127+
- [x] **Step 2: Run the failing tests**
128128

129129
Run: `mvn -q test -Dtest=DefaultValidatorDispatchTest`
130130

131131
Expected: 9 new tests fail with `UnsupportedOperationException` (and the old `combinatorThrowsUnsupported` is deleted, so it does not run).
132132

133133
### Step 1.2: Replace the four UOE branches
134134

135-
- [ ] **Step 3: Edit `DefaultValidator.validate(...)`**
135+
- [x] **Step 3: Edit `DefaultValidator.validate(...)`**
136136

137137
Open `src/main/java/com/retailsvc/http/validate/DefaultValidator.java`. Replace these four lines:
138138

@@ -200,19 +200,19 @@ private void validateNot(Object value, Schema inner, String pointer) {
200200
}
201201
```
202202

203-
- [ ] **Step 4: Run the unit tests**
203+
- [x] **Step 4: Run the unit tests**
204204

205205
Run: `mvn -q test -Dtest=DefaultValidatorDispatchTest`
206206

207207
Expected: all tests in the class pass (the original 4 + the 9 new ones).
208208

209-
- [ ] **Step 5: Run the full unit test suite**
209+
- [x] **Step 5: Run the full unit test suite**
210210

211211
Run: `mvn -q test`
212212

213213
Expected: BUILD SUCCESS, 119 + 9 = 128 tests pass (or whatever count matches; no failures).
214214

215-
- [ ] **Step 6: Commit**
215+
- [x] **Step 6: Commit**
216216

217217
```bash
218218
git add src/main/java/com/retailsvc/http/validate/DefaultValidator.java \
@@ -241,7 +241,7 @@ EOF
241241

242242
### Step 2.1: Add failing parser tests
243243

244-
- [ ] **Step 1: Add tests covering the composition path**
244+
- [x] **Step 1: Add tests covering the composition path**
245245

246246
Append to `src/test/java/com/retailsvc/http/spec/schema/SchemaParserTest.java` (inside the class, before the final `}`):
247247

@@ -354,15 +354,15 @@ void aloneCombinatorStillReturnsCombinatorRecord() {
354354
}
355355
```
356356

357-
- [ ] **Step 2: Run the new parser tests (expect failures)**
357+
- [x] **Step 2: Run the new parser tests (expect failures)**
358358

359359
Run: `mvn -q test -Dtest=SchemaParserTest`
360360

361361
Expected: the 7 new tests fail. The composition tests fail because `parse(...)` currently returns a single combinator record (e.g. `OneOfSchema`), not an `AllOfSchema`. The `aloneCombinatorStillReturnsCombinatorRecord` test currently passes — it's a regression guard for the next step.
362362

363363
### Step 2.2: Rewrite the parser dispatch
364364

365-
- [ ] **Step 3: Replace the body of `SchemaParser.parse(Map<String, Object>)`**
365+
- [x] **Step 3: Replace the body of `SchemaParser.parse(Map<String, Object>)`**
366366

367367
Open `src/main/java/com/retailsvc/http/spec/schema/SchemaParser.java`. Replace the entire `parse` method (currently lines 15–55) with:
368368

@@ -467,19 +467,19 @@ The key behaviour changes:
467467
- The four combinator keywords are then each appended to the assertions list. `allOf` is flattened (its branches join the outer list directly), the others wrap.
468468
- A single assertion returns unwrapped; two or more wrap in `AllOfSchema`.
469469

470-
- [ ] **Step 4: Run the parser tests**
470+
- [x] **Step 4: Run the parser tests**
471471

472472
Run: `mvn -q test -Dtest=SchemaParserTest`
473473

474474
Expected: all `SchemaParserTest` tests pass, including the 7 new ones.
475475

476-
- [ ] **Step 5: Run the full unit suite**
476+
- [x] **Step 5: Run the full unit suite**
477477

478478
Run: `mvn -q test`
479479

480480
Expected: BUILD SUCCESS, no regressions in `ContainerSchemasTest`, `PrimitiveSchemasTest`, `CombinatorScaffoldTest`, etc.
481481

482-
- [ ] **Step 6: Commit**
482+
- [x] **Step 6: Commit**
483483

484484
```bash
485485
git add src/main/java/com/retailsvc/http/spec/schema/SchemaParser.java \
@@ -515,7 +515,7 @@ EOF
515515

516516
The fixture has stub `/anyOf` and `/allOf` paths with empty `post: {}`. Replace them with a real `/oneOf` route exercising a polymorphic body.
517517

518-
- [ ] **Step 1: Replace the stub paths in `openapi.yaml`**
518+
- [x] **Step 1: Replace the stub paths in `openapi.yaml`**
519519

520520
Open `src/test/resources/openapi.yaml`. Find the lines:
521521

@@ -560,7 +560,7 @@ Replace with:
560560
description: OK
561561
```
562562
563-
- [ ] **Step 2: Mirror the change in `openapi.json`**
563+
- [x] **Step 2: Mirror the change in `openapi.json`**
564564

565565
Open `src/test/resources/openapi.json`. Locate the `"/anyOf"` and `"/allOf"` keys (lines ~173 and ~178). Replace both blocks with a single `"/shapes"` entry equivalent to the YAML above. Use the existing JSON formatting (2-space indent, `application/json` media type). Worked example:
566566

@@ -604,7 +604,7 @@ Make sure the trailing comma on the previous path entry (or this one) is correct
604604

605605
### Step 3.2: Add a test handler
606606

607-
- [ ] **Step 3: Create `PolymorphicHandler.java`**
607+
- [x] **Step 3: Create `PolymorphicHandler.java`**
608608

609609
Create `src/test/java/com/retailsvc/http/start/PolymorphicHandler.java`:
610610

@@ -632,7 +632,7 @@ public class PolymorphicHandler implements HttpHandler {
632632

633633
### Step 3.3: Add the integration test
634634

635-
- [ ] **Step 4: Add tests to `OpenApiServerIT.java`**
635+
- [x] **Step 4: Add tests to `OpenApiServerIT.java`**
636636

637637
Open `src/test/java/com/retailsvc/http/OpenApiServerIT.java`. Add a new nested class at the bottom of the outer class (immediately before the final `}` of `OpenApiServerIT`):
638638

@@ -724,21 +724,21 @@ class Shapes {
724724

725725
The `ofString`, `BodyHandlers`, and `assertThat` imports are already present at the top of `OpenApiServerIT.java`; no new imports needed beyond `org.junit.jupiter.api.Nested` (also already present) and `java.io.IOException` (already imported).
726726

727-
- [ ] **Step 5: Run the integration tests**
727+
- [x] **Step 5: Run the integration tests**
728728

729729
Run: `mvn -q verify -DfailIfNoTests=false -Dtest='!*' -Dit.test=OpenApiServerIT`
730730

731731
Or simply: `mvn -q verify`
732732

733733
Expected: BUILD SUCCESS. The four new IT cases all pass.
734734

735-
- [ ] **Step 6: Run the full verify**
735+
- [x] **Step 6: Run the full verify**
736736

737737
Run: `mvn -q verify`
738738

739739
Expected: BUILD SUCCESS. All previous unit tests + the 9 new validator tests + the 7 new parser tests + the 4 new IT tests pass.
740740

741-
- [ ] **Step 7: Commit**
741+
- [x] **Step 7: Commit**
742742

743743
```bash
744744
git add src/test/resources/openapi.yaml src/test/resources/openapi.json \
@@ -762,9 +762,9 @@ EOF
762762

763763
## Final verification
764764

765-
- [ ] Run `mvn -q verify` once more.
766-
- [ ] `git log --oneline master..HEAD` shows three new commits in this order: `feat: Implement combinator validation…`, `feat: Compose combinators with sibling…`, `test: Add polymorphic-body integration…`.
767-
- [ ] No new files exist outside the paths listed above.
765+
- [x] Run `mvn -q verify` once more.
766+
- [x] `git log --oneline master..HEAD` shows three new commits in this order: `feat: Implement combinator validation…`, `feat: Compose combinators with sibling…`, `test: Add polymorphic-body integration…`.
767+
- [x] No new files exist outside the paths listed above.
768768

769769
## Out of scope (do not do)
770770

0 commit comments

Comments
 (0)