Skip to content

Commit 93657c5

Browse files
dmealingclaude
andcommitted
feat(conformance): SP-H Unit10 — add field.date/field.time metamodel fixtures + resolve Kotlin metamodel-corpus coverage
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 492d02f commit 93657c5

4 files changed

Lines changed: 90 additions & 4 deletions

File tree

docs/superpowers/plans/2026-06-03-sp-h-field-subtype-hardening-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ For EACH port (one unit): implement `op: roundtrip` in the port's persistence ru
5252
- [ ] Review + simplify gate. Commit `feat(metadata): SP-H Unit9 — cross-port filter-op reconciliation (uuid/currency) + filterable-without-ops guard + fixture`.
5353

5454
### Unit 10: Coverage holes (metamodel + Kotlin corpus + boolean/object/date/time)
55-
- [ ] Add `field.date`/`field.time` to the metamodel `fixtures/conformance/` corpus; add `field.boolean` + a typed `field.object` to the persistence WRITE round-trip corpus (Unit 3). **Wire Kotlin to run the shared metamodel `fixtures/conformance/` corpus** (or document why not). All 5 ports green. Review + simplify. Commit `feat(conformance): SP-H Unit10 — close field-subtype coverage holes (date/time metamodel, boolean/object roundtrip, Kotlin metamodel corpus)`.
55+
- [x] **DONE.** Added the `field-date-time-basic` metamodel fixture (`field.date` + `field.time` on one entity) to `fixtures/conformance/`; all four metamodel runners (TS / C# / Java / Python) discover + pass it (TS 304→306, Java 306, C# 558, Python green). **`field.boolean` + a typed `field.object` are already covered by the Unit 3 `AllTypes` op:roundtrip persistence scenario** (`bVal`, `settings` jsonb) — no new persistence work. **Kotlin metamodel corpus: DOCUMENTED, not wired (the principled answer).** Kotlin has no distinct loader/parser/serializer — `metadata-ktx`'s `Loader.kt` forwards directly to the Java `metadata` module's `MetaDataLoader`, which Java already runs the full corpus against (`ConformanceTest`); a parallel Kotlin run would re-invoke identical bytecode for zero added coverage. Kotlin's distinct surfaces (codegen/runtime) are gated by render/persistence/api-contract corpora, and its emitted vocabulary is byte-gated by `registry-conformance`. Documented in `fixtures/conformance/README.md`. Commit `feat(conformance): SP-H Unit10 — add field.date/field.time metamodel fixtures + resolve Kotlin metamodel-corpus coverage`.
5656

5757
## Phase 4 — Matrix gate + finish
5858

fixtures/conformance/README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,23 @@ an `@`-prefixed attribute in alphabetical order. `expected.json` and
1212
`expected-effective.json` are the authoritative reference for the shape — when
1313
in doubt, read one.
1414

15-
Port status: TypeScript reference (v0.3) passes the full corpus; C# loader +
16-
conformance shipped; Java H3a (loader restructure) shipped 2026-05-19, H3b
17-
(conformance harness) in progress; Python planned.
15+
Port status: the **metamodel loader + canonical serializer corpus is run by
16+
four ports — TypeScript, C#, Java, and Python — all green.**
17+
18+
**Kotlin runs this corpus transitively, not as a separate run — by design.**
19+
Kotlin has no distinct loader, parser, or canonical-serializer surface: the
20+
`metadata-ktx` facade (`com.metaobjects.metadata.ktx.Loader`) forwards every
21+
call straight to `MetaDataLoader` in the Java `metadata` module, which is the
22+
single JVM implementation of the load/parse/canonical-serialize path this corpus
23+
exercises. Java already runs the full corpus against that exact code
24+
(`metadata/src/test/java/com/metaobjects/conformance/ConformanceTest.java`), so
25+
wiring a parallel Kotlin metamodel-corpus run would re-invoke identical bytecode
26+
through a Kotlin harness — redundant, with zero added coverage. Kotlin's
27+
*distinct* surfaces (codegen via `codegen-kotlin`, runtime via Exposed) are gated
28+
by their own corpora (render-conformance, persistence-conformance, and
29+
api-contract-conformance, all of which Kotlin runs as a first-class port). The
30+
shared metamodel **vocabulary** Kotlin emits is additionally byte-gated by
31+
`fixtures/registry-conformance/` (Kotlin is live + green there).
1832

1933
## A scenario directory
2034

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"metadata.root": {
3+
"package": "acme",
4+
"children": [
5+
{
6+
"object.entity": {
7+
"name": "Appointment",
8+
"children": [
9+
{
10+
"field.long": {
11+
"name": "id"
12+
}
13+
},
14+
{
15+
"field.date": {
16+
"name": "scheduledOn"
17+
}
18+
},
19+
{
20+
"field.time": {
21+
"name": "startsAt"
22+
}
23+
},
24+
{
25+
"identity.primary": {
26+
"@fields": [
27+
"id"
28+
]
29+
}
30+
}
31+
]
32+
}
33+
}
34+
]
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"metadata.root": {
3+
"package": "acme",
4+
"children": [
5+
{
6+
"object.entity": {
7+
"name": "Appointment",
8+
"children": [
9+
{
10+
"field.long": {
11+
"name": "id"
12+
}
13+
},
14+
{
15+
"field.date": {
16+
"name": "scheduledOn"
17+
}
18+
},
19+
{
20+
"field.time": {
21+
"name": "startsAt"
22+
}
23+
},
24+
{
25+
"identity.primary": {
26+
"@fields": [
27+
"id"
28+
]
29+
}
30+
}
31+
]
32+
}
33+
}
34+
]
35+
}
36+
}

0 commit comments

Comments
 (0)