Skip to content

Commit b146665

Browse files
authored
fix(cli): run codegen and template gates on bare verify in every port (#475)
* feat(verify): bare verify runs the same default gates in every port A bare verify now covers codegen drift, prompt templates and the requirement ledger in all five ports; --db/--deps/--replay stay opt-in. A gate with no configuration is skipped with a one-line note. Also corrects the mysql recipe (Python ships SQLite and MySQL drivers) and the api-contract in-list cap note (all five ports enforce it). * no-mistakes(review): apply reviewer inline fixes * no-mistakes(review): Fail bare verify on broken config; clarify C# --out * no-mistakes(document): Align bare-verify docs with uniform gate set * no-mistakes(lint): Remove stray .e2e-verify artifacts leaking local paths * no-mistakes(document): Stale bare-verify wording fixed in cli.py docstring, cli.md (Python and Java rows), MetaDataVerifyMojo comment and one Python test comment. The mysql.md and api-contract.md corrections were already on the branch and checked against code: Python has SQLite and PyMySQL drivers, and the in-list cap of 100 exists in all five ports. Doc edits only; no behavior or test logic changed.
1 parent be3afd9 commit b146665

35 files changed

Lines changed: 541 additions & 144 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,27 @@ here.**
3737
[docs/features/api-contract.md](docs/features/api-contract.md#report-export) and
3838
[ADR-0031 Amendment 1](spec/decisions/ADR-0031-serialization-vs-data-download-boundary.md).
3939

40+
### Changed
41+
42+
- **A bare `verify` runs the same default gate set in every port: codegen drift, prompt
43+
templates and the requirement ledger.** Until now a bare run covered one gate: `meta verify`
44+
and `dotnet meta verify` ran only templates, so "run `verify` in CI" did not catch generated
45+
code that had fallen behind the model; `metaobjects verify` and `mvn metaobjects:verify` ran
46+
only codegen, so prompt drift passed. `--db`, `--deps` and `--replay` stay opt-in, and naming a
47+
subverb still runs only the gates named. A gate the run has no configuration for is skipped
48+
with a one-line note instead of failing: `meta verify` without a `metaobjects.config.ts` (a config that exists but fails to load exits 2),
49+
`metaobjects verify` with no `metaobjects.config.yaml` and no `--prompts`, `dotnet meta verify`
50+
without `--out <dir>` and `codegen/Generators.cs` (C# has no config-resolved output directory:
51+
pass `--out <dir>` in CI to get the codegen gate), `mvn metaobjects:verify` without
52+
`-Dmeta.verify.templateRoot`. Pinned per port by tests that run a bare verify over drifted
53+
input. **Behaviour change:** a CI step that ran a bare `verify` and relied on the narrower
54+
default can now go red where it was green, because the gate it never ran now runs. Node
55+
`meta` and C# gain the codegen gate (stale generated output fails), Python and Java/Kotlin
56+
gain the template gate (prompt drift fails, when a template root is configured). To keep the
57+
old scope, name the gate: `meta verify --templates`, `dotnet meta verify --templates`,
58+
`metaobjects verify --codegen`, `mvn metaobjects:verify -Dmeta.verify.mode=codegen`. The Maven
59+
`meta.verify.mode` parameter no longer defaults to `codegen`; unset means both gates.
60+
4061
### Fixed
4162

4263
- **A failed `meta deps sync` no longer leaves a lock and snapshot that cannot load.** The
@@ -49,6 +70,9 @@ here.**
4970

5071
### Documentation
5172

73+
- **Two doc errors corrected against the code.** `docs/recipes/mysql.md` said Python ships a
74+
Postgres driver only; it ships SQLite and MySQL drivers beside it. `docs/features/api-contract.md`
75+
said only TypeScript enforces the `in`-list cap of 100; every port does.
5276
- **The fit-assessment prompt's capability sheet is re-checked against 1.1.4 / Maven 8.1.4**
5377
(it read 1.0.8, last checked 2026-09-26): reporting, the requirements gate and
5478
`--require-implementers`, the `wire` setting and eject in every port are now listed. The hosted

‎agent-context/skills/metaobjects-audit/references/typescript.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ meta gen # render → 3-way merge → write (overwrites @
4141
meta gen --dry-run # preview without writing
4242
meta gen Author Post # scope to named entities
4343
meta verify --codegen # regenerate to temp, diff vs committed output
44-
meta verify --templates # check {{field}} refs vs payload VO (bare `meta verify` default)
44+
meta verify --templates # check {{field}} refs vs payload VO (a bare `meta verify` runs this and `--codegen`)
4545
meta verify --db # schema drift — live DB vs metadata (requires DB connection)
4646
meta verify --codegen --templates --db # all three drift checks in one pass
4747
```

‎agent-context/skills/metaobjects-codegen/references/csharp.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ in, and C# ejects land in its `codegen/generators/` beside the `.ts` copies. The
8989
`Codegen.csproj` compiles only `*.cs` and `tsconfig.codegen.json` only `*.ts`. Ignore the
9090
build output (`codegen/bin/`, `codegen/obj/`) in `.gitignore`.
9191

92-
`dotnet meta verify` defaults to `--templates` (the FR-004 prompt/template drift
93-
gate, see the prompts reference); `--codegen` is the codegen-output drift gate.
92+
A bare `dotnet meta verify` runs `--templates` (the FR-004 prompt/template drift
93+
gate, see the prompts reference) and `--codegen` (the codegen-output drift gate;
94+
skipped with a note unless `--out <dir>` and `codegen/Generators.cs` are present).
9495
**Schema migration + live-DB drift are NOT `dotnet meta`** — they run through the
9596
Node `meta` tool (see the migration reference).
9697

‎agent-context/skills/metaobjects-fit-assessment/references/capability-sheet.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ building block. Every generator is a reference helper an adopter selects, ejects
2727
(`server/typescript/packages/codegen-ts/src/db-emitting.ts`).
2828
- **The drift gate per port** — regenerate into a temp tree and diff: `meta verify --codegen`
2929
(TS); `mvn metaobjects:verify` (Java/Kotlin; `codegen` is the default mode); `dotnet meta
30-
verify --codegen` (C#; bare `verify` means `--templates` there); `metaobjects verify` (Python;
31-
`--codegen` is the default). Source: `docs/features/cli.md`.
30+
verify --codegen` (C#; bare `verify` runs it when `--out` and `codegen/Generators.cs` are present);
31+
`metaobjects verify` (Python; `--codegen` is part of the default). Source: `docs/features/cli.md`.
3232
- **Generated code compiles**: a codegen-compile gate compiles every port's emitted model tier
3333
with its real compiler in CI (`docs/CONFORMANCE.md`, "Split coverage").
3434
- **Sharing a model** (`docs/features/metadata-dependencies.md`): in one repository, every port

‎agent-context/skills/metaobjects-verify/SKILL.md‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,16 @@ JSON. A pass that did not run reports `status: "skipped"` and why, so an empty l
9292
always means "found nothing", never "never looked"; what the payload does not carry
9393
is named in its own `notRepresented[]`.
9494

95-
**A bare `verify` is a partial check, not the full gate.** The Node/C# default runs
96-
only `--templates`; Java/Python's bare default runs only `--codegen` — either way,
97-
paired with the advisory anti-pattern pass above, never all three subverbs. Treat a
98-
bare run as a smoke test: the real done-check is running the subverbs your project
99-
uses explicitly — `verify --codegen`, and, where a DB exists, `verify --db <url>`.
100-
The Node `meta verify` ends every run, bare or not, with a `not run:` line naming
101-
each gate it skipped and the flag that selects it; on a model with no templates a
102-
bare run checks nothing but the requirement ledger and still exits 0, so never
103-
wire a bare `meta verify` into CI as the whole gate.
95+
**A bare `verify` runs the code gates, not the database gate.** In every port a bare
96+
run covers codegen drift (stale generated code), prompt-template drift and the
97+
requirement ledger, paired with the advisory anti-pattern pass above. `verify --db
98+
<url>`, `--deps` and `--replay` stay opt-in (`--db` is Node `meta` only). A bare run
99+
skips a gate it has no configuration for and says so in one line: Node `meta` with
100+
no `metaobjects.config.ts`, Python with no `metaobjects.config.yaml`, `dotnet meta`
101+
with no `--out <dir>` or `codegen/Generators.cs`, Maven with no `templateRoot`. The
102+
Node `meta verify` ends every run, bare or not, with a `not run:` line naming each
103+
gate it skipped and the flag that selects it; read it, because a skipped gate is a
104+
gate that did not guard the build.
104105

105106
## Requirements are checked on every run
106107

‎docs/features/api-contract.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,10 @@ ports accept leading wildcards, which is exactly why it is listed here as a
197197
TS-only extension).
198198

199199
The **`in`-list size cap** (reject an `in` list longer than 100 → HTTP 400) is a
200-
safety limit, not a feature — TS enforces it, the other ports currently do not.
201-
Unifying that cap cross-port is the one item here worth doing regardless of
202-
feature demand (it is a consistency/safety divergence, not a capability).
200+
safety limit, not a feature, and every port enforces it: TypeScript
201+
(`DEFAULT_MAX_IN_LIST` in the `runtime-ts` filter parser), Python (`MAX_IN_LIST`),
202+
Java (`FilterParser.MAX_IN_LIST`), C# (`FilterParser.MaxInList`) and Kotlin (a generated
203+
file-private constant that matches the TypeScript default).
203204

204205
### TS-only error responses (not part of the cross-port contract)
205206

0 commit comments

Comments
 (0)