Skip to content

Commit 40a6c87

Browse files
dmealingclaude
andcommitted
docs(enum): mark C# arrays + Java validation-hardening follow-ups done; add EF compile-check follow-up
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a67fa5a commit 40a6c87

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

docs/superpowers/specs/2026-05-23-enum-datatype-design.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,26 @@ the metadata layer. The empty-`@values` fixture, surfaced during review, replace
222222
- C#: real `enum` + `HasConversion<string>()`, DDL `CHECK` emission.
223223
- Conformance: the fixtures above run across every implemented port.
224224

225-
## Deferred (named so they are not silently dropped)
225+
## Completed follow-ups (post-initial-merge, 2026-05-23)
226226

227-
- Integer-backed enums (per-member symbol→value).
227+
- **C# scalar-array codegen** — DONE. `isArray` scalar/enum fields now emit `List<T>` /
228+
`List<EnumType>` properties, a `jsonb` column, and EF Core 8 `.PrimitiveCollection(...)`
229+
mapping (enum arrays add `.ElementType().HasConversion<string>()` so members persist as
230+
strings, consistent with scalar enums). The array-of-enum `CHECK` is suppressed (`!isArray`).
231+
- **Java structured error codes + post-load validation phase** — DONE. Java gained an
232+
`ErrorCode` enum (mirrors `ERROR-CODES.json`), a nullable `code` on `MetaDataException`,
233+
and a `ValidationPhase` run post-load by `MetaDataLoader`; enum `@values` validation moved
234+
out of the parser hook into it (own-only, eager-throw, structured code).
235+
236+
## Remaining follow-ups
237+
238+
- Integer-backed enums (per-member symbol→value) — no current consumer.
228239
- Non-identifier-safe member strings (kebab-case, leading digit, etc.) needing a
229-
symbol↔stored-value mapping.
230-
- Display labels (presentation/view layer).
231-
- Native Postgres `CREATE TYPE ... AS ENUM` (opt-in `@dbEnum`-style flag).
232-
- **C# scalar-array codegen** (incl. array-of-enum): the C# EF Core tier has no scalar-array
233-
emission yet, so an `isArray` enum is currently emitted as a scalar. When scalar-array
234-
codegen lands, suppress the column-level `CHECK` for array-of-enum (TS already guards
235-
`!isArray`). Tracked here so it isn't lost. The `enum-array` fixture exercises only the
236-
loader/serializer round-trip today (which all ports handle).
240+
symbol↔stored-value mapping — no current consumer.
241+
- Display labels (presentation/view layer) — no current consumer.
242+
- Native Postgres `CREATE TYPE ... AS ENUM` (opt-in `@dbEnum`-style flag) — portable
243+
`varchar`+`CHECK` covers current needs.
244+
- **EF Core compile-check harness** (CI): generated `AppDbContext` code is never compiled
245+
against EF Core today (only entity POCOs are Roslyn-checked), which let a non-compiling
246+
`.ToJson()` mapping slip through review. A test project referencing EF Core 8 (+ Npgsql)
247+
that compiles the emitted DbContext would catch this class of bug.

0 commit comments

Comments
 (0)