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 446cc51
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ number. Both patterns are the convergent-publishing rule working as intended. **
46
46
`dist-tag rm` 403s for every token we hold (`docs/RELEASING.md` §4).
47
47
`metamodelVersion` read **`1.0`** through 1.0.13 — C4 landed and G4 shipped it, and no 1.0.x patch
48
48
moved it (1.0.4 relaxed `@sourceRefField` onto `@cardinality: one` with a prose-only
49
-
manifest footprint, and was ruled a hold). **`metamodelVersion`now reads `1.1`** for the FR-044 reporting vocabulary and the requirements slice 1 (the first slice of two, covering existence gates and per-entity coverage). Per-release detail lives in **`CHANGELOG.md`** — it is the log, and this file does
49
+
manifest footprint, and was ruled a hold). `metamodelVersion`read **`1.1`**from 1.1.0 for the FR-044 reporting vocabulary and the requirements slice 1 (the first slice of two, covering existence gates and per-entity coverage). **On `main` it now reads `1.2`** for calendar-aligned relative report windows (`startOf` on a relative date). Per-release detail lives in **`CHANGELOG.md`** — it is the log, and this file does
50
50
not duplicate it.
51
51
52
52
The npm surface is **14 `@metaobjectsdev/*` packages in full lockstep**; the two `angular`
@@ -71,7 +71,7 @@ PyPI has had no product change since `0.25.0` — nothing is broken.
71
71
-**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.
72
72
73
73
**Cross-port conformance corpora** (every port runs the shared corpus):
74
-
- Metamodel: `fixtures/conformance/` (410 fixtures; 31 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
74
+
- Metamodel: `fixtures/conformance/` (413 fixtures; 31 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".)
77
77
- 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
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,8 @@ Only those last two rows make a measure other than `count`, or a dimension reach
64
64
65
65
A filter value `{ "now": "-P30D" }` (the current time plus a signed ISO-8601 duration) is legal only on a `field.date` or `field.timestamp`, under `gt`, `gte`, `lt` or `lte`, and only in the `@filter` of a `segment`, a `measure.aggregate` or an `object.report`. It is evaluated when the view is **queried**, against the UTC clock.
66
66
67
+
Add `"startOf": "day"`, `"week"` or `"month"` to cut the window to a calendar boundary: `{ "now": "-P90D", "startOf": "day" }` is midnight UTC, 90 days back, not 90 days before the moment of the query. The duration is applied first, then the result is truncated, and a week starts on Monday. No other unit is accepted (`ERR_BAD_ATTR_FILTER`), and there is no time-zone form.
68
+
67
69
## Nulls and zeros
68
70
69
71
- A `count` is `0` over nothing, never null. It counts rows whose `@of` column is not null; a tuple with any null component is not counted.
Copy file name to clipboardExpand all lines: docs/features/cube-export.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ joins, dimensions, measures, segments, and a rollup for each served report._
8
8
listed by `meta gen --list`, imported from its package to run as shipped (or copied into your
9
9
repo with `meta eject cube-model` to change it), and checked by `meta verify --codegen`. It is not core: what MetaObjects guarantees is the vocabulary and
10
10
the loader's checks on it, and a generator that writes files into your repo is a helper you can
11
-
copy and own. It adds no vocabulary (`metamodelVersion` stays 1.1) and has no runtime: the
11
+
copy and own. It adds no vocabulary and has no runtime: the
12
12
files it writes import nothing.
13
13
14
14
**What it does.** For each concrete entity that has a table and declares a `dimension`,
@@ -680,8 +680,7 @@ jobs API) before a query can use them.
680
680
681
681
## Compatibility
682
682
683
-
Nothing here changes a model or a file you already have. No vocabulary was registered, and
684
-
`metamodelVersion`stays 1.1. The report view lowering and the exporter now share one SQL
683
+
Nothing here changes a model or a file you already have. No vocabulary was registered. The report view lowering and the exporter now share one SQL
685
684
module, a move that left every view's bytes as they were. No other generator's output changed.
686
685
687
686
The design, the contract tables and the decisions made while building it are in
|`day`| 00:00 UTC of the day the shifted instant falls on |
894
+
|`week`| 00:00 UTC on the Monday of that ISO week |
895
+
|`month`| 00:00 UTC on the first of that month |
896
+
897
+
The duration is applied first and the result is then truncated: `{ "now": "-P1M", "startOf":
898
+
"month" }` is the first of last month, and `{ "now": "P0D", "startOf": "month" }` is the first
899
+
of this month. The cut is in UTC, the same clock as the time grains. There is no time-zone
900
+
form; a window aligned to another zone is a separate piece of work. The view SQL carries the
901
+
truncation on Postgres, SQLite (and D1) and MySQL, so every port that reads the view gets it.
902
+
903
+
Only `day`, `week` and `month` are accepted. The key is legal exactly where `now` is, and
904
+
only beside `now`.
905
+
880
906
| Rule | Code | Refused |
881
907
|---|---|---|
882
908
|**F1**|`ERR_BAD_ATTR_FILTER`| A relative value anywhere except the `@filter` of a `segment`, a `measure.aggregate` or an `object.report`. In a `layout.dataGrid` preset, a projection `@filter` or an `origin.aggregate``@filter` it fails the load, because no lowering exists for those hosts. |
883
-
|**F2**|`ERR_BAD_ATTR_FILTER`| A relative value on any field except a `field.date` or `field.timestamp`; under any operator except `gt, gte, lt, lte`; as an object that carries keys besides `now`; or with a duration that does not match the ISO-8601 pattern `^[+-]?P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$`. |
909
+
|**F2**|`ERR_BAD_ATTR_FILTER`| A relative value on any field except a `field.date` or `field.timestamp`; under any operator except `gt, gte, lt, lte`; as an object that carries keys besides `now` and `startOf`; with a duration that does not match the ISO-8601 pattern `^[+-]?P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$`; or with a `startOf` other than `day`, `week` or `month`. |
884
910
885
911
An operator-less `{ "occurredAt": { "now": "-P7D" } }` is read as `eq`, and `eq` is not one
886
912
of the four operators a relative date may sit under, so it is refused.
@@ -903,17 +929,26 @@ A model that declares no reporting vocabulary gets nothing new from it. Outside
903
929
loads changes in two places: a bare `extends` naming an object in another package is refused in
904
930
TypeScript, Python and C#, and fixes to Java and Python parsing bugs move those ports toward what
905
931
TypeScript already did. The [CHANGELOG](../../CHANGELOG.md) lists them and the models they affect,
906
-
and [upgrading-1.0-to-1.1.md](migrations/upgrading-1.0-to-1.1.md) the upgrade steps. Until 1.1
907
-
ships, `main` carries `metamodelVersion` 1.1, so no 1.0.x PATCH is cut from it.
932
+
and [upgrading-1.0-to-1.1.md](migrations/upgrading-1.0-to-1.1.md) the upgrade steps. 1.1
933
+
shipped with `metamodelVersion` 1.1; `main` now carries 1.2 (below), so no 1.1.x PATCH is cut
934
+
from it.
935
+
936
+
`startOf` on a relative date is a second MINOR: `metamodelVersion` moves `1.1` to `1.2`. It
937
+
is a new accepted value form inside `attr.filter`, so no registered attribute changed, and a
938
+
model that does not use it loads and generates exactly as before. A model that uses it needs
939
+
every port at this version, because an older loader refuses the extra key as a malformed
940
+
relative date. The view SQL changes only for a report that declares it, and for a SQLite view
941
+
whose relative date shifts by months or years, which now clamps to the end of a short month
942
+
as Postgres and MySQL do.
908
943
909
944
`@spine` and a measure's `@default` joined the same 1.1 change before it shipped, so
910
-
`metamodelVersion`stays 1.1. A model that uses neither generates exactly as before. No
945
+
`metamodelVersion`did not move for them. A model that uses neither generates exactly as before. No
911
946
generator you can own changed for them (the view SQL and the model pages' wording come from the
912
947
packages), so an owned generator needs no resync. A report that declares
913
948
`@spine`, or lists a measure with `@default`, lowers to different SQL and a tighter row type
914
949
than the same report without it.
915
950
916
-
Serving reports added no vocabulary (`metamodelVersion` stays 1.1). The same change corrected
951
+
Serving reports added no vocabulary and did not move `metamodelVersion`. The same change corrected
917
952
generated output for models that declare no report. Each is in the
918
953
[CHANGELOG](../../CHANGELOG.md) with the shape it affects:
Copy file name to clipboardExpand all lines: fixtures/agent-context-conformance/java-kotlin-react-tanstack/expected/.claude/skills/metaobjects-authoring/references/reporting.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,8 @@ Only those last two rows make a measure other than `count`, or a dimension reach
64
64
65
65
A filter value `{ "now": "-P30D" }` (the current time plus a signed ISO-8601 duration) is legal only on a `field.date` or `field.timestamp`, under `gt`, `gte`, `lt` or `lte`, and only in the `@filter` of a `segment`, a `measure.aggregate` or an `object.report`. It is evaluated when the view is **queried**, against the UTC clock.
66
66
67
+
Add `"startOf": "day"`, `"week"` or `"month"` to cut the window to a calendar boundary: `{ "now": "-P90D", "startOf": "day" }` is midnight UTC, 90 days back, not 90 days before the moment of the query. The duration is applied first, then the result is truncated, and a week starts on Monday. No other unit is accepted (`ERR_BAD_ATTR_FILTER`), and there is no time-zone form.
68
+
67
69
## Nulls and zeros
68
70
69
71
- A `count` is `0` over nothing, never null. It counts rows whose `@of` column is not null; a tuple with any null component is not counted.
Copy file name to clipboardExpand all lines: fixtures/agent-context-conformance/java-react/expected/.claude/skills/metaobjects-authoring/references/reporting.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,8 @@ Only those last two rows make a measure other than `count`, or a dimension reach
64
64
65
65
A filter value `{ "now": "-P30D" }` (the current time plus a signed ISO-8601 duration) is legal only on a `field.date` or `field.timestamp`, under `gt`, `gte`, `lt` or `lte`, and only in the `@filter` of a `segment`, a `measure.aggregate` or an `object.report`. It is evaluated when the view is **queried**, against the UTC clock.
66
66
67
+
Add `"startOf": "day"`, `"week"` or `"month"` to cut the window to a calendar boundary: `{ "now": "-P90D", "startOf": "day" }` is midnight UTC, 90 days back, not 90 days before the moment of the query. The duration is applied first, then the result is truncated, and a week starts on Monday. No other unit is accepted (`ERR_BAD_ATTR_FILTER`), and there is no time-zone form.
68
+
67
69
## Nulls and zeros
68
70
69
71
- A `count` is `0` over nothing, never null. It counts rows whose `@of` column is not null; a tuple with any null component is not counted.
0 commit comments