Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ working code.
| Templates + render (FR-004) | Yes | Yes | Yes (wraps Java) | Yes | Yes |
| Payload-VO codegen | Yes (via projection) | – (consumers use `Map`) | Yes (`@Serializable`) | Yes | – (consumers use `dict`) |
| Migration emission | `meta migrate` (Postgres / SQLite / D1) | Via TS toolchain (`@metaobjectsdev/cli migrate`) | Via TS toolchain (`@metaobjectsdev/cli migrate`) | Via TS toolchain (ADR-0015) | Via TS toolchain (ADR-0015) |
| DB-drift verify | `meta verify --db` | Template-drift: `Renderer.verify`; startup: `MetaClassDBValidatorService` | Template-drift: `Renderer.verify`; startup: `MetadataStartupValidator` | `dotnet meta verify` (codegen-drift) | Schema-drift is TS-owned (ADR-0015) |
| DB-drift verify | `meta verify --db` | Template-drift: `Renderer.verify`; schema-drift is TS-owned (ADR-0015) | Template-drift: `Renderer.verify`; startup: `MetadataStartupValidator` | `dotnet meta verify` (codegen-drift) | Schema-drift is TS-owned (ADR-0015) |
| Template-drift verify | Yes | Yes (`Renderer.verify`) | Yes (via Java) | Yes (`meta verify`) | Yes (`metaobjects.render.verify`) |
| YAML authoring (sigil-free → JSON) | Yes | Yes | Yes (via Java) | Yes | Yes |
| Runtime metadata (ObjectManager-style) | Yes (`runtime-ts`) | Yes (OMDB) | Yes (via Java OMDB + Exposed) | Roadmap | Yes (ObjectManager) |
Expand Down
6 changes: 3 additions & 3 deletions agent-context/skills/metaobjects-verify/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ can't drift by construction).
- **`--db`** — schema drift. Introspects the live database and fails if it has
diverged from metadata. This is a **schema concern, so it is the Node toolchain's
job regardless of your server language** (see migrations below). On the JVM ports
a runtime startup validator catches generated-table drift at app boot as a
complementary check, but the authoritative DB-vs-metadata gate is the Node
`verify --db`.
a runtime startup validator *can* catch generated-table drift at app boot as an
optional complementary check (if your project wires one), but the authoritative
DB-vs-metadata gate is the Node `verify --db`.

