Skip to content

Commit 77ccdf4

Browse files
authored
chore(deps): upgrade MetaObjects to 1.3.0 (#54)
Bump every @metaobjectsdev package (cli, codegen-ts, render, runtime-ts, sdk, metadata) from 1.2.0 to 1.3.0 and regenerate with the 1.3.0 CLI, following the 1.3.0 "Upgrading from 1.2.0" notes: - Port the owned composition-loaders generator off the removed ts-poet printer, formatTs and renderFindByIdFn onto TsWriter, writeDbType and writeFindByIdFn. lineage-mappers drops the removed formatTs. - Drop the now-unused ts-poet devDependency. - The hash manifest is now one file per package under .metaobjects/.gen-state/.hashes/; .gitignore un-ignores that directory instead of .hashes.json and keeps the new fingerprint file ignored. - TypeScript generation runs no formatter, so the generated tree changes layout once; the prompt render helpers now pass the payload field tree so an unknown template variable raises at render time. - Refresh the agent context (meta init --docs-only --refresh-docs), which retires .metaobjects/CLAUDE.md; update the version and manifest path in CLAUDE.md and README.md. npm run check (drift gate, verify:db, tsc, 233 tests) and build:web pass.
1 parent cffbf7a commit 77ccdf4

86 files changed

Lines changed: 3644 additions & 3050 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/skills/metaobjects-audit/SKILL.md‎

Lines changed: 256 additions & 193 deletions
Large diffs are not rendered by default.

‎.claude/skills/metaobjects-audit/references/calibration.md‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@
1010
- Planned, not shipped
1111
- Cross-port version-number skew
1212
- Stale upstream prose
13+
- Include-only templates
14+
- Owned generator copies with lines of their own
15+
- Enum-member literals at a checked position
1316

1417
- **Filter-operator route codegen — the baseline grammar ships in all five ports.** The
1518
`?filter[field][op]=value` grammar (all 9 operators `eq/ne/gt/gte/lt/lte/in/like/isNull`,
1619
implicit-AND across params, the generated `<Entity>FilterAllowlist` + `invalid-field` /
1720
`invalid-op` / `in`-over-cap 400s) is **generated in every port** (Java `SpringControllerGenerator`,
1821
C# `RoutesGenerator`, Python `router_generator`, Kotlin `KotlinSpringControllerGenerator`, TS) —
1922
gated by the api-contract corpus in BOTH lanes. **Flag hand-rolled filter parsing anywhere.**
20-
Only the *richer* surface is genuinely **TS-only**: free-text `?search=`, the explicit
21-
`filter[or][N]` / `filter[and][N]` nested boolean combinators (+ their nesting-depth cap), and
22-
leading-wildcard gating — do NOT flag the absence of those in a non-TS port.
23+
The *richer* list surface — free-text `?search=`, the explicit `filter[or][N]` /
24+
`filter[and][N]` nested boolean combinators (+ their nesting-depth cap), and leading-wildcard
25+
gating (ADR-0068) — passes in TypeScript and C#, and is **pending** in each other port until that port's
26+
1.3.0 REST-standard work lands. Do NOT flag the absence of those in a port that has not landed
27+
them yet.
2328
- **Output-parser codegen** ships in **all five ports** — Java's `SpringOutputParserGenerator`
2429
*generates* the `<Name>Parser` (the Jackson `readValue` lives inside that generated file). A
2530
hand-rolled parser in a **non-generated** file where a **responding `template.prompt`**
@@ -29,6 +34,9 @@
2934
- **C#** has no ObjectManager runtime tier (EF Core is the runtime) — hand services over the generated `DbContext` are expected.
3035
- **Cut subtypes** — `field.byte` / `field.short` / `field.class` are removed; never recommend them.
3136
- **TS/web-only** — `view.*` widget subtypes load in every port but are consumed only by TS/web; only `view.base` / `view.currency` are cross-port-gated.
32-
- **Planned, not shipped** — `api.*` / `operation.*` / `binding.*` (FR-024) and MCP exposure of declared prompts/tools are not yet in the registry; their absence is not an adopter defect.
33-
- **Cross-port version-NUMBER skew is by design** — TS/C#/Python `0.x` vs Java/Kotlin `7.x` Maven is correct; never flag the *number lines* differing. But that is exactly why you can't eyeball cross-language drift: compare **`metamodelVersion`** (Phase 0 cross-language consistency item), not the package numbers. A `metamodelVersion` MISMATCH across ports *is* a finding; so is a port lagging its ecosystem's latest release. Also flag *intra-port* drift (mixed versions within one port, or a runtime package in `devDependencies`).
37+
- **CALIBRATION — registered; generated by TypeScript only** — the declared-API surface (`api.operational`, `operation.query`, `operation.command`, `binding.rest`) and lifecycles (`transition.action` under a `field.enum`) are registered since 1.3.0 (ADR-0066), checked at load and by `verify`. TypeScript's service generator emits from them (transition commands, declared command and query shells, permission points); the other ports do not yet. Their absence in a non-TypeScript port is not an adopter defect; do NOT audit for them. MCP exposure of declared prompts/tools is planned and not in the registry.
38+
- **Cross-port version-NUMBER skew is by design** — TS/C#/Python `0.x` vs Java/Kotlin `7.x` Maven is correct; never flag the *number lines* differing. But that is exactly why you can't eyeball cross-language drift: compare **`metamodelVersion`** (Phase 0 cross-language consistency item), not the package numbers. A `metamodelVersion` MISMATCH across ports *is* a finding; so is a port lagging its ecosystem's latest release. A MATCH does not prove parity: added vocabulary does not move `metamodelVersion`, so ports on one metamodel version can still disagree on which attributes they know. Also flag *intra-port* drift (mixed versions within one port, or a runtime package in `devDependencies`).
3439
- **Stale upstream prose** — "hand-write the Spring controller" (Java/Kotlin) is out of date; trust `meta gen --list`, not stale prose.
40+
- **Include-only templates are not duplicates.** A prompt template whose body is only `{{> partial }}` includes is already the shared-partial fix the template-duplication check recommends. Identical stubs are the shape to want, never a byte-identical cluster to report (`references/prompt-anti-patterns.md`, template-text duplication).
41+
- **An owned generator copy with lines of its own is not thereby customized.** The listing prints `DIFFERS` for a deliberate customization and for a copy stale by version, and counts lines the reference later removed as "of your own". Check the copy's history before calling either (Phase 0, owned-generators check).
42+
- **An enum-member literal at a position the type checker verifies is not drift.** A value narrowed by the generated union or enum type breaks the build when the member is renamed. Signature 13 scores only a literal in a position nothing checks: a string-typed parameter, raw SQL, a JSON payload, an event name (`references/drift-signatures.md`).

‎.claude/skills/metaobjects-audit/references/capability-checklist.md‎

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ classify it (using the classification scheme in `SKILL.md`) and route the cutove
5858
- **`field.date` / `field.time` / `field.timestamp`** (`@autoSet`) — hunt hand-stamped
5959
`createdAt` / `updatedAt` assignments and ad-hoc temporal parsing; `@autoSet` stamps them.
6060
- **`field.enum`** (`@values`) — hunt hand-written TS unions, language `enum`s, or DB
61-
`CHECK ... IN (...)` lists that restate a modeled enum's members.
61+
`CHECK ... IN (...)` lists that restate a modeled enum's members. Two more hunts on the same
62+
capability: a member or event name typed as a hand string beside the generated constant
63+
(`drift-signatures.md`, signature 13), and a status-like enum column written without a
64+
condition on its current value (`surface-review-axes.md`, G3: every write conditional, through
65+
the port's ORM with generated constants, never raw SQL).
6266
- **`field.uuid`** — hunt UUIDs typed as bare strings / hand-validated.
6367
- **`field.object`** (`@objectRef`, `@storage`) — hunt hand-flattened owned columns or
6468
hand-rolled jsonb (de)serialization the `@storage` mode (`flattened`/`jsonb`/`subdocument`)
@@ -182,10 +186,11 @@ soft-delete / status / type view it models.
182186
`validator.regex`** — hunt hand field-level validation (presence, length, numeric range,
183187
array bounds, `@pattern` regex) the validator subtypes model.
184188
- **Cross-field validators** — `validator.comparison` (`@left`/`@op`/`@right`, e.g.
185-
"end ≥ start"), `validator.atLeastOne` (one-of-N present), `validator.requiredWhen`
189+
"end ≥ start"), `validator.atLeastOne` (one-of-N present), `validator.exactlyOne` (exactly one of N
190+
present), `validator.requiredWhen`
186191
(conditional-required), `validator.presentIff` (mutual presence). Hunt these as hand-coded
187-
multi-field rules — they ARE modelable (see the Semantic-constraint ratification section in
188-
`SKILL.md` to decide what belongs in shared metadata vs port-local).
192+
multi-field rules — they ARE modelable (see "Ratifying constraints before they enter the
193+
model" in `SKILL.md` to decide what belongs in shared metadata vs port-local).
189194
- **`validator.base`** — abstract base.
190195

191196
## View / Layout — `view.*`, `layout.*`
@@ -343,8 +348,10 @@ to nothing, and does not check that each claimed node complies).
343348
- **CALIBRATION — per-port codegen gaps:** the core `?filter[field][op]` filter grammar (all
344349
9 operators + the generated allowlist + `invalid-field` / `invalid-op` / `in`-over-cap 400s)
345350
is **generated in all five ports** (api-contract corpus, both lanes) — **flag hand-rolled
346-
filter parsing anywhere.** Only the richer surface (`?search=`, explicit
347-
`filter[or][N]` / `filter[and][N]` combinators, leading-wildcard gating) is TS-only.
351+
filter parsing anywhere.** The richer list surface (`?search=`, explicit
352+
`filter[or][N]` / `filter[and][N]` combinators, leading-wildcard gating; ADR-0068) passes in
353+
TypeScript and C#, and is pending in each other port until its 1.3.0 REST-standard work lands — do not
354+
flag its absence in a port before then.
348355
Output-parser codegen also ships in **all five ports**, keyed on a **responding
349356
`template.prompt`** (`@responseRef`), never on a `template.output` (ADR-0052) — Java's
350357
`SpringOutputParserGenerator` *generates* the parser (the Jackson `readValue` lives inside
@@ -353,14 +360,18 @@ to nothing, and does not check that each claimed node complies).
353360
non-`table` source-kind / flattened-object codegen is partial). **C#** has no
354361
ObjectManager runtime tier (EF Core *is* the runtime) — hand services over the generated
355362
`DbContext` are expected.
356-
- **Single-source config** — `apiPrefix` (URL prefix wired into routes + hooks), the
363+
- **Single-source config** — `apiPrefix` (where the generated routes mount; the web client
364+
takes its prefix from `baseUrl` on the fetcher provider, so check the two agree), the
357365
`naming` block of `.metaobjects/config.json` (column and table rules, read by every port)
358366
and per-target output dirs: hunt these values hard-coded in multiple places instead of
359367
resolved from config.
360-
- **CALIBRATION — planned, not yet shipped:** the declared-API surface (`api.base`,
361-
`api.operational`, `operation.query`, `operation.command`, `binding.rest`) and MCP exposure
362-
of declared prompts/tools are **not yet in the registry** — their absence is not an adopter
363-
defect; do NOT audit for them.
368+
- **CALIBRATION — registered; generated by TypeScript only:** the declared-API surface
369+
(`api.operational`, `operation.query`, `operation.command`, `binding.rest`) and lifecycles
370+
(`transition.action` under a `field.enum`) are registered since 1.3.0 (ADR-0066), checked at
371+
load and by `verify`. TypeScript's service generator emits from them (transition commands,
372+
declared command and query shells, permission points); the other ports do not yet. Their
373+
absence in a non-TypeScript port is not an adopter defect; do NOT audit for them. MCP exposure of declared prompts/tools is planned and not in
374+
the registry.
364375
- **CALIBRATION — cross-port version skew is by design:** TS/C#/Python on the `0.x` line vs
365376
Java/Kotlin on the `7.x` Maven line is correct — **never flag it.** Flag only *intra-port*
366377
version drift (mixed package versions within one port, or a runtime package in

0 commit comments

Comments
 (0)