|
1 | | -# `codegen-conformance/` — PENDING (FR-007) |
2 | | - |
3 | | -> ⚠️ **This corpus does not exist yet.** It is **DEFERRED** and tracked as **FR-007**. |
4 | | -
|
5 | | -Cross-language codegen conformance is the one shared-corpus gap in the MetaObjects testing matrix. Other corpora exist (`conformance/`, `render-conformance/`, `persistence-conformance/`, `verify-conformance/`, `yaml-conformance/`). This one will gate **what** each port's codegen emits — file inventory, type-mapping semantics, FR-004 payload-VO shape — independently of *how* (each port emits its own ecosystem's native code). |
6 | | - |
7 | | -## Status |
8 | | - |
9 | | -- **Spec:** [docs/superpowers/specs/2026-05-25-fr-007-codegen-conformance-corpus-design.md](../../docs/superpowers/specs/2026-05-25-fr-007-codegen-conformance-corpus-design.md) |
10 | | -- **Blocked on:** `codegen-kotlin` shipping (the 4th codegen target — 3rd is TS, C# already shipped; Java's codegen-base is general-purpose but doesn't have an FR-004-typed payload generator). |
11 | | -- **Helped by:** Python codegen, when it ships, becoming the 5th port that needs to participate. |
12 | | - |
13 | | -## What this corpus will gate |
14 | | - |
15 | | -**Tier 1 (cross-port invariant):** |
16 | | -- File-per-entity inventory per declared generator |
17 | | -- Field type semantic mapping (`field.long` → 64-bit int everywhere; `field.currency` → minor-units long everywhere; etc.) |
18 | | -- Required vs nullable flags |
19 | | -- `@maxLength` propagation to the appropriate native column type |
20 | | -- FR-004 payload-VO field tree (each port's generated payload class has the same property names + semantic types) |
21 | | -- Generator-catalog membership (every port implements the same generator names) |
22 | | - |
23 | | -**NOT gated (intentionally divergent per port):** |
24 | | -- Native column type spelling |
25 | | -- Native repo / ORM style (Drizzle relations vs EF Core DbSet vs Exposed Table vs omdb-ktx extensions vs SQLAlchemy) |
26 | | -- Native serialization annotation |
27 | | -- Native package / module naming conventions |
28 | | -- Native framework integration |
29 | | - |
30 | | -## Why this README exists |
31 | | - |
32 | | -To make the gap **impossible to miss**. If you're reading this because you stumbled into this directory while building a new codegen target or looking for cross-port codegen tests — that gate doesn't exist yet, and the spec above is the plan-of-record for when it does. |
33 | | - |
34 | | -Until then, each port runs its own codegen snapshot tests against port-local golden files. Drift between ports is undetected. |
35 | | - |
36 | | -## Do not delete this README |
37 | | - |
38 | | -Even when the corpus eventually ships (per FR-007), keep this README to point newcomers at the design spec. |
| 1 | +# `codegen-conformance/` — REJECTED (FR-007 will not be built) |
| 2 | + |
| 3 | +> ⚠️ **This corpus is NOT going to be built.** FR-007 was **formally rejected 2026-05-26** |
| 4 | +> (`docs/superpowers/specs/2026-05-25-fr-007-codegen-conformance-corpus-design.md` §0), and the |
| 5 | +> 2026-05-31 conformance-hardening pass (A/B) re-confirmed the rejection with empirical evidence. |
| 6 | +> This README is kept only so a newcomer who lands here understands *why* there is no codegen |
| 7 | +> corpus, instead of re-proposing one. |
| 8 | +
|
| 9 | +## Why it was rejected |
| 10 | + |
| 11 | +A dedicated cross-port **codegen-output** corpus would add ~0 net coverage at real maintenance cost, |
| 12 | +because **codegen is a substrate and the behavior corpora already gate its observable consequences**: |
| 13 | + |
| 14 | +- Field-type semantics (`field.long`→64-bit, `field.currency`→minor-units long), required/nullable, |
| 15 | + and `@maxLength` propagation are gated by **`persistence-conformance/`** executing the generated |
| 16 | + DDL + queries — a wrong mapping explodes there. |
| 17 | +- The FR-004 payload-VO field tree is gated by **`render-conformance/`** (a missing/renamed VO field |
| 18 | + changes the byte-identical rendered output). |
| 19 | +- Generated validators, filters, and routes are gated by **`api-contract-conformance/`**. |
| 20 | +- "Generator-catalog membership" was a false premise — each port's catalog is idiomatic-divergent by |
| 21 | + design (TS `entityFile/queriesFile/...` ≠ C# `entities/AppDbContext/routes` ≠ Kotlin |
| 22 | + `Entity/ExposedTable/Payload/...`); there is no shared catalog to gate. |
| 23 | + |
| 24 | +**Empirical confirmation (2026-05-31):** the Phase-B normalization+projection work surfaced a real |
| 25 | +*codegen* bug in **every** port (C#'s MIN/MAX projection result-type + enum-over-view conversion, |
| 26 | +Kotlin's missing `TimeField` arm, etc.) — and every one was caught by the **behavior** (persistence |
| 27 | +round-trip) corpus, exactly as the rejection predicted. Codegen drift that matters shows up in |
| 28 | +behavior; codegen drift that doesn't is, by definition, not a correctness issue. |
| 29 | + |
| 30 | +## The one residual gap — handled opportunistically, not by a corpus |
| 31 | + |
| 32 | +Codegen/type drift *could* go uncaught for vocabulary **no behavior corpus exercises** — the |
| 33 | +"type-universe-shrinks" long tail (`field.short`/`byte`, `validator.{length,regex,numeric,array}`, |
| 34 | +non-cascade `@onDelete`/`@onUpdate`, `@kind: storedProc|tableFunction|materializedView`, the |
| 35 | +`view.*` UI subtypes). This is the lowest-priority backlog tier (hardening-review **R10**), and it is |
| 36 | +closed the project's normal way: **adding new metamodel behavior ⇒ add a behavior-corpus fixture that |
| 37 | +exercises it** (`spec/conformance-tests.md`). No standing codegen-manifest corpus is needed; add a |
| 38 | +persistence/api-contract fixture when one of those types/validators is touched. |
| 39 | + |
| 40 | +## Do not delete this README / do not re-propose FR-007 |
| 41 | + |
| 42 | +Keep this file so the gap-that-isn't stays documented. If you believe a codegen corpus is warranted, |
| 43 | +the bar (per the rejection) is **a concrete codegen-drift incident that slipped past the behavior |
| 44 | +corpora** — not a coverage-completeness argument. |
0 commit comments