You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc8167b
Browse filesBrowse the repository at this point in the historyBrowse files
feat: any/all measures without @Of and 1.1.0 rc.5 adopter fixes (#443)
* fix: close the rc.4 adopter findings for 1.1.0
Reporting, in every port:
- A bare entity name the path already fixes resolves in that entity's
package: a dimension's @Of after @via resolves in the package of the
entity the @via reaches, and a report's @spine owner resolves in
@from's package. Gated by reporting-cross-package-short-names.
- @agg any / all may omit @Of and quantify the measure's @filter or
@segment over the rows (bool_or / bool_and on Postgres, MAX / MIN of
the condition on SQLite, D1 and MySQL, and in the Cube model). New
loader rule M0 refuses an @of-less measure of any other @agg, and an
@of-less any / all with no condition, with ERR_INVALID_MEASURE.
Tooling:
- meta gen no longer tells a docs-only run to wire a prompt generator,
and claims emitted value objects only when an entity generator ran.
- agentDocsFile() warns when it skips agent/ui.md; includeUiTier is
documented.
- meta init warns when a pre-release CLI writes generatedBy, and
detect-prerelease-pins.sh fails on a pre-release generatedBy.
- prerelease-link keeps a pom's final-newline state, reports only real
repins, and keeps its git exclude lines in a managed block that
unlink removes.
* no-mistakes(review): Fix docs-only prompt gate, ui.md opt-out, shared-exclude unlink
* no-mistakes(review): Harden prerelease-link unlink and simplify report @via walk
* no-mistakes(review): Guard spine any/all on fact rows; compile C# test
* no-mistakes(document): Document no-@Of any/all in reporting and Cube docs
* no-mistakes(review): Count NULL any/all conditions as failing; flag legacy excludes
* no-mistakes(review): Make legacy-exclude cleanup command robust and hedge notice
* no-mistakes(document): docs: align detector check count with generatedBy check
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ PyPI has had no product change since `0.25.0` — nothing is broken.
72
72
-**Kotlin** — `codegen-kotlin` (KotlinPoet on JVM): entity + Exposed table + Spring controller + payload + relations + filter allowlist + validator + stored-proc + output-parser generators. `integration-tests-kotlin` runs the persistence-conformance corpus through Exposed against Testcontainers Postgres.
73
73
74
74
**Cross-port conformance corpora** (every port runs the shared corpus):
75
-
- Metamodel: `fixtures/conformance/` (380 fixtures; 29 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
75
+
- Metamodel: `fixtures/conformance/` (384 fixtures; 29 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
- Persistence: `fixtures/persistence-conformance/`. **Query** scenarios run on every port (TS / C# / Java / Kotlin / Python), each provisioning its test DB by executing the committed, TS-produced `canonical/schema.postgres.sql` (Postgres only — Derby dropped for the cross-port query corpus, ADR-0015; the FR-044 `report-*` scenarios also run on SQLite, MySQL and D1 where a port has the engine, see [docs/CONFORMANCE.md](docs/CONFORMANCE.md)). The **migration** scenarios are exercised by **TS only** (TS owns schema migrations). **The corpus now gates WRITES, not just reads (SP-H):** an `op: roundtrip` scenario type INSERTs through each port's runtime/ORM write codec (NOT raw SQL), reads the row back, and asserts the wire-normalized value. The `AllTypes` entity (`roundtrip-all-types.yaml`) carries one field of **every** persistable `field.*` subtype — string/int/long/double/float/decimal/boolean/date/time/timestamp(+tz)/currency/enum/uuid/object — plus an **array-of-VO** `field.object @isArray @storage:jsonb` column (`labels`, written as 2-element / empty-`[]` / single-element arrays across the three rows) — so every subtype write+read (incl. the array-of-value-object jsonb codec) round-trips through every port against Testcontainers PG. (`field.byte`/`field.short`/`field.class` were cut as non-functional registration-only stubs — the matrix tracks only genuinely-supported subtypes; see `fixtures/registry-conformance/README.md` → "Per-subtype write-round-trip matrix".)
78
78
- API-contract: `fixtures/api-contract-conformance/`. TS / C# / Java / Kotlin / Python all green — each port runs **two lanes**: a hand-rolled reference server AND its **generated** API artifact booted over HTTP (the deployed controller/routes; TS+C# full-stack vs Testcontainers PG, Java/Kotlin/Python generated controller + in-memory repo behind the consumer seam). The generated fan-out found 10 real deployment bugs golden snapshots missed. Three sub-corpora run the **generated lane only, on all five ports** — `write-through/`, `projection/` (F22: a view-only `object.projection` serves GET list + GET by id and answers every write verb with `405 {"error": "method_not_allowed"}`) and `report/` (FR-044: a view-backed `object.report` serves GET list, answers `POST` with that same `405`, and mounts no `/{id}` route). That is deliberate, not a gap: what is under test is whether a port's GENERATOR emits those routes, and a hand-rolled reference server would answer every scenario by construction. The `m2m/` sub-corpus also gates **TPH x M:N together** (base-declared, subtype-declared, abstract-mid-declared, a non-subtype source onto a subtype TARGET, and the cross-subtype source id answering `200 []`) — the two corpora were originally built disjoint (`tph/` had no relationships, `m2m/` no discriminators), which is precisely how that defect class survived.
Copy file name to clipboardExpand all lines: agent-context/skills/metaobjects-authoring/references/reporting.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ A report declares no fields. Its columns are one per `@dimensions` item in liste
47
47
|`avg` of `int`, `long`, `currency`, `decimal`| the measure's name |`decimal`| no |
48
48
|`avg` of `double` / `float`| the measure's name |`double`| no |
49
49
|`min` / `max`| the measure's name | the `@of` field's type | no |
50
-
|`any` / `all` (boolean OR / AND, `bool_or` / `bool_and`; `@of` must be a `field.boolean`) | the measure's name |`boolean`| no |
50
+
|`any` / `all` (boolean OR / AND, `bool_or` / `bool_and`; over a `field.boolean``@of`, or with no `@of` over the measure's `@filter` / `@segment`) | the measure's name |`boolean`| no |
51
51
|`measure.ratio`| the measure's name |`decimal`| no |
52
52
| any measure above except `count`, declaring `@default`| the measure's name | as above | yes: it reads the default instead of null |
53
53
| in a `@spine` report, a dimension over a column of the spine entity | the dimension's name | the `@of` field's type | yes when the field is `@required` or in that entity's `identity.primary`; no for a dimension beyond the spine entity |
Copy file name to clipboardExpand all lines: agent-context/skills/metaobjects-codegen/references/typescript-docs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ generate, docs included). Each factory is an ordinary entry in `generators`, fro
21
21
|`docsFile()`|`docs`| the neutral model surface — one page per entity and per template (`<Entity>.md`, `<Template>.md`), plus an overview with the whole-model ER diagram. Options: `apiSurfaces`, `templates`. |
22
22
|`apiDocsFile()`|`api-docs`| the api reference — `api/<Entity>.md`, `api/README.md`, `api/AGENT-API.md`: the concrete imports, signatures, payload field shapes and runnable examples for THIS project's generated code. Options: `subDir` (default `api`), `modelBaseUrl`. |
23
23
|`requirementsFile()`|`requirements`| the declared `requirement.*` ledger, each entry headed by its dotted path and `title`. Writes nothing for a model with no `requirement.*` node. |
24
-
|`agentDocsFile()`|`agent-docs`|`agent/schema.md`, `agent/ui.md` (only when the run also lists a client-tier generator) and `agent/requirements.md` — the three `agent/` pages the always-on pointer reads before touching a tier. |
24
+
|`agentDocsFile()`|`agent-docs`|`agent/schema.md`, `agent/ui.md` (only when the run also lists a client-tier generator, OR the config sets `includeUiTier: true` — the escape hatch for a docs-only config whose UI is generated by a separate config; skipping it with a UI surface in the model and `includeUiTier` unset prints an advisory naming `includeUiTier`; `includeUiTier: false` says there is no UI anywhere and skips it without one) and `agent/requirements.md` — the three `agent/` pages the always-on pointer reads before touching a tier. |
25
25
|`metamodelDocsFile()`|`metamodel-docs`| the built-in vocabulary reference, under `metamodel/` (was `meta docs --metamodel`). |
26
26
|`docsSiteFile()`|`docs-site`| an HTML site under `site/` (was `meta docs --site`). Option: `prompts`. `meta eject docs-site` copies its templates and assets to `codegen/docs-site/` (was `meta docs --scaffold-site`). |
Copy file name to clipboardExpand all lines: docs/features/cube-export.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -322,7 +322,7 @@ somewhere to go: an `identity.reference` onto an entity that is not a cube makes
322
322
| `count` with `@distinct` | `type: count_distinct`, `sql: x` |
323
323
| `count` with `@distinct` over a tuple `x1, x2` | Postgres: `type: count_distinct`, `sql: 'ROW(x1, x2)'`, with one `filters` entry `x1 IS NOT NULL AND x2 IS NOT NULL`, so a tuple with a null component is not counted, as in the view. MySQL: the view's own `COUNT(DISTINCT x1, x2)` as a `type: number` measure (a condition `c` makes it `COUNT(DISTINCT CASE WHEN c THEN x1 END, x2)`); MySQL's multi-argument form skips a tuple with a null component and compares by the columns' collation, which a `JSON_ARRAY(x1, x2)` key does not: on mysql:8.4 under the default `utf8mb4_0900_ai_ci` it counted `'abc'` and `'ABC'` as two tuples where the view counts one |
| `any`, `all` | `type: boolean`. Postgres: `sql: 'bool_or(x)'` / `'bool_and(x)'`, a condition `c` as `bool_or(x) FILTER (WHERE c)`. MySQL: `sql: 'MAX(x)'` / `'MIN(x)'`, a condition as `MAX(CASE WHEN c THEN x END)`. The aggregate is the view's own, written in `sql` because Postgres has no `MAX(boolean)` and the condition cannot ride in `filters`. |
325
+
| `any`, `all` | `type: boolean`. Postgres: `sql: 'bool_or(x)'` / `'bool_and(x)'`, a condition `c` as `bool_or(x) FILTER (WHERE c)`. MySQL: `sql: 'MAX(x)'` / `'MIN(x)'`, a condition as `MAX(CASE WHEN c THEN x END)`. The aggregate is the view's own, written in `sql` because Postgres has no `MAX(boolean)` and the condition cannot ride in `filters`. With no `@of`, the condition is the aggregated value, a null condition counting as not passing: `bool_or(COALESCE(c, FALSE))` / `bool_and(COALESCE(c, FALSE))`, `MAX(COALESCE(c, 0))` / `MIN(COALESCE(c, 0))` on MySQL. |
326
326
| any of the above with a condition `c` | the same, with one `filters` entry `c`. For a Postgres tuple, `c` is ANDed after the not-null terms in that one entry. |
| a `measure.aggregate` with `@default: n` | two members. `<m>Raw` is the aggregate as the rows above write it (its `type`, `sql` and `filters`), with `public: false`. `<m>` is `type: number` (`type: boolean` for an `any` or `all`, where `n` is written `TRUE` / `FALSE` on Postgres and `1` / `0` on MySQL), `sql: 'COALESCE({<m>Raw}, n)'`, and carries the measure's `title` and `description`. |
0 commit comments