Skip to content

Commit 812e574

Browse files
committed
docs(1.0): ratify A2/A3/A4 — ADR-0035 Accepted
A2 FR-024 declared-API: DEFER (reserved-but-unregistered post-1.0; already absent from expected-registry.json; additive later) — removes the last breaking-round candidate, unblocking the quiet period. A3 deprecated codegen-ts/generators export: REMOVE at the 1.0/8.0 cut (G2), not before (removing an export is breaking; the major absorbs it). A4 own-your-codegen: RATIFIED per-port-idiomatic + documented in the new docs/features/own-your-codegen.md. ADR-0035 now Accepted (all [RATIFY] items resolved). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GF9xLEQZaPus5Y6opk398n
1 parent afd5f7e commit 812e574

3 files changed

Lines changed: 106 additions & 31 deletions

File tree

docs/1.0-readiness.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ Status legend: ✅ done · 🔶 in progress · ⬜ not started · ❓ **[RATIFY]
2222
backwards; `1.0.0 < 7.7.1` in every resolver), tied by a shared **`Metamodel 1.0`
2323
spec version** (OpenTelemetry / protobuf-editions model; the Java jump is the
2424
Angular 2→4 precedent). *ADR-0035 §2 (rewritten).* Unblocks G1; adds C4.
25-
-**A2. FR-024 declared-API: land vs defer.** Land `api.*`/`operation.*`/`binding.*`
26-
before 1.0, or defer post-1.0 with the vocabulary *reserved but unregistered* (so
27-
adding it later is additive). *Tracked in #10.*
28-
-**A3. Deprecated `@metaobjectsdev/codegen-ts/generators` export.** Remove at 1.0
29-
(1.0 is the natural major) vs retain one more line.
30-
-**A4. Cross-port "own your codegen."** Ratify per-port-idiomatic (TS `meta init`;
31-
JVM/Python/C# via build config) **and document it**, vs close a parity gap first.
25+
-**A2. FR-024 declared-API — RATIFIED: DEFER.** `api.*`/`operation.*`/`binding.*`
26+
stay reserved-but-unregistered post-1.0 (already absent from `expected-registry.json`;
27+
additive to add later). Removes the last candidate for a breaking round → unblocks the
28+
quiet period (G3). *Tracked in #10.*
29+
-**A3. Deprecated `codegen-ts/generators` export — RATIFIED: REMOVE at the cut.**
30+
Removed as part of the 1.0/8.0 major bump (**G2**), not before — removing an export is
31+
breaking, so the major absorbs it. Consumers use the `meta init`-scaffolded owned
32+
copies.
33+
-**A4. Cross-port "own your codegen" — RATIFIED: idiomatic + documented.** The
34+
per-port split (TS `meta init`; JVM/Python/C# via build config) is intentional, not a
35+
parity gap. → **D4** written: `docs/features/own-your-codegen.md`.
3236

3337
---
3438

@@ -39,8 +43,10 @@ Status legend: ✅ done · 🔶 in progress · ⬜ not started · ❓ **[RATIFY]
3943
CLI surface, scaffold-and-own contract — and what it does *not* (generator
4044
internals, runtime helper internals, reserved/experimental vocab).
4145
-**B2. Write the `0.x → 1.0` migration guide.** Consolidate the breaking changes
42-
adopters must absorb (verify strict-default, jsonb open-bag parsed-value, the
43-
deprecated-export removal if A3=remove, any FR-024 vocab if A2=land).
46+
adopters must absorb: verify strict-default, jsonb open-bag parsed-value, the
47+
metamodel-1.0 vocabulary program, `index.*`/`@unique` removal (ADR-0040), and the
48+
deprecated-export removal (A3=remove). FR-024 is deferred (A2), so no declared-API
49+
vocab to migrate.
4450

4551
## C. Metamodel freeze (the durable spine)
4652

@@ -78,9 +84,11 @@ Status legend: ✅ done · 🔶 in progress · ⬜ not started · ❓ **[RATIFY]
7884
`--lax`, `--template-spec`, target/output flags) per port, locked against the CLI
7985
architecture (ADR-0015) and surfaced in one matrix.
8086
- 🔶 **D3. Scaffold-and-own contract stable (TS)** — what `meta init` scaffolds + the
81-
`Generator` interface owned templates implement; resolve A3.
82-
-**D4. "Own your codegen" documented for every port** (resolve A4): the TS
83-
`meta init` flow and the JVM/Python/C# build-config equivalents, side by side.
87+
`Generator` interface owned templates implement. A3 resolved: the deprecated
88+
`codegen-ts/generators` re-export is removed at the cut (G2).
89+
-**D4. "Own your codegen" documented for every port** (A4 ratified) —
90+
`docs/features/own-your-codegen.md`: the TS `meta init` flow + the JVM/Python/C#
91+
build-config equivalents, side by side.
8492

8593
## E. Cross-port conformance + wire contract
8694

docs/features/own-your-codegen.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Own your codegen
2+
3+
MetaObjects treats generated code as a **disposable artifact** and the metamodel as
4+
the **durable spine**. You own the generated code in your repo — it runs without any
5+
MetaObjects runtime dependency, and if `@metaobjectsdev/*` (or the Maven/PyPI/NuGet
6+
packages) disappeared, you keep working code.
7+
8+
"Own your codegen" means two related things, and how far each goes is **idiomatic per
9+
port** — this is intentional (ADR-0035 §3, ratified), not a parity gap:
10+
11+
1. **You own the invocation** — codegen runs through your own build, on your terms,
12+
in every port.
13+
2. **You own the templates** — in TypeScript, `meta init` scaffolds the reference
14+
generators *into your repo* so you can edit them (ADR-0034 scaffold-and-own). The
15+
JVM/Python/C# ports own codegen through **build configuration** rather than copied
16+
template files; template customization there is via the declarative
17+
template-codegen surface (`--template-spec` / Mustache) and the generator-selection
18+
SPI.
19+
20+
Either way, hand-edits inside a generated file survive regeneration: the TS toolchain
21+
three-way-merges against a committed merge base, so your edits are preserved.
22+
23+
## Per port
24+
25+
| Port | Invocation | Template ownership model |
26+
|---|---|---|
27+
| **TypeScript** | `meta init``meta gen` (Bun/Node CLI) | **Scaffold-and-own**`meta init` copies `entityFile`/`queriesFile`/`routesFile`/`barrel` into `codegen/generators/*.ts`; `metaobjects.config.ts` imports those local copies. Edit them freely. |
28+
| **C#** | `dotnet meta gen` / `dotnet meta verify` (.NET tool) | Build-config: the generator set (EF Core entities + `AppDbContext` + CRUD routes) is selected via config; customize via template-spec. |
29+
| **Java / Kotlin** | `mvn metaobjects:generate` / `mvn metaobjects:verify` (`metaobjects-maven-plugin`) | Build-config: generators selected in `pom.xml`, by **stable name** (`entity`/`routes`/…) through the `GeneratorRegistryProvider` ServiceLoader SPI. Kotlin generators run through the same goal. |
30+
| **Python** | `metaobjects gen` / `metaobjects verify` (console-script) | Build-config: the generator set (Pydantic + FastAPI + SQLAlchemy) selected via config; customize via template-spec. |
31+
32+
*(Full command/flag matrix and rationale: [`docs/features/cli.md`](cli.md), locked per
33+
ADR-0015. Schema migrations are TypeScript-owned across all ports.)*
34+
35+
## What's shared vs. per-port
36+
37+
- **Shared (the durable contract):** the metamodel vocabulary, the canonical/YAML
38+
format, the wire/normalization contract, and the *shape* of the generated artifacts
39+
(verified byte-for-byte by the codegen + api-contract conformance corpora across all
40+
five ports). A given entity produces the same logical model, routes, and validation
41+
everywhere.
42+
- **Per-port (idiomatic):** *how* you invoke codegen (npm CLI vs `dotnet` tool vs
43+
Maven goal vs console-script) and *how far* template ownership goes (TS copies
44+
editable templates into your repo; the other ports own codegen via build config +
45+
the declarative template surface). This split follows each ecosystem's norms
46+
rather than forcing a single mechanism.
47+
48+
## Deprecated (removed at 1.0)
49+
50+
Importing the built-in generators from `@metaobjectsdev/codegen-ts/generators`
51+
(`entityFile`, `queriesFile`, `routesFile`, `barrel`) is **deprecated** (ADR-0034) and
52+
**removed at the 1.0/8.0 release**. Use the owned copies `meta init` scaffolds into
53+
`codegen/generators/*` and import those from your `metaobjects.config.ts`.

spec/decisions/ADR-0035-one-zero-stability-commitment-and-version-unification.md

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
## Status
44

5-
**Proposed** (2026-06-29; §2 version-line strategy **ratified 2026-07-02** — decouple).
5+
**Accepted** (2026-06-29; all **[RATIFY]** items resolved 2026-07-02).
66
Companion checklist: [`docs/1.0-readiness.md`](../../docs/1.0-readiness.md).
77

8-
This ADR frames the decisions a 1.0 release commits to; the bracketed **[RATIFY]**
9-
items are open calls for the maintainer to confirm before this moves to *Accepted*.
10-
It does not itself change any code or contract. **§2 (version-line strategy) is
11-
ratified: decouple — npm/PyPI/NuGet `→1.0.0`, Java/Kotlin `→8.0.0`, tied by a shared
12-
`Metamodel 1.0` spec version.** The §3 items (A2 FR-024, A3 deprecated export, A4
13-
own-your-codegen) remain open.
8+
This ADR frames the decisions a 1.0 release commits to. All bracketed **[RATIFY]**
9+
items are now resolved:
10+
- **§2 version-line strategy — decouple:** npm/PyPI/NuGet `→1.0.0`, Java/Kotlin
11+
`→8.0.0`, tied by a shared `Metamodel 1.0` spec version.
12+
- **§3 A2 FR-024 — defer** (reserved-but-unregistered post-1.0).
13+
- **§3 A3 deprecated export — remove at the 1.0/8.0 cut** (G2, not before).
14+
- **§3 A4 own-your-codegen — ratified per-port-idiomatic + documented.**
15+
16+
It does not itself change code; the one-time moves it commits to (version
17+
re-baselining, the export removal) execute at the cut per `docs/1.0-readiness.md` §G.
1418

1519
## Context
1620

@@ -126,18 +130,28 @@ by the conformance matrix. Pre-cut the vocabulary is "Metamodel 0.x / in
126130
development"; the cut *freezes* it as `1.0` (mirroring OTel's own 0.x→1.0). Tracked
127131
in `docs/1.0-readiness.md` (§C).
128132

129-
### 3. Gating items — the breaking-change consolidation window — **[RATIFY each]**
130-
131-
Treat the next one or two `0.x`/`7.x` releases as the window to land every breaking
132-
change we still want, then freeze. Before cutting 1.0:
133-
- **FR-024 declared-API:** land it, **or** explicitly defer post-1.0 with
134-
`api.*`/`operation.*`/`binding.*` *reserved but unregistered* (so adding them later
135-
is additive, not breaking). **[RATIFY: land vs defer]**
136-
- **Deprecated `codegen-ts/generators` export:** remove at 1.0 (1.0 is the natural
137-
major for it), **or** consciously retain one more line. **[RATIFY: remove vs keep]**
138-
- **Cross-port "own your codegen":** ratify that it is *per-port-idiomatic* (TS
139-
`meta init`; JVM/Python/C# via build config) and **document that explicitly**, OR
140-
close a parity gap first. **[RATIFY: idiomatic-and-document vs close-gap]**
133+
### 3. Gating items — the breaking-change consolidation window — **[RATIFIED 2026-07-02]**
134+
135+
Treat the next one or two releases as the window to land every breaking change we
136+
still want, then freeze. Before cutting 1.0:
137+
- **FR-024 declared-API — [RATIFIED: DEFER].** `api.*`/`operation.*`/`binding.*` stay
138+
**reserved but unregistered** post-1.0 (they are already absent from
139+
`expected-registry.json`; ADR-0030 defines the shape). Adding them later is
140+
*additive*, so deferral costs nothing and keeps the declared-API surface out of the
141+
1.0 breaking window. This is what makes the quiet period achievable — it removes the
142+
only remaining candidate for another breaking round (§C3). Tracked in #10.
143+
- **Deprecated `codegen-ts/generators` export — [RATIFIED: REMOVE at the cut].** The
144+
`@deprecated ADR-0034` re-exports (`entityFile`/`queriesFile`/`routesFile`/`barrel`
145+
from `@metaobjectsdev/codegen-ts/generators`) are removed **as part of the 1.0/8.0
146+
major bump (G2)***not before*. Removing an export is itself a breaking change;
147+
doing it at the major absorbs it, whereas doing it during the run-up would restart
148+
the quiet-period clock (§G3). Consumers migrate to the `meta init`-scaffolded owned
149+
copies under `codegen/generators/*`.
150+
- **Cross-port "own your codegen" — [RATIFIED: idiomatic + document].** The per-port
151+
split is intentional and *not* a parity gap to close: TS uses `meta init`
152+
scaffold-and-own; the JVM/Python/C# ports own their codegen via build config
153+
(Maven `metaobjects:gen`, `metaobjects gen`, `dotnet meta gen`). Documented in
154+
`docs/features/own-your-codegen.md` (readiness D4).
141155
- **Metamodel freeze:** the metamodel-1.0 vocabulary program (`0.15.0`/`7.7.0`;
142156
ADR-0036/0037/0038) was the intended finalization, and ADR-0037 sets the framework
143157
for future additions; `registry-conformance` is the enforcer. **The actual last

0 commit comments

Comments
 (0)