- **`--codegen`** — regeneration drift. Re-runs generation and diffs the result
against the committed generated files; a non-empty diff means someone edited
Expand Down
10 changes: 5 additions & 5 deletions docs/features/migrations-and-drift.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There are **7 drift sources**, and the toolchain has a guard for each.
|---|---|---|
| **Code-vs-DB** | Codegen — the generated SQL DDL is emitted from the same metadata as the entity / table code. | Build time |
| **Code-vs-API-doc** | Cross-port codegen from the same metadata. | Build time |
| **DB-vs-metadata** | `meta verify --db` (TS CLI) — introspects the live DB and fails if it has drifted from metadata. Java/Kotlin: runtime startup validator (`MetaClassDBValidatorService`) catches generated-table drift at app startup; the removed `meta:verify` Maven goal is not available. | CI on every PR (TS); app startup (Java/Kotlin) |
| **DB-vs-metadata** | `meta verify --db` (TS CLI) — introspects the live DB and fails if it has drifted from metadata. This is a schema concern owned by the Node toolchain regardless of server language; on the JVM ports the runtime auto-create/validator path was removed (ADR-0015) and the `meta:verify` Maven goal is not available. | CI on every PR |
| **Migration-vs-metadata** | `meta migrate` (TS / C# / Python) emits migrations FROM metadata diffs — they cannot drift from metadata by construction. Java/Kotlin schema migrations are also owned by the TS toolchain (`@metaobjectsdev/cli migrate`). | Build time |
| **Generated-edited** | `@generated` headers in emitted code + three-way merge that preserves hand-edits inside non-generated regions. | Code review |
| **Prompt-vs-payload** | FR-004 `Renderer.verify` parses `{{...}}` references in templates and checks each one exists on the payload VO. | Build time + runtime |
Expand Down Expand Up @@ -59,9 +59,9 @@ configured in `metaobjects.config.ts` (typically `./migrations/<timestamp>__<slu

Schema migrations for Java projects are owned by the **TypeScript toolchain**
(`@metaobjectsdev/cli migrate`). The Java Maven plugin's `meta:migrate` goal was
removed. Java retains a dev/test runtime auto-create path via
`MetaClassDBValidatorService` (the drivers' `createTable` DDL), not a migration
engine.
removed, and per ADR-0015 the OMDB runtime auto-create path was removed too —
OMDB is pure data-access (CRUD/query/codec/transactions). Provision the schema by
applying the TS-produced DDL/migrations to the database the Java service connects to.

Use the TS CLI against the same database the Java service connects to:

Expand Down Expand Up @@ -108,7 +108,7 @@ for current status.)
| Port | Command | What it does |
|---|---|---|
| TypeScript | `meta verify --db` | Introspects the live DB; reports DB-vs-metadata drift. |
| Java | `Renderer.verify` (build-time) + `MetaClassDBValidatorService` (startup) | Template-drift: verifies `{{...}}` references resolve against the payload VO. Live-DB-schema drift: startup validator asserts generated table objects match metadata. The `meta:verify` Maven goal (live-DB introspection) was removed. |
| Java | `Renderer.verify` (build-time) | Template-drift: verifies `{{...}}` references resolve against the payload VO. Live-DB-schema drift is TS-owned (`meta verify --db`); both the `meta:verify` Maven goal and the runtime auto-create validator were removed (ADR-0015). |
| Kotlin | `Renderer.verify` (build-time) + `MetadataStartupValidator` (startup) | Same as Java — template-drift and startup validation. No `meta:verify` Maven goal. |
| C# | `meta verify ./metadata --templates ./prompts` | Drift-checks templates against their payload VOs (FR-004 prompt-drift). |
| Python | `python -m metaobjects.render.verify` | Same as C# verify — template-vs-payload drift. |
Expand Down
14 changes: 7 additions & 7 deletions docs/ports/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ plus the `metaobjects-maven-plugin` for build-time codegen (`meta:gen` / `meta:e

Schema migrations are owned by the TypeScript toolchain (`@metaobjectsdev/cli migrate`);
the Java diff-and-converge migration engine and its `meta:migrate` / live-DB-drift
`meta:verify` Maven goals were removed. OMDB retains runtime persistence and a
dev/test runtime auto-create path (`MetaClassDBValidatorService`) only. Prompt /
template drift is still checked via the `metaobjects-render` `Verify` API.
`meta:verify` Maven goals were removed. Per ADR-0015 the OMDB runtime auto-create
path was also removed — OMDB is pure data-access (CRUD/query/codec/transactions).
Prompt / template drift is still checked via the `metaobjects-render` `Verify` API.

## Install

Expand Down Expand Up @@ -138,9 +138,9 @@ mvn compile # runs the generate goal (bound to generate-sources
```

Schema migrations are not a Java-port concern — author them with the TypeScript
toolchain (`@metaobjectsdev/cli migrate`). OMDB's runtime auto-create path can
bootstrap a dev/test schema at startup (`MetaClassDBValidatorService` with
`autoCreate=true`), but it is not a migration tool.
toolchain (`@metaobjectsdev/cli migrate`), then apply the resulting DDL to the
database OMDB connects to. OMDB itself is pure data-access; the former runtime
auto-create path was removed per ADR-0015.

## Use

Expand Down Expand Up @@ -247,7 +247,7 @@ configuration model that has not yet been specced.
| Templates + render (FR-004) | Yes (`metaobjects-render`) |
| Payload-VO codegen | Yes — `SpringPayloadGenerator` (in `metaobjects-codegen-spring`) emits a Java 21 `record` per template, mirrors the Kotlin shape |
| Output parser codegen (FR-006) | Not yet — see note below |
| Migrations | TS-only (`@metaobjectsdev/cli migrate`) — the Java engine was removed; OMDB offers runtime auto-create for dev/test only |
| Migrations | TS-only (`@metaobjectsdev/cli migrate`) — the Java migration engine and the OMDB runtime auto-create path were both removed (ADR-0015); apply the TS-produced DDL to the database |
| Drift verify | `Renderer.verify` / `Verify.verify` (prompts). Live-DB schema-drift verification is part of the TS migration toolchain |
| Runtime metadata | Full — OMDB ObjectManager |
| REST controller codegen | Spring Web MVC — `metaobjects-codegen-spring` (FR-008 §2.1) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ can't drift by construction).
- **`--db`** — schema drift. Introspects the live database and fails if it has
diverged from metadata. This is a **schema concern, so it is the Node toolchain's
job regardless of your server language** (see migrations below). On the JVM ports
a runtime startup validator catches generated-table drift at app boot as a
complementary check, but the authoritative DB-vs-metadata gate is the Node
`verify --db`.
a runtime startup validator *can* catch generated-table drift at app boot as an
optional complementary check (if your project wires one), but the authoritative
DB-vs-metadata gate is the Node `verify --db`.

- **`--codegen`** — regeneration drift. Re-runs generation and diffs the result
against the committed generated files; a non-empty diff means someone edited
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ can't drift by construction).
- **`--db`** — schema drift. Introspects the live database and fails if it has
diverged from metadata. This is a **schema concern, so it is the Node toolchain's
job regardless of your server language** (see migrations below). On the JVM ports
a runtime startup validator catches generated-table drift at app boot as a
complementary check, but the authoritative DB-vs-metadata gate is the Node
`verify --db`.
a runtime startup validator *can* catch generated-table drift at app boot as an
optional complementary check (if your project wires one), but the authoritative
DB-vs-metadata gate is the Node `verify --db`.

- **`--codegen`** — regeneration drift. Re-runs generation and diffs the result
against the committed generated files; a non-empty diff means someone edited
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ can't drift by construction).
- **`--db`** — schema drift. Introspects the live database and fails if it has
diverged from metadata. This is a **schema concern, so it is the Node toolchain's
job regardless of your server language** (see migrations below). On the JVM ports
a runtime startup validator catches generated-table drift at app boot as a
complementary check, but the authoritative DB-vs-metadata gate is the Node
`verify --db`.
a runtime startup validator *can* catch generated-table drift at app boot as an
optional complementary check (if your project wires one), but the authoritative
DB-vs-metadata gate is the Node `verify --db`.

- **`--codegen`** — regeneration drift. Re-runs generation and diffs the result
against the committed generated files; a non-empty diff means someone edited
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ can't drift by construction).
- **`--db`** — schema drift. Introspects the live database and fails if it has
diverged from metadata. This is a **schema concern, so it is the Node toolchain's
job regardless of your server language** (see migrations below). On the JVM ports
a runtime startup validator catches generated-table drift at app boot as a
complementary check, but the authoritative DB-vs-metadata gate is the Node
`verify --db`.
a runtime startup validator *can* catch generated-table drift at app boot as an
optional complementary check (if your project wires one), but the authoritative
DB-vs-metadata gate is the Node `verify --db`.

- **`--codegen`** — regeneration drift. Re-runs generation and diffs the result
against the committed generated files; a non-empty diff means someone edited
Expand Down
Loading