diff --git a/.changeset/37042-skills-inline-edit-boolean.md b/.changeset/37042-skills-inline-edit-boolean.md index b2aa46f037e..5ada2ba66fe 100644 --- a/.changeset/37042-skills-inline-edit-boolean.md +++ b/.changeset/37042-skills-inline-edit-boolean.md @@ -7,4 +7,4 @@ docs(skills): the data and UI skills no longer teach a boolean `inlineEdit` on a Clause-②: no Metadata-protocol: none -objectstack-data's `rules/relationships.md`, "Inline-edit form factor": the `inlineEdit: true // auto (default)` line is gone, and the smart default is now described as what an omitted key gets, with a note that a boolean is refused. The spec parse refuses `true` and `false` on a relationship field's `inlineEdit` since 18.7.0; only `'grid'` and `'form'` are accepted, and leaving the key out picks the form factor from the child's shape. `evals/objects-fields-relationships.json` case 25 drops the same `true` from its expected answer. objectstack-ui's `rules/list-views.md`, Master-Detail Forms: the pointer to that section no longer lists `true` beside `'grid'` and `'form'`; it says `'grid'` / `'form'` or left out. +objectstack-data's `rules/relationships.md`, "Inline-edit form factor": the `inlineEdit: true // auto (default)` line is gone, and the smart default is now described as what an omitted key gets, with a note that a boolean is refused. The spec parse refuses `true` and `false` on a relationship field's `inlineEdit` since 19.0.0; only `'grid'` and `'form'` are accepted, and leaving the key out picks the form factor from the child's shape. `evals/objects-fields-relationships.json` case 25 drops the same `true` from its expected answer. objectstack-ui's `rules/list-views.md`, Master-Detail Forms: the pointer to that section no longer lists `true` beside `'grid'` and `'form'`; it says `'grid'` / `'form'` or left out. diff --git a/.changeset/37223-v19-line-opens.md b/.changeset/37223-v19-line-opens.md index a45d72d0eab..01a662cb393 100644 --- a/.changeset/37223-v19-line-opens.md +++ b/.changeset/37223-v19-line-opens.md @@ -6,8 +6,8 @@ The v19 line opens (maintainer rulings 7153326968 and 7153441862). Every release Clause-②: no -- **What this marks.** Changesets is in pre mode with the tag `next`. Every package in the `fixed` group versions together, so this `major` takes all of them to 19, and the first version cut is `19.0.0-next.0`. `PROTOCOL_VERSION` follows `@objectstack/spec`'s major at version time. The marker itself changes no code, key, export or stored shape. -- **What the line carries.** Each breaking change on the line says so in its own changeset. The first is `@object-ui/i18n`'s retirement of the translation keys 18.6.0 shipped and no code reads any more; a second `major` in the same `fixed` group still gives one 19.0.0. +- **What this marks.** Changesets is in pre mode with the tag `next`. Every package in the `fixed` group versions together, so this `major` takes all of them to 19, and the first version cut is `19.0.0-next.0`. `PROTOCOL_VERSION` moves to 19 ahead of the version pass, in its own changeset. The marker itself changes no code, key, export or stored shape. +- **What the line carries.** Each breaking change on the line says so in its own changeset. The first change graded `major` is `@object-ui/i18n`'s retirement of the translation keys 18.6.0 shipped and no code reads any more; a second `major` in the same `fixed` group still gives one 19.0.0. - **Who receives it.** A plain install still resolves the dist-tag `latest`, which stays on 18.x until 19.0 GA. A prerelease is installed only on request: `@objectstack/spec@next`, or an exact `19.0.0-next.N`. - **What ends it.** 19.0 GA exits pre mode and publishes to `latest`. diff --git a/.changeset/37229-protocol-19.md b/.changeset/37229-protocol-19.md new file mode 100644 index 00000000000..28d0a377b2b --- /dev/null +++ b/.changeset/37229-protocol-19.md @@ -0,0 +1,17 @@ +--- +"@objectstack/spec": minor +"@objectstack/mcp": patch +--- + +The runtime protocol moves to 19: `PROTOCOL_VERSION` reads `'19.0.0'`, so a runtime built from this release refuses a manifest that declares `engines.protocol: '^18'`. + +Clause-②: yes (narrowing) +Metadata-protocol: narrowed + +**BREAKING for app and package authors on the v19 prerelease line.** The load-time handshake (ADR-0087 D1) compares the major of a manifest's `engines.protocol` range with `PROTOCOL_VERSION`. At protocol 19 a range that admits only 18 is refused before any metadata loads, with the diagnostic `OS_PROTOCOL_INCOMPATIBLE` naming the declared range and the runtime's protocol. + +- **What you change.** In each manifest you author (`objectstack.config.ts`, and every package manifest in a multi-package app), move `engines: { protocol: '^18' }` to `engines: { protocol: '^19' }`. `os migrate meta --from 18 --write` rewrites the range for you in a root `defineStack` manifest, at the key the handshake reads. A manifest `composeStacks` composes from several packages has no one literal to rewrite, so there the command writes nothing and lists the range for you to change by hand in each package manifest. The upgrade guide's protocol 19 step carries the same prescription (`protocol-18-range-refused`). +- **Who is affected.** Only a project that installs a `19.0.0-next.N` prerelease. The npm dist-tag `latest` stays on 18.x until 19.0 GA, and an 18.x runtime keeps admitting `'^18'` and refuses `'^19'`, so move the range together with the `@objectstack/*` versions, not before them. +- **What moved in this repository.** Every example app, `examples/app-multi-package`'s two packages, the three connector apps under `packages/apps/`, the docs snippets and the two examples in `@objectstack/mcp`'s README now declare `'^19'`. The `create-objectstack` blank template keeps the scaffolder's own major until the version pass stamps it `'^19'` together with its `@objectstack/*` versions. + + diff --git a/content/docs/data-modeling/seed-data.mdx b/content/docs/data-modeling/seed-data.mdx index 7d6944ae8ec..676f9f865ae 100644 --- a/content/docs/data-modeling/seed-data.mdx +++ b/content/docs/data-modeling/seed-data.mdx @@ -144,7 +144,7 @@ record again: a 3-row fixture became 6, then 9 reference the first load had to leave empty stayed empty on the first row while only a later copy named the person. `replace` expected the caller to clear the table first, and no load ever clears one. Both were removed in -`@objectstack/spec` 18.7.0 ([#34613](https://github.com/objectstack-ai/objectstack/issues/34613)): +`@objectstack/spec` 19.0.0 ([#34613](https://github.com/objectstack-ai/objectstack/issues/34613)): - **Authoring refuses them.** `defineSeed`, `defineStack`, `os validate`, `os build` and the metadata save and publish doors reject `mode: 'insert'` or @@ -172,7 +172,7 @@ To convert a dataset, declare which field identifies a row, then drop the mode 3. **The records carry their own ids**: set `externalId: 'id'`. ```typescript -// Before — refused since @objectstack/spec 18.7.0 +// Before — refused since @objectstack/spec 19.0.0 defineSeed(ExchangeRate, { mode: 'replace', records: [{ key: 'USD_EUR', rate: 0.92 }], diff --git a/content/docs/deployment/cli.mdx b/content/docs/deployment/cli.mdx index 919d3d6285e..280b85e85f1 100644 --- a/content/docs/deployment/cli.mdx +++ b/content/docs/deployment/cli.mdx @@ -4306,7 +4306,7 @@ export default defineStack({ name: 'My App', description: 'My ObjectStack application', // Protocol major this app is authored against (ADR-0087 load-time check). - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: Object.values(objects), diff --git a/content/docs/getting-started/your-first-project.mdx b/content/docs/getting-started/your-first-project.mdx index 356aa2fcfae..3a01b949a0c 100644 --- a/content/docs/getting-started/your-first-project.mdx +++ b/content/docs/getting-started/your-first-project.mdx @@ -156,7 +156,7 @@ export default defineStack({ type: 'app', name: 'My App', // Protocol major this app is authored against (ADR-0087 load-time check). - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, // `automation` runs flows and, per ADR-0097, materializes declarative // `connectors:` entries at boot, through the provider factory a connector diff --git a/content/docs/references/ui/component.mdx b/content/docs/references/ui/component.mdx index 38276320f75..0ce2cb68ca0 100644 --- a/content/docs/references/ui/component.mdx +++ b/content/docs/references/ui/component.mdx @@ -847,7 +847,7 @@ Sort field and direction pair | **bulkActionDefs** | `{ name: string; label?: string; icon?: string; variant?: Enum<'primary' \| 'secondary' \| 'danger' \| 'ghost' \| 'outline'>; … }[]` | optional | Inline bulk-action definitions (full defs, not names) — the same `BulkActionDef` entries a list view's `bulkActionDefs` declares | | **navigation** | `{ mode?: Enum<'drawer' \| 'page' \| 'new_window' \| 'none'>; preventNavigation?: boolean; openNewTab?: boolean; size?: Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>; … }` | optional | Row-click navigation config — the same block `ListViewSchema.navigation` declares (`{ mode, size, openNewTab, preventNavigation }`) | | **editable** | `boolean` | optional | Enable inline cell editing | -| **singleClickEdit** | `never` | optional | [REMOVED] `object-grid` property `singleClickEdit` was removed in @objectstack/spec 18.7.0 (ADR-0049) — a grid that renders editable now selects a cell on a click and opens its editor on double-click, Enter, F2 or typing, so a single-click entry no longer exists for this key to switch. Delete the key; `editable` (with the viewer's write verdict) decides whether the grid edits. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | +| **singleClickEdit** | `never` | optional | [REMOVED] `object-grid` property `singleClickEdit` was removed in @objectstack/spec 19.0.0 (ADR-0049) — a grid that renders editable now selects a cell on a click and opens its editor on double-click, Enter, F2 or typing, so a single-click entry no longer exists for this key to switch. Delete the key; `editable` (with the viewer's write verdict) decides whether the grid edits. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | | **keyboardNavigation** | `boolean` | optional | Arrow-key cell navigation on the WAI-ARIA grid pattern: the grid's data cells become one Tab stop that the arrow keys, Home / End and Ctrl+Home / Ctrl+End move between. Always on when the grid renders editable — `editable` set and the viewer allowed to edit — because that grid selects a cell first and moves the selection with these keys; a grid that renders read-only keeps every cell its own Tab stop unless this is `true` | | **resizable** | `boolean` | optional | Allow column resize (the renderer default is on) | | **resizableColumns** | `never` | optional | [REMOVED] `object-grid` property `resizableColumns` was removed in @objectstack/spec 17.7.0 (ADR-0049) — it was the legacy second spelling of `resizable`, read only when `resizable` was absent, so one switch had two spellings and a grid authoring both silently ignored this one. Use `resizable`. Rename the key; the value (a boolean) is unchanged. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | diff --git a/content/docs/references/ui/view.mdx b/content/docs/references/ui/view.mdx index 5aec9431bd2..1f57896f4c5 100644 --- a/content/docs/references/ui/view.mdx +++ b/content/docs/references/ui/view.mdx @@ -2539,7 +2539,7 @@ This schema accepts one of the following structures: | **isPinned** | `boolean` | optional | Console round-trip: the view is pinned in the object's view switcher. Written by the console's pin toggle through the `view` metadata API and read back to draw the pinned group. Stored on the view's row, which has no per-user scope. Not authored. | | **sortOrder** | `integer` | optional | Console round-trip: the view's position among the object's saved views in the switcher, 0-based and counted over saved views only (a code-defined view carries none). Written by the console's drag-reorder and read back to order the tabs. Not authored: `order` is the authored default position. | | **visibility** | `Enum<'private' \| 'team' \| 'organization' \| 'public'>` | optional | Console round-trip: the group the switcher files this view's tab under (private, team, organization or public). Display grouping only, NOT access control: nothing restricts who can list or open the view by this value. No console control sets it; the console carries a stored value forward when it re-saves the row. Not authored. | -| **columnState** | `never` | optional | [REMOVED] `view.columnState` was removed in @objectstack/spec 18.7.0 (ADR-0049 enforce-or-remove) — it held one column order and set of widths on a shared view row; nothing writes it any more, and a stored layout is no longer applied, so every reader sees the view's own column order and widths. The console keeps column widths in each reader's browser and saves a column order into the view itself. Delete the key. To ship a column order, list `columns` in that order (or set `fieldOrder`); to ship a width, set `width` on the column. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | +| **columnState** | `never` | optional | [REMOVED] `view.columnState` was removed in @objectstack/spec 19.0.0 (ADR-0049 enforce-or-remove) — it held one column order and set of widths on a shared view row; nothing writes it any more, and a stored layout is no longer applied, so every reader sees the view's own column order and widths. The console keeps column widths in each reader's browser and saves a column order into the view itself. Delete the key. To ship a column order, list `columns` in that order (or set `fieldOrder`); to ship a width, set `width` on the column. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | | **options** | `never` | optional | Refused: a view item record carries no top-level `options` bag. Its per-kind blocks live under `config` (`config.kanban`, `config.timeline`, …); the legacy `options.KIND` bag belongs to the flattened list overlay only. | ### Nested Shape: `ViewItemWire[viewKind='list'].config` @@ -2639,7 +2639,7 @@ This schema accepts one of the following structures: | **isPinned** | `boolean` | optional | Console round-trip: the view is pinned in the object's view switcher. Written by the console's pin toggle through the `view` metadata API and read back to draw the pinned group. Stored on the view's row, which has no per-user scope. Not authored. | | **sortOrder** | `integer` | optional | Console round-trip: the view's position among the object's saved views in the switcher, 0-based and counted over saved views only (a code-defined view carries none). Written by the console's drag-reorder and read back to order the tabs. Not authored: `order` is the authored default position. | | **visibility** | `Enum<'private' \| 'team' \| 'organization' \| 'public'>` | optional | Console round-trip: the group the switcher files this view's tab under (private, team, organization or public). Display grouping only, NOT access control: nothing restricts who can list or open the view by this value. No console control sets it; the console carries a stored value forward when it re-saves the row. Not authored. | -| **columnState** | `never` | optional | [REMOVED] `view.columnState` was removed in @objectstack/spec 18.7.0 (ADR-0049 enforce-or-remove) — it held one column order and set of widths on a shared view row; nothing writes it any more, and a stored layout is no longer applied, so every reader sees the view's own column order and widths. The console keeps column widths in each reader's browser and saves a column order into the view itself. Delete the key. To ship a column order, list `columns` in that order (or set `fieldOrder`); to ship a width, set `width` on the column. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | +| **columnState** | `never` | optional | [REMOVED] `view.columnState` was removed in @objectstack/spec 19.0.0 (ADR-0049 enforce-or-remove) — it held one column order and set of widths on a shared view row; nothing writes it any more, and a stored layout is no longer applied, so every reader sees the view's own column order and widths. The console keeps column widths in each reader's browser and saves a column order into the view itself. Delete the key. To ship a column order, list `columns` in that order (or set `fieldOrder`); to ship a width, set `width` on the column. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | | **options** | `never` | optional | Refused: a view item record carries no top-level `options` bag. Its per-kind blocks live under `config` (`config.kanban`, `config.timeline`, …); the legacy `options.KIND` bag belongs to the flattened list overlay only. | ### Nested Shape: `ViewItemWire[viewKind='form'].config` diff --git a/content/docs/upgrading.mdx b/content/docs/upgrading.mdx index 64d94d8e174..7ebe3ca2d3c 100644 --- a/content/docs/upgrading.mdx +++ b/content/docs/upgrading.mdx @@ -193,7 +193,7 @@ runtime checks that handshake **first**, before it loads anything: ```ts manifest: { // ... - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, } ``` diff --git a/docs/qa/platform-checklist/areas/cli.json b/docs/qa/platform-checklist/areas/cli.json index 8ba946ee811..b8fcb220f11 100644 --- a/docs/qa/platform-checklist/areas/cli.json +++ b/docs/qa/platform-checklist/areas/cli.json @@ -881,7 +881,7 @@ "run it with a --from BELOW the supported floor and capture the MigrationFloorError path (`Cannot migrate from protocol : the chain's support floor is `)", "run it with --json where supported and check the exit code in the same way #4873 required of every other migrate subcommand", "confirm the semantic-only entries behave as ADVISORIES: they are reported under ` manual change(s) require your judgment:` with their why/verify text, never silently 'fixed' (a semantic change has no mechanical rewrite by definition)", - "WRITE MODE (#9591): run `os migrate meta --help` and record the --write line. Then, on a SECOND fresh scratch copy carrying the same planted spellings, keep a byte copy of the tree and run `os migrate meta --from --write`; capture stdout + the exit code. Read the `Wrote of mechanical change(s) into file(s):` block (each site `: ()`), any ` mechanical change(s) left for you to apply by hand:` block (each with its `not written []: `), and the closing `Re-ran the chain over the written sources: …` line. Diff the tree against its byte copy: the changed files are exactly the files the block names, plus, when the run owed the manifest's declared protocol range an edit (a tree declaring engines.protocol '^17'; the stock showcase declares '^18'), the config file that the separate 'Rewrote the declared protocol range, so the load admits protocol N:' block names with its line. That rewrite is not one of the chain's M changes, so the 'Wrote …' block never lists it, and `--json` reports it as write.range, apart from write.written[]. Each hunk sits at a listed site, and every other byte (comments, formatting, key order) is unchanged. Then, over the WRITTEN tree: re-run `os migrate meta --from ` without --write (no written site is still listed under Applied; the semantic advisories are listed exactly as before), run `--write` a second time (it writes nothing: `--write: the chain made no mechanical change here, so no file was written.`), and run `--write --json` on a third fresh copy (exit 0; the payload's `write.status` is `written` and `write.written[]` names each site with its file and line)" + "WRITE MODE (#9591): run `os migrate meta --help` and record the --write line. Then, on a SECOND fresh scratch copy carrying the same planted spellings, keep a byte copy of the tree and run `os migrate meta --from --write`; capture stdout + the exit code. Read the `Wrote of mechanical change(s) into file(s):` block (each site `: ()`), any ` mechanical change(s) left for you to apply by hand:` block (each with its `not written []: `), and the closing `Re-ran the chain over the written sources: …` line. Diff the tree against its byte copy: the changed files are exactly the files the block names, plus, when the run owed the manifest's declared protocol range an edit (a tree declaring engines.protocol '^17'; the stock showcase declares '^19'), the config file that the separate 'Rewrote the declared protocol range, so the load admits protocol N:' block names with its line. That rewrite is not one of the chain's M changes, so the 'Wrote …' block never lists it, and `--json` reports it as write.range, apart from write.written[]. Each hunk sits at a listed site, and every other byte (comments, formatting, key order) is unchanged. Then, over the WRITTEN tree: re-run `os migrate meta --from ` without --write (no written site is still listed under Applied; the semantic advisories are listed exactly as before), run `--write` a second time (it writes nothing: `--write: the chain made no mechanical change here, so no file was written.`), and run `--write --json` on a third fresh copy (exit 0; the payload's `write.status` is `written` and `write.written[]` names each site with its file and line)" ], "acceptance": [ { diff --git a/docs/qa/platform-checklist/areas/platform-core.json b/docs/qa/platform-checklist/areas/platform-core.json index 0b1d4ce3caa..f80dd78e8f2 100644 --- a/docs/qa/platform-checklist/areas/platform-core.json +++ b/docs/qa/platform-checklist/areas/platform-core.json @@ -3237,7 +3237,7 @@ "title": "Seed mode matrix (update/upsert/ignore): each live mode does exactly its verb through the ONE SeedLoaderService, no-op replays skip instead of churning, ignore reports skips — and the retired `insert` and `replace` are refused at the draft save with SeedMode's own prescription, so neither can reach a load", "since": "v15", "status": "active", - "revision": 9, + "revision": 10, "priority": "P1", "surface": "api", "personas": ["seeded admin (admin@objectos.ai / admin123)"], @@ -3257,7 +3257,7 @@ "UPSERT: publish a seed draft (mode upsert) with rows A,B → both insert; edit the draft changing B's value and adding C; re-publish → A skipped (no-op replay — only seed-declared fields compared, so runtime edits to OTHER columns never block the skip), B updated in place (same id), C inserted; verify by id stability + values", "UPDATE: seed draft (mode update) touching A (changed value) and a nonexistent D → A updates, D is SKIPPED (update never creates); row count unchanged", "IGNORE: seed draft (mode ignore) with A (changed value) and new E → A untouched (still the update-mode value; existing rows are never rewritten), E inserted; the skip is visible as A's unchanged value + count", - "INSERT (retired): PUT a seed draft (mode insert) declaring A → refused 422 INVALID_METADATA, one issues[] entry {path: 'mode', code: 'invalid_value'} whose message is SeedMode's own prescription (`seed.mode: 'insert'` was removed in @objectstack/spec 18.7.0 …); nothing is stored under the seed's name", + "INSERT (retired): PUT a seed draft (mode insert) declaring A → refused 422 INVALID_METADATA, one issues[] entry {path: 'mode', code: 'invalid_value'} whose message is SeedMode's own prescription (`seed.mode: 'insert'` was removed in @objectstack/spec 19.0.0 …); nothing is stored under the seed's name", "REPLACE (retired): the same draft with mode replace → the same 422 refusal at `mode`, carrying replace's own prescription (it inserted every record and left clearing the table to the caller); nothing is stored", "idempotence tie-in: re-publish the upsert draft unchanged TWICE. The first replay may legitimately write, because the UPDATE step set A to a2, so it re-converges A to the seed; the SECOND replay is the idempotence probe — zero inserts and zero updates (all no-op skips), every row's updated_at untouched (the churn-avoidance isNoOpReplay exists for exactly this)", "teardown: the writable package's own delete, or discard the run's own DB" @@ -3378,6 +3378,12 @@ "date": "2026-11-19", "change": "title, fixtures, steps[4] to [6], acceptance[3] to [5], variants, enumSource and source[0] to [1] revised to the three live modes. #34791 (#34613) retired `insert` and `replace` at the schema: SeedMode became enumWithRetiredValues(SEED_MODE_VALUES, SEED_MODE_RETIRED), so the pin read 0 members and the watchdog went red; it now counts SEED_MODE_VALUES (3). steps[4] and [5] and acceptance[3] and [4] score the two retired modes as refused at the draft save, the answer measured in-process at base b65488a8 (the save door's own suite, protocol.seed-external-id-refusal.test.ts): 422 INVALID_METADATA, issue at mode, code invalid_value, message the mode's prescription. knownGaps[1] and [2] described insert-mode duplication and go with it; the stored-dataset refusal is recorded as scored from its unit pin. No live-mode verdict moves", "ref": "#35297" + }, + { + "revision": 10, + "date": "2026-11-25", + "change": "steps[5]'s quoted prescription names @objectstack/spec 19.0.0, not 18.7.0. The retirement is not in the published 18.6.0 (read off the tag's tree), and with PROTOCOL_VERSION at 19 under pre mode the next release main cuts is 19.0.0, so SeedMode's own message now says 19.0.0 (packages/spec/src/data/seed.zod.ts, the same PR). No step, clause or verdict moves", + "ref": "#37314" } ] }, @@ -3788,10 +3794,10 @@ }, { "id": "platform-core.protocol-18-handshake-and-stored-replay", - "title": "Protocol 18 upgrade surfaces: a package declaring engines.protocol \"^17\" is refused 422 OS_PROTOCOL_INCOMPATIBLE naming `os migrate meta --from 17` (\"^18\" is admitted), a stored v17-shaped row is served canonical while a PUT of the same old shape is refused at parse, and a \"^18\" artifact built before a retirement boots with one warn per replayed conversion", + "title": "Protocol upgrade surfaces at protocol 19: a package declaring engines.protocol \"^18\" is refused 422 OS_PROTOCOL_INCOMPATIBLE naming `os migrate meta --from 18` (\"^19\" is admitted), a stored v17-shaped row is served canonical while a PUT of the same old shape is refused at parse, and an artifact built before a retirement, whose range admits 19 from a floor below the runtime's spec label, boots with one warn per replayed conversion", "since": "v18", "status": "active", - "revision": 5, + "revision": 6, "priority": "P1", "surface": "mixed", "personas": [ @@ -3803,14 +3809,14 @@ "requires": [ "a fresh boot of the showcase: `pnpm dev -- --fresh -p PORT --seed-admin` (ephemeral DB; the seeded admin is printed)", "a SCRATCH copy of examples/app-showcase (or a scaffolded blank app) for every planted-metadata step — never edit the shared fixtures; a file DB under /tmp/RUN/ for every boot", - "a scratch package manifest with engines.protocol \"^17\" and one with \"^18\"", + "a scratch package manifest with engines.protocol \"^18\" and one with \"^19\"", "a stored v17-shaped row (e.g. an element using a retired flat data-binding key) planted into the scratch DB" ] }, "steps": [ - "POST /api/v1/marketplace/install-local (or POST /api/v1/packages) with the ^17 manifest; then the ^18 one", + "POST /api/v1/marketplace/install-local (or POST /api/v1/packages) with the ^18 manifest; then the ^19 one", "plant the row into sys_metadata, then reboot on the same DB (or plant with the server stopped), then GET /api/v1/meta/page/PLANTED and compare with the planted body; PUT the planted (old-shape) body back. ⚠️ A row planted under a running server is not what a GET reads: the server answers from its in-memory registry until it reboots (QA run #27438 read the pre-plant body), so a GET before the reboot scores the cache, not the stored-row replay", - "boot (`os start`) a ^18 dist/objectstack.json built before a retirement; read the boot warns. An edited copy of a built artifact must sit where its references resolve: its runtimeModule (objectstack-runtime.HASH.mjs) is resolved relative to the artifact's own directory (packages/runtime/src/load-artifact-bundle.ts#mergeRuntimeModule) and imports from node_modules, so keep the copy beside the original in the app's dist/ and boot it with `--artifact COPY`. ⚠️ Such a copy boots ALONE: the cwd config joins a boot only when the artifact is its own compiled output (packages/cli/src/utils/artifact-precedence.ts#cwdConfigJoinsBoot), so the config's code plugins drop out, and the showcase's boot aborts after the conversion warns (service-automation refuses connector 'showcase_status_api', provider 'rest': 'Installed providers: [none]'; QA run #33853 at a557fa38, where an unedited copy aborted the same way). The warns print before the abort, so acceptance[3] is read from that log; for a boot that also serves, build the artifact from an app with no code-plugin connector (examples/app-todo). Putting the edited copy at a scratch copy's conventional dist/objectstack.json is no way round it: there the config boots, not the copy, and no conversion warn prints" + "boot (`os start`) a dist/objectstack.json built before a retirement, its engines.protocol edited to '>=18.0.0'; read the boot warns. A '^18' artifact (what an 18.x build declares) is refused at the handshake under protocol 19 before any conversion runs, and a bare '^19' reads as the floor 19.0.0, above every step-18 stamp, so neither opens the window; '>=18.0.0' keeps the floor 18.0.0 below the runtime's spec label and admits 19, as the runtime's own option-B pin does (packages/runtime/src/standalone-stack-option-b-forward-conversion.test.ts). An edited copy of a built artifact must sit where its references resolve: its runtimeModule (objectstack-runtime.HASH.mjs) is resolved relative to the artifact's own directory (packages/runtime/src/load-artifact-bundle.ts#mergeRuntimeModule) and imports from node_modules, so keep the copy beside the original in the app's dist/ and boot it with `--artifact COPY`. ⚠️ Such a copy boots ALONE: the cwd config joins a boot only when the artifact is its own compiled output (packages/cli/src/utils/artifact-precedence.ts#cwdConfigJoinsBoot), so the config's code plugins drop out, and the showcase's boot aborts after the conversion warns (service-automation refuses connector 'showcase_status_api', provider 'rest': 'Installed providers: [none]'; QA run #33853 at a557fa38, where an unedited copy aborted the same way). The warns print before the abort, so acceptance[3] is read from that log; for a boot that also serves, build the artifact from an app with no code-plugin connector (examples/app-todo). Putting the edited copy at a scratch copy's conventional dist/objectstack.json is no way round it: there the config boots, not the copy, and no conversion warn prints" ], "acceptance": [ { @@ -3820,13 +3826,13 @@ "evidence": "the vitest summary line per pin file, with the package name and the subject sha" }, { - "clause": "^17 → 422 OS_PROTOCOL_INCOMPATIBLE with migrateCommand naming --from 17; ^18 admitted", + "clause": "^18 → 422 OS_PROTOCOL_INCOMPATIBLE with migrateCommand naming --from 18; ^19 admitted", "oracle": "api", "verify": "status + code + migrateCommand", "evidence": "both answers" }, { - "clause": "the planted row is served in the canonical v18 shape; PUT of the old shape → 422 with the tombstone prescription", + "clause": "the planted row is served in the canonical shape; PUT of the old shape → 422 with the tombstone prescription", "oracle": "api", "verify": "GET body vs planted; PUT status + message", "evidence": "both excerpts" @@ -3848,7 +3854,8 @@ "packages/spec/src/conversions/stored.ts#applyConversionsToStoredItem", "packages/metadata-core/src/artifact-forward-conversion.ts#applyArtifactForwardConversions", "ADR-0087", - "v18 changesets (.changeset/pre/, consumed into 18.0.0-next.*): 22130-protocol-18, 23001-prerelease-artifact-window" + "v18 changesets (.changeset/pre/, consumed into 18.0.0-next.*): 22130-protocol-18, 23001-prerelease-artifact-window", + "v19 changeset 37229-protocol-19 and the step-19 semantic entry packages/spec/src/migrations/entries/semantic/19.protocol-18-range-refused.ts" ], "history": [ { @@ -3880,6 +3887,12 @@ "date": "2026-11-15", "change": "acceptance[0].verify names `--reporter=tree`, the reporter that prints the one line per pin file this is scored on: in a runner's non-TTY shell vitest's default reporter prints the run's totals only (RUNNER.md's environment facts; QA run #33784's note 10, comment 6893243542). No clause or threshold changed. Card #33969", "ref": "#34068" + }, + { + "revision": 6, + "date": "2026-11-25", + "change": "Revised to protocol 19: PROTOCOL_VERSION moved to 19.0.0, so the handshake refuses a range that admits 18 and not 19. title, fixtures.requires[2], steps[0], acceptance[1] and source move the refused/admitted pair from ^17/^18 to ^18/^19 and the migrateCommand from --from 17 to --from 18 (measured at the PR head: 'targets protocol ^18 (engines.protocol) but this runtime is protocol 19.0.0 … Run: objectstack migrate meta --from 18'). steps[2] and the title's artifact half: a ^18 artifact is now refused at the handshake before any conversion, and ^19 reads as the floor 19.0.0, which opens no window for step-18 retirements (artifact-forward-conversion.ts policy), so the run edits the copy's range to '>=18.0.0', the move the runtime's option-B pin made. acceptance[2] drops 'v18' from the canonical shape: the stored replay (applyConversionsToStoredItem, includeRetired) is unchanged at 19. The id keeps its protocol-18 slug because ids are immutable. No acceptance[0] ref changes; each still passes at protocol 19", + "ref": "#37314" } ] }, diff --git a/docs/qa/scenarios/builds/travel_expense.json b/docs/qa/scenarios/builds/travel_expense.json index 09eb5bc4216..d7c4efdfee9 100644 --- a/docs/qa/scenarios/builds/travel_expense.json +++ b/docs/qa/scenarios/builds/travel_expense.json @@ -8,7 +8,7 @@ "scope": "project", "name": "Travel Expense", "engines": { - "protocol": "^18" + "protocol": "^19" } }, "objects": [ diff --git a/docs/qa/scenarios/builds/travel_expense.provenance.json b/docs/qa/scenarios/builds/travel_expense.provenance.json index cd6ecc42715..b4467d1c2b6 100644 --- a/docs/qa/scenarios/builds/travel_expense.provenance.json +++ b/docs/qa/scenarios/builds/travel_expense.provenance.json @@ -2,7 +2,7 @@ "card": "travel_expense", "cardSha256": "29162eefb46055941a0263686c2853246b4c408d41acb90c6abe22f68886a768", "build": "travel_expense.json", - "sha256": "4ab7e603101e6adee0ede53563a13a9a830c8323d8e3f702222986042e726fd8", + "sha256": "cc035a919bf530a6e06bb9770f08e4d78e96c7ff914b0ecd549282058283709d", "runner": "ec227fc7", "packages": "published 18.6.0", "built": "2026-11-18", @@ -19,11 +19,20 @@ "seed": "757/757", "how": "the scratch run's dist/objectstack.json after its Build half (before the iterate turn), byte for byte as `objectstack build` wrote it; re-scored against the card, its score equals the run record's Build half" }, - "amended": { - "on": "2026-11-22", - "card": "objectstack-ai/objectstack#36534", - "from": "5fe6f452d36fe56a0ecf0f8c782394076953baeb99ef2499763991e119a29989", - "what": "`initialStates` added to the build's three active `state_machine` validations, each the state its field defaults to and the build's own create paths write: `demotravel_approval_step.step_decision` [\"pending\"], `demotravel_expense_claim.claim_lifecycle` [\"draft\"], `demotravel_trip_request.trip_lifecycle` [\"draft\"]. Nothing else changed.", - "why": "The publish-time rule `state-machine-no-initial-states` (an error since #34776) refuses a machine that runs on insert with no `initialStates`, so `install-local` answered 422 on the current tree. The build is no longer byte for byte the scratch run's output; its verified scores are unchanged, since no Build check reads `initialStates`." - } + "amended": [ + { + "on": "2026-11-22", + "card": "objectstack-ai/objectstack#36534", + "from": "5fe6f452d36fe56a0ecf0f8c782394076953baeb99ef2499763991e119a29989", + "what": "`initialStates` added to the build's three active `state_machine` validations, each the state its field defaults to and the build's own create paths write: `demotravel_approval_step.step_decision` [\"pending\"], `demotravel_expense_claim.claim_lifecycle` [\"draft\"], `demotravel_trip_request.trip_lifecycle` [\"draft\"]. Nothing else changed.", + "why": "The publish-time rule `state-machine-no-initial-states` (an error since #34776) refuses a machine that runs on insert with no `initialStates`, so `install-local` answered 422 on the current tree. The build is no longer byte for byte the scratch run's output; its verified scores are unchanged, since no Build check reads `initialStates`." + }, + { + "on": "2026-11-25", + "card": "objectstack-ai/objectstack#37229", + "from": "4ab7e603101e6adee0ede53563a13a9a830c8323d8e3f702222986042e726fd8", + "what": "`manifest.engines.protocol` moved from \"^18\" to \"^19\". Nothing else changed.", + "why": "PROTOCOL_VERSION moved to 19.0.0, and the load-time handshake refuses a range that admits 18 and not 19 (OS_PROTOCOL_INCOMPATIBLE), so `install-local` would refuse the build on the current tree. Its verified scores are unchanged, since no Build check reads the protocol range." + } + ] } diff --git a/examples/app-crm/objectstack.config.ts b/examples/app-crm/objectstack.config.ts index a8913736cc0..7e10ba16cf3 100644 --- a/examples/app-crm/objectstack.config.ts +++ b/examples/app-crm/objectstack.config.ts @@ -44,7 +44,7 @@ export default defineStack({ // Protocol major this package is authored against (ADR-0087). The kernel // checks the range at load time and refuses a major-incompatible runtime // with a structured diagnostic instead of failing deep in a schema parse. - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, // Auto-resolved by the CLI; `ui` enables the Studio shell, `automation` diff --git a/examples/app-multi-package/src/packages/core/index.ts b/examples/app-multi-package/src/packages/core/index.ts index ffc9c415074..e10498b1989 100644 --- a/examples/app-multi-package/src/packages/core/index.ts +++ b/examples/app-multi-package/src/packages/core/index.ts @@ -19,7 +19,7 @@ export default defineStack({ version: '1.0.0', type: 'app', description: 'The App half of a two-package release artifact (ADR-0130 D4)', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ diff --git a/examples/app-multi-package/src/packages/orders/index.ts b/examples/app-multi-package/src/packages/orders/index.ts index 207e7d242da..63366d3e046 100644 --- a/examples/app-multi-package/src/packages/orders/index.ts +++ b/examples/app-multi-package/src/packages/orders/index.ts @@ -58,7 +58,7 @@ export default defineStack({ version: '1.0.0', type: 'module', description: 'The Module half of a two-package release artifact (ADR-0130 D4)', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, // The App package this module extends. `resolveArtifactPackageOrder` reads // it as the topological edge that registers core BEFORE orders (ADR-0130 // D5, ADR-0116's one sorter) — the array order below is not what decides. diff --git a/examples/app-showcase/objectstack.config.ts b/examples/app-showcase/objectstack.config.ts index 845985fa8e0..e287de4f62c 100644 --- a/examples/app-showcase/objectstack.config.ts +++ b/examples/app-showcase/objectstack.config.ts @@ -87,7 +87,7 @@ export default defineStack({ // Protocol major this package is authored against (ADR-0087). The kernel // checks the range at load time and refuses a major-incompatible runtime // with a structured diagnostic instead of failing deep in a schema parse. - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, // Capability tokens the CLI resolves to platform plugins: diff --git a/examples/app-todo/objectstack.config.ts b/examples/app-todo/objectstack.config.ts index 70fd0ec3b9f..05cd4ee8317 100644 --- a/examples/app-todo/objectstack.config.ts +++ b/examples/app-todo/objectstack.config.ts @@ -45,7 +45,7 @@ export default defineStack({ // Protocol major this package is authored against (ADR-0087). The kernel // checks the range at load time and refuses a major-incompatible runtime // with a structured diagnostic instead of failing deep in a schema parse. - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, // Platform services this app needs — the closed `PLATFORM_CAPABILITY_TOKENS` diff --git a/packages/apps/connector-docusign/objectstack.config.ts b/packages/apps/connector-docusign/objectstack.config.ts index 6a9549c3514..d386de8a0d2 100644 --- a/packages/apps/connector-docusign/objectstack.config.ts +++ b/packages/apps/connector-docusign/objectstack.config.ts @@ -26,7 +26,7 @@ export default defineStack({ type: 'app', name: 'DocuSign eSignature', description: 'Send documents for signature, read envelopes and follow their signature status from flows, over DocuSign\'s eSignature OpenAPI document (developer sandbox).', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, // `automation` materializes the `connectors:` entry at boot, serves the diff --git a/packages/apps/connector-github/objectstack.config.ts b/packages/apps/connector-github/objectstack.config.ts index e0fc5bb8212..e6d66807d2e 100644 --- a/packages/apps/connector-github/objectstack.config.ts +++ b/packages/apps/connector-github/objectstack.config.ts @@ -20,7 +20,7 @@ export default defineStack({ type: 'app', name: 'GitHub', description: "Search and read GitHub issues from flows, through GitHub's remote MCP server.", - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, // `automation` materializes the `connectors:` entry at boot and runs the diff --git a/packages/apps/connector-stripe/objectstack.config.ts b/packages/apps/connector-stripe/objectstack.config.ts index 00704905a15..ab836bcec00 100644 --- a/packages/apps/connector-stripe/objectstack.config.ts +++ b/packages/apps/connector-stripe/objectstack.config.ts @@ -21,7 +21,7 @@ export default defineStack({ type: 'app', name: 'Stripe', description: 'Read Stripe customers, charges, invoices and payment intents from flows, over Stripe\'s OpenAPI document.', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, // `automation` materializes the `connectors:` entry at boot and runs the diff --git a/packages/cli/src/commands/migrate/plan.declared-default-datasource.integration.test.ts b/packages/cli/src/commands/migrate/plan.declared-default-datasource.integration.test.ts index 502ff46adbd..6eb8a80a37c 100644 --- a/packages/cli/src/commands/migrate/plan.declared-default-datasource.integration.test.ts +++ b/packages/cli/src/commands/migrate/plan.declared-default-datasource.integration.test.ts @@ -82,7 +82,7 @@ let port: number; */ function writeConfig(fields: Record): void { const stack = { - manifest: { id: 'com.example.fx24120', name: 'fx24120', version: '0.0.0', type: 'app', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.fx24120', name: 'fx24120', version: '0.0.0', type: 'app', engines: { protocol: '^19' } }, datasources: [{ name: 'qa_main', driver: 'sqlite', config: { filename: `./${DATABASE}` } }], datasourceMapping: [{ default: true, datasource: 'qa_main' }], objects: [{ name: APP_OBJECT, sharingModel: 'private', fields }], diff --git a/packages/cli/src/utils/author-time-rules.test.ts b/packages/cli/src/utils/author-time-rules.test.ts index 6021cf439a4..cc521c57c4e 100644 --- a/packages/cli/src/utils/author-time-rules.test.ts +++ b/packages/cli/src/utils/author-time-rules.test.ts @@ -61,7 +61,7 @@ const optionBStack = (reference: string): Record => ({ const perPackageOnlyStack = (): Record => { const coreManifest = { id: 'com.example.obflip.core', name: 'obflip core', namespace: 'ob', - version: '1.0.0', type: 'app', engines: { protocol: '^18' }, + version: '1.0.0', type: 'app', engines: { protocol: '^19' }, }; const coreObjects = [{ name: 'ob_account', label: 'Account', pluralLabel: 'Accounts', sharingModel: 'private', @@ -79,7 +79,7 @@ const perPackageOnlyStack = (): Record => { }]; const ordersManifest = { id: 'com.example.obflip.orders', name: 'obflip orders', namespace: 'ob', - version: '1.0.0', type: 'module', engines: { protocol: '^18' }, + version: '1.0.0', type: 'module', engines: { protocol: '^19' }, dependencies: { 'com.example.obflip.core': '^1.0.0' }, }; const ordersObjects = [{ diff --git a/packages/cli/src/utils/config-named-export-rule.test.ts b/packages/cli/src/utils/config-named-export-rule.test.ts index 7169d4d750c..1821c00542e 100644 --- a/packages/cli/src/utils/config-named-export-rule.test.ts +++ b/packages/cli/src/utils/config-named-export-rule.test.ts @@ -65,7 +65,7 @@ const MANIFEST = `{ version: '0.1.0', type: 'app', name: 'Probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }`; const roots: string[] = []; diff --git a/packages/cli/src/utils/config-shadowed-named-export.test.ts b/packages/cli/src/utils/config-shadowed-named-export.test.ts index b5c4252b594..f7eab68192b 100644 --- a/packages/cli/src/utils/config-shadowed-named-export.test.ts +++ b/packages/cli/src/utils/config-shadowed-named-export.test.ts @@ -67,7 +67,7 @@ const MANIFEST = `{ version: '0.1.0', type: 'app', name: 'Probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }`; const roots: string[] = []; diff --git a/packages/cli/src/utils/dependency-range-check.test.ts b/packages/cli/src/utils/dependency-range-check.test.ts index 52f276c8ac1..f1d3b5ec2ce 100644 --- a/packages/cli/src/utils/dependency-range-check.test.ts +++ b/packages/cli/src/utils/dependency-range-check.test.ts @@ -14,7 +14,7 @@ function pkg(id: string, version: string, dependencies?: Record) namespace: 'crm', version, type: id.endsWith('.core') ? 'app' : 'module', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, ...(dependencies ? { dependencies } : {}), }, }); diff --git a/packages/cli/test/authoring-rule-command-parity.test.ts b/packages/cli/test/authoring-rule-command-parity.test.ts index 3f125231e09..5b4bc6dec42 100644 --- a/packages/cli/test/authoring-rule-command-parity.test.ts +++ b/packages/cli/test/authoring-rule-command-parity.test.ts @@ -37,7 +37,7 @@ const cliBin = join(fileURLToPath(new URL('.', import.meta.url)), '..', 'bin', ' /** A stack that satisfies the security linter, so only the planted defect gates. */ const withBaseline = (stack: Record) => ({ - manifest: { id: 'com.example.parity', namespace: 'parity', version: '1.0.0', name: 'Parity', type: 'app', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.parity', namespace: 'parity', version: '1.0.0', name: 'Parity', type: 'app', engines: { protocol: '^19' } }, ...stack, }); diff --git a/packages/cli/test/build-text-face-advisory-count.test.ts b/packages/cli/test/build-text-face-advisory-count.test.ts index cf6f0a99d9d..5b9286afe08 100644 --- a/packages/cli/test/build-text-face-advisory-count.test.ts +++ b/packages/cli/test/build-text-face-advisory-count.test.ts @@ -158,7 +158,7 @@ const perPackageWarnings = (warnings: unknown[]): string[] => const CONFIG_MULTI = ` const coreManifest = { id: 'com.example.bcount.core', name: 'bcount core', namespace: 'bc', - version: '1.0.0', type: 'app', engines: { protocol: '^18' }, + version: '1.0.0', type: 'app', engines: { protocol: '^19' }, }; const coreObjects = [{ name: 'bc_account', label: 'Account', pluralLabel: 'Accounts', sharingModel: 'private', @@ -177,7 +177,7 @@ const coreApps = [{ const ordersManifest = { id: 'com.example.bcount.orders', name: 'bcount orders', namespace: 'bc', - version: '1.0.0', type: 'module', engines: { protocol: '^18' }, + version: '1.0.0', type: 'module', engines: { protocol: '^19' }, dependencies: { 'com.example.bcount.core': '^1.0.0' }, }; const ordersObjects = [{ @@ -224,7 +224,7 @@ import { defineStack } from '@objectstack/spec'; export default defineStack({ manifest: { id: 'com.example.bcsingle', name: 'bcsingle', namespace: 'bs', - version: '1.0.0', type: 'app', engines: { protocol: '^18' }, + version: '1.0.0', type: 'app', engines: { protocol: '^19' }, }, objects: [{ name: 'bs_thing', label: 'Thing', pluralLabel: 'Things', sharingModel: 'private', diff --git a/packages/cli/test/capability-edition-advisory.test.ts b/packages/cli/test/capability-edition-advisory.test.ts index 0a1d8b010b1..d872b7cd307 100644 --- a/packages/cli/test/capability-edition-advisory.test.ts +++ b/packages/cli/test/capability-edition-advisory.test.ts @@ -47,7 +47,7 @@ const PROVIDER = '@objectstack/security-enterprise'; /** The stack: one private object, one grant at a hierarchy depth, the token declared. */ function stackLiteral(wired: boolean): string { return `{ - manifest: { id: 'com.example.edition-advisory', namespace: 'ea', version: '1.0.0', name: 'Edition Advisory', type: 'app', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.edition-advisory', namespace: 'ea', version: '1.0.0', name: 'Edition Advisory', type: 'app', engines: { protocol: '^19' } }, requires: ['${TOKEN}'],${wired ? '\n plugins: [new FixtureProviderPlugin()],' : ''} objects: [ { name: 'ea_note', label: 'Note', pluralLabel: 'Notes', sharingModel: 'private', fields: { title: { type: 'text', label: 'Title' } } }, diff --git a/packages/cli/test/collection-item-owner-stamp-validate-door.test.ts b/packages/cli/test/collection-item-owner-stamp-validate-door.test.ts index edfddf2f453..cd1a0d6d1e2 100644 --- a/packages/cli/test/collection-item-owner-stamp-validate-door.test.ts +++ b/packages/cli/test/collection-item-owner-stamp-validate-door.test.ts @@ -51,7 +51,7 @@ const manifest = { name: 'Owner stamp door probe', version: '1.0.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const connector = (stamp?: string) => ({ diff --git a/packages/cli/test/connector-credential-literal-doors.e2e.test.ts b/packages/cli/test/connector-credential-literal-doors.e2e.test.ts index a3dfa7a25c0..918214db580 100644 --- a/packages/cli/test/connector-credential-literal-doors.e2e.test.ts +++ b/packages/cli/test/connector-credential-literal-doors.e2e.test.ts @@ -89,7 +89,7 @@ const stackOf = (literal: boolean) => ({ version: '1.0.0', type: 'app', name: 'Connector credential door probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/dependency-range-doors.test.ts b/packages/cli/test/dependency-range-doors.test.ts index 895e6796646..d51a0dabfde 100644 --- a/packages/cli/test/dependency-range-doors.test.ts +++ b/packages/cli/test/dependency-range-doors.test.ts @@ -39,7 +39,7 @@ const pkg = (id: string, type: 'app' | 'module', version: string, dependencies?: namespace: 'crm', version, type, - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, ...(dependencies ? { dependencies } : {}), }, }); diff --git a/packages/cli/test/flow-credential-literal-doors.e2e.test.ts b/packages/cli/test/flow-credential-literal-doors.e2e.test.ts index d510c5c01c1..864665622e5 100644 --- a/packages/cli/test/flow-credential-literal-doors.e2e.test.ts +++ b/packages/cli/test/flow-credential-literal-doors.e2e.test.ts @@ -44,7 +44,7 @@ const stackOf = (literal: boolean) => ({ version: '1.0.0', type: 'app', name: 'Credential door probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/i18n-contributed-nav-coverage.test.ts b/packages/cli/test/i18n-contributed-nav-coverage.test.ts index 4c776fe0e49..0aa7422cc57 100644 --- a/packages/cli/test/i18n-contributed-nav-coverage.test.ts +++ b/packages/cli/test/i18n-contributed-nav-coverage.test.ts @@ -27,7 +27,7 @@ import { computeI18nCoverage } from '../src/utils/i18n-coverage.js'; import { authoringRuleUnionStack } from '../src/utils/stack-collections.js'; const I18N = { defaultLocale: 'en', supportedLocales: ['en', 'zh-CN'], fallbackLocale: 'en' }; -const engines = { protocol: '^18' }; +const engines = { protocol: '^19' }; const appManifest = { id: 'com.example.cnav.app', name: 'Contributed Nav App', namespace: 'cnv', version: '1.0.0', type: 'app', engines, diff --git a/packages/cli/test/i18n-multi-bundle-merge.test.ts b/packages/cli/test/i18n-multi-bundle-merge.test.ts index eb41e23b051..c38fa26898c 100644 --- a/packages/cli/test/i18n-multi-bundle-merge.test.ts +++ b/packages/cli/test/i18n-multi-bundle-merge.test.ts @@ -35,7 +35,7 @@ import { computeI18nCoverage, mergeTranslationBundles } from '../src/utils/i18n- import { authoringRuleUnionStack } from '../src/utils/stack-collections.js'; const I18N = { defaultLocale: 'en', supportedLocales: ['en', 'zh-CN'], fallbackLocale: 'en' }; -const engines = { protocol: '^18' }; +const engines = { protocol: '^19' }; const object = (name: string, label: string) => ({ name, label, pluralLabel: label, sharingModel: 'private', diff --git a/packages/cli/test/jsx-gate-manifest-notice.e2e.test.ts b/packages/cli/test/jsx-gate-manifest-notice.e2e.test.ts index 80425d148ec..bce10f923db 100644 --- a/packages/cli/test/jsx-gate-manifest-notice.e2e.test.ts +++ b/packages/cli/test/jsx-gate-manifest-notice.e2e.test.ts @@ -140,7 +140,7 @@ function stack(body: string | null): string { import { defineStack } from '@objectstack/spec'; export default defineStack({ - manifest: { id: 'com.example.jxg', name: 'jxg', version: '1.0.0', type: 'app', namespace: 'jxg', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.jxg', name: 'jxg', version: '1.0.0', type: 'app', namespace: 'jxg', engines: { protocol: '^19' } }, ${pages} apps: [{ name: 'jxg_app', label: 'JXG', navigation: [${nav}] }], objects: [ @@ -160,7 +160,7 @@ function packageCarried(top: string): string { import { defineStack } from '@objectstack/spec'; export default defineStack({ - manifest: { id: 'com.example.jxg', name: 'jxg', version: '1.0.0', type: 'app', namespace: 'jxg', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.jxg', name: 'jxg', version: '1.0.0', type: 'app', namespace: 'jxg', engines: { protocol: '^19' } }, pages: ${top}, packages: [ { diff --git a/packages/cli/test/lint-handwritten-checks-package-fold.test.ts b/packages/cli/test/lint-handwritten-checks-package-fold.test.ts index 9f0094d8c2b..40b74afa2a0 100644 --- a/packages/cli/test/lint-handwritten-checks-package-fold.test.ts +++ b/packages/cli/test/lint-handwritten-checks-package-fold.test.ts @@ -76,7 +76,7 @@ const MANIFEST = { version: '1.0.0', type: 'app', namespace: 'probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; /** A module-scope binding, so the hook handler below cannot be lowered. */ @@ -286,7 +286,7 @@ describe('#17528 — os lint judges the stack the author declared, in either ADR }); const manifest = { id: 'com.example.ob', name: 'ob', version: '1.0.0', type: 'app', namespace: 'ob', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const fromPackages = lintConfig({ diff --git a/packages/cli/test/lint-namespace-prefix-per-package.test.ts b/packages/cli/test/lint-namespace-prefix-per-package.test.ts index 0326d09be41..2baebcf0a5d 100644 --- a/packages/cli/test/lint-namespace-prefix-per-package.test.ts +++ b/packages/cli/test/lint-namespace-prefix-per-package.test.ts @@ -82,7 +82,7 @@ const B = { id: 'com.example.b', name: 'b', version: '1.0.0', type: 'module', namespace: 'beta', dependencies: { 'com.example.a': '^1.0.0' }, }; -const TOP = { ...A, engines: { protocol: '^18' } }; +const TOP = { ...A, engines: { protocol: '^19' } }; const obj = () => ({ name: 'ob_order', label: 'Order', sharingModel: 'private', nameField: 'number', diff --git a/packages/cli/test/lint-per-package-authoring-parity.test.ts b/packages/cli/test/lint-per-package-authoring-parity.test.ts index ba958dfbd5b..089807470ff 100644 --- a/packages/cli/test/lint-per-package-authoring-parity.test.ts +++ b/packages/cli/test/lint-per-package-authoring-parity.test.ts @@ -123,7 +123,7 @@ const lintPerPackage = (issues: unknown[]): string[] => const CONFIG_FLIP = ` const coreManifest = { id: 'com.example.ppflip.core', name: 'ppflip core', namespace: 'pp', - version: '1.0.0', type: 'app', engines: { protocol: '^18' }, + version: '1.0.0', type: 'app', engines: { protocol: '^19' }, }; const coreObjects = [{ name: 'pp_account', label: 'Account', pluralLabel: 'Accounts', sharingModel: 'private', @@ -142,7 +142,7 @@ const coreApps = [{ const ordersManifest = { id: 'com.example.ppflip.orders', name: 'ppflip orders', namespace: 'pp', - version: '1.0.0', type: 'module', engines: { protocol: '^18' }, + version: '1.0.0', type: 'module', engines: { protocol: '^19' }, dependencies: { 'com.example.ppflip.core': '^1.0.0' }, }; const ordersObjects = [{ @@ -194,7 +194,7 @@ import { defineStack } from '@objectstack/spec'; export default defineStack({ manifest: { id: 'com.example.ppsingle', name: 'ppsingle', namespace: 'ps', - version: '1.0.0', type: 'app', engines: { protocol: '^18' }, + version: '1.0.0', type: 'app', engines: { protocol: '^19' }, }, objects: [{ name: 'ps_thing', label: 'Thing', pluralLabel: 'Things', sharingModel: 'private', diff --git a/packages/cli/test/lint-per-package-authoring-seam.test.ts b/packages/cli/test/lint-per-package-authoring-seam.test.ts index 04764dc7dd7..4c2f1dff448 100644 --- a/packages/cli/test/lint-per-package-authoring-seam.test.ts +++ b/packages/cli/test/lint-per-package-authoring-seam.test.ts @@ -83,7 +83,7 @@ function twoPackageArtifact(): Record { namespace: 'pp', version: '1.0.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { @@ -119,7 +119,7 @@ function twoPackageArtifact(): Record { namespace: 'pp', version: '1.0.0', type: 'module', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, dependencies: { 'com.example.lintseam.core': '^1.0.0' }, }, objects: [ @@ -161,7 +161,7 @@ function singlePackageStack(): Record { namespace: 'ps', version: '1.0.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/non-array-packages-readers.test.ts b/packages/cli/test/non-array-packages-readers.test.ts index 964ba08f59c..cd88eb5fd4b 100644 --- a/packages/cli/test/non-array-packages-readers.test.ts +++ b/packages/cli/test/non-array-packages-readers.test.ts @@ -53,7 +53,7 @@ const MANIFEST = { version: '1.0.0', type: 'app' as const, namespace: 'probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const PROBE_OBJECT = { diff --git a/packages/cli/test/null-packages-follows-resolver.test.ts b/packages/cli/test/null-packages-follows-resolver.test.ts index 56787e5ca05..22e052ab94e 100644 --- a/packages/cli/test/null-packages-follows-resolver.test.ts +++ b/packages/cli/test/null-packages-follows-resolver.test.ts @@ -52,7 +52,7 @@ const MANIFEST = { version: '1.0.0', type: 'app' as const, namespace: 'probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const stackWith = (packages: unknown) => ({ manifest: MANIFEST, packages }); diff --git a/packages/cli/test/package-union-readers.test.ts b/packages/cli/test/package-union-readers.test.ts index 06c6cf9a8b0..38d8a8fc86c 100644 --- a/packages/cli/test/package-union-readers.test.ts +++ b/packages/cli/test/package-union-readers.test.ts @@ -84,7 +84,7 @@ const PER_PACKAGE = /^package '[^']+' — /; const PIECES = ` import { defineStack, composeStacks } from '@objectstack/spec'; const I18N = { defaultLocale: 'en', supportedLocales: ['en', 'zh-CN'], fallbackLocale: 'en' }; -const engines = { protocol: '^18' }; +const engines = { protocol: '^19' }; const svcManifest = { id: '${SVC_ID}', name: 'Union Service', namespace: 'unr', version: '1.0.0', type: 'module', engines }; const appManifest = { id: '${APP_ID}', name: 'Union App', namespace: 'unr', version: '1.0.0', type: 'app', engines }; const ticket = { name: 'unr_ticket', label: 'Ticket', pluralLabel: 'Tickets', sharingModel: 'private', diff --git a/packages/cli/test/per-package-dedup-positional-echo.test.ts b/packages/cli/test/per-package-dedup-positional-echo.test.ts index cb6d9ee2231..892ad3f6a81 100644 --- a/packages/cli/test/per-package-dedup-positional-echo.test.ts +++ b/packages/cli/test/per-package-dedup-positional-echo.test.ts @@ -78,7 +78,7 @@ const CORE_MANIFEST = { namespace: 'pp', version: '1.0.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const CORE_OBJECTS = [ @@ -115,7 +115,7 @@ const ORDERS_MANIFEST = { namespace: 'pp', version: '1.0.0', type: 'module', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, dependencies: { 'com.example.echo.core': '^1.0.0' }, }; diff --git a/packages/cli/test/retry-policy-key-validate-door.test.ts b/packages/cli/test/retry-policy-key-validate-door.test.ts index 9433b7ff76d..a96a402b591 100644 --- a/packages/cli/test/retry-policy-key-validate-door.test.ts +++ b/packages/cli/test/retry-policy-key-validate-door.test.ts @@ -47,7 +47,7 @@ const stackOf = (retry: Retry, retryPolicy: Retry) => ({ name: 'Retry key door probe', version: '1.0.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/stack-datasource-default-validate-door.test.ts b/packages/cli/test/stack-datasource-default-validate-door.test.ts index 3dcf13d4d46..1788fd97254 100644 --- a/packages/cli/test/stack-datasource-default-validate-door.test.ts +++ b/packages/cli/test/stack-datasource-default-validate-door.test.ts @@ -43,7 +43,7 @@ const stackOf = (name: string) => ({ name: 'Reserved datasource door probe', version: '1.0.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/translation-contributed-nav-validate-door.test.ts b/packages/cli/test/translation-contributed-nav-validate-door.test.ts index 12d9da968b6..3e974a81b96 100644 --- a/packages/cli/test/translation-contributed-nav-validate-door.test.ts +++ b/packages/cli/test/translation-contributed-nav-validate-door.test.ts @@ -47,7 +47,7 @@ const stackOf = (navCase: Record) => ({ name: 'Contributed navigation translation door probe', version: '1.0.0', type: 'module', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, navigationContributions: [{ app: 'crm_enterprise', items: [{ id: 'nav_case', type: 'object', objectName: 'svc_case', label: 'Cases' }], diff --git a/packages/cli/test/union-fold-command-parity.test.ts b/packages/cli/test/union-fold-command-parity.test.ts index c4f0c18f4fd..fa3f2c96dc0 100644 --- a/packages/cli/test/union-fold-command-parity.test.ts +++ b/packages/cli/test/union-fold-command-parity.test.ts @@ -177,7 +177,7 @@ const optionBStack = (reference: string): Record => ({ const perPackageOnlyStack = (): Record => { const coreManifest = { id: 'com.example.obflip.core', name: 'obflip core', namespace: 'ob', - version: '1.0.0', type: 'app', engines: { protocol: '^18' }, + version: '1.0.0', type: 'app', engines: { protocol: '^19' }, }; const coreObjects = [{ name: 'ob_account', label: 'Account', pluralLabel: 'Accounts', sharingModel: 'private', @@ -195,7 +195,7 @@ const perPackageOnlyStack = (): Record => { }]; const ordersManifest = { id: 'com.example.obflip.orders', name: 'obflip orders', namespace: 'ob', - version: '1.0.0', type: 'module', engines: { protocol: '^18' }, + version: '1.0.0', type: 'module', engines: { protocol: '^19' }, dependencies: { 'com.example.obflip.core': '^1.0.0' }, }; const ordersObjects = [{ diff --git a/packages/cli/test/validate-flow-region-shape.test.ts b/packages/cli/test/validate-flow-region-shape.test.ts index 327d3243a1e..d68b4c10674 100644 --- a/packages/cli/test/validate-flow-region-shape.test.ts +++ b/packages/cli/test/validate-flow-region-shape.test.ts @@ -34,6 +34,11 @@ import Validate from '../src/commands/validate'; import { undeclaredFlowCycleMessage } from '@objectstack/metadata-core'; import { FLOW_CYCLE_CORPUS } from '@objectstack/metadata-core/testing'; import { defineStackSource, linkSpec } from './helpers/define-stack-fixture.js'; +// Pay the dynamic `import()`s the compile reach makes at MODULE LOAD, not inside a clocked case +// (`scripts/check-test-source-alias.mjs`, the clocked-window rule). +import '@objectstack/objectql/core'; +import '@objectstack/plugin-security'; +import '@objectstack/runtime'; const CLI_ROOT = resolve(fileURLToPath(import.meta.url), '..', '..'); @@ -103,7 +108,7 @@ const guard = (catchRegion: Record) => n('guard', 'try_catch', { config: { try: { nodes: [n('work')], edges: [] }, catch: catchRegion } }); const stackWith = (flows: unknown[]) => ({ - manifest: { id: 'com.example.rgn', namespace: 'rgn', version: '1.0.0', name: 'Rgn', type: 'app', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.rgn', namespace: 'rgn', version: '1.0.0', name: 'Rgn', type: 'app', engines: { protocol: '^19' } }, objects: [{ name: OBJECT, label: 'Visa', sharingModel: 'private', fields: { title: { type: 'text', label: 'Title' } } }], flows, }); @@ -115,7 +120,7 @@ const stackWith = (flows: unknown[]) => ({ * `packages[0]`, or the stack's empty top level, would pass it. */ const assembledWith = (good: unknown, bad: unknown) => ({ - manifest: { id: 'com.example.rgn', namespace: 'rgn', version: '1.0.0', name: 'Rgn', type: 'app', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.rgn', namespace: 'rgn', version: '1.0.0', name: 'Rgn', type: 'app', engines: { protocol: '^19' } }, packages: [ { manifest: { diff --git a/packages/cli/test/validate-per-package-authoring-parity.test.ts b/packages/cli/test/validate-per-package-authoring-parity.test.ts index 276b5f07645..8ae8f787c9b 100644 --- a/packages/cli/test/validate-per-package-authoring-parity.test.ts +++ b/packages/cli/test/validate-per-package-authoring-parity.test.ts @@ -134,7 +134,7 @@ const perPackageWarnings = (warnings: unknown[]): string[] => const CONFIG_MULTI = ` const coreManifest = { id: 'com.example.ppparity.core', name: 'ppparity core', namespace: 'pp', - version: '1.0.0', type: 'app', engines: { protocol: '^18' }, + version: '1.0.0', type: 'app', engines: { protocol: '^19' }, }; const coreObjects = [{ name: 'pp_account', label: 'Account', pluralLabel: 'Accounts', sharingModel: 'private', @@ -153,7 +153,7 @@ const coreApps = [{ const ordersManifest = { id: 'com.example.ppparity.orders', name: 'ppparity orders', namespace: 'pp', - version: '1.0.0', type: 'module', engines: { protocol: '^18' }, + version: '1.0.0', type: 'module', engines: { protocol: '^19' }, dependencies: { 'com.example.ppparity.core': '^1.0.0' }, }; const ordersObjects = [{ @@ -213,7 +213,7 @@ import { defineStack } from '@objectstack/spec'; export default defineStack({ manifest: { id: 'com.example.ppsingle', name: 'ppsingle', namespace: 'ps', - version: '1.0.0', type: 'app', engines: { protocol: '^18' }, + version: '1.0.0', type: 'app', engines: { protocol: '^19' }, }, objects: [{ name: 'ps_thing', label: 'Thing', pluralLabel: 'Things', sharingModel: 'private', diff --git a/packages/cli/test/validate-per-package-authoring-seam.test.ts b/packages/cli/test/validate-per-package-authoring-seam.test.ts index 063eabe3cbc..75fa5fe0b72 100644 --- a/packages/cli/test/validate-per-package-authoring-seam.test.ts +++ b/packages/cli/test/validate-per-package-authoring-seam.test.ts @@ -73,7 +73,7 @@ function twoPackageArtifact(): Record { namespace: 'crm', version: '1.0.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { @@ -118,7 +118,7 @@ function twoPackageArtifact(): Record { namespace: 'crm', version: '1.0.0', type: 'module', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, dependencies: { 'com.example.seam.core': '^1.0.0' }, }, objects: [ diff --git a/packages/cli/test/validate-target-restriction-profile.test.ts b/packages/cli/test/validate-target-restriction-profile.test.ts index dd1147a73bc..1ce251acb00 100644 --- a/packages/cli/test/validate-target-restriction-profile.test.ts +++ b/packages/cli/test/validate-target-restriction-profile.test.ts @@ -86,7 +86,7 @@ const json = (r: Run): Record => { * leaves out of the artifact, so no target runs it and `allowCode` reads none. */ const STACK = `{ - manifest: { id: 'com.example.rpt', namespace: 'rpt', version: '1.0.0', name: 'Rpt', type: 'app', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.rpt', namespace: 'rpt', version: '1.0.0', name: 'Rpt', type: 'app', engines: { protocol: '^19' } }, requires: ['automation', 'triggers'], objects: [{ name: 'rpt_doc', label: 'Doc', sharingModel: 'private', fields: { title: { type: 'text', label: 'Title' } } }], hooks: [{ name: 'rpt_audit', object: 'rpt_doc', events: ['beforeInsert'], handler: 'rpt_audit_fn' }], @@ -119,7 +119,7 @@ const STACK = `{ * object lifecycle hook whose body is sandboxed JavaScript. */ const TEAM_STACK = `{ - manifest: { id: 'com.example.rptt', namespace: 'rptt', version: '1.0.0', name: 'Rptt', type: 'app', engines: { protocol: '^18' } }, + manifest: { id: 'com.example.rptt', namespace: 'rptt', version: '1.0.0', name: 'Rptt', type: 'app', engines: { protocol: '^19' } }, requires: ['automation', 'triggers'], objects: [{ name: 'rptt_doc', label: 'Doc', sharingModel: 'private', fields: { title: { type: 'text', label: 'Title' } } }], hooks: [{ name: 'rptt_stamp', object: 'rptt_doc', events: ['beforeInsert'], body: { language: 'js', source: 'return;' } }], diff --git a/packages/cli/test/verify-author-time-stage.test.ts b/packages/cli/test/verify-author-time-stage.test.ts index 1b0efdb987f..48b4ebe6e42 100644 --- a/packages/cli/test/verify-author-time-stage.test.ts +++ b/packages/cli/test/verify-author-time-stage.test.ts @@ -60,7 +60,7 @@ function taskApp(planted: boolean): Record { version: '1.0.0', name: 'Verify Gate', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/verify-dashboard-windows.test.ts b/packages/cli/test/verify-dashboard-windows.test.ts index 6abda51fbaa..ce20011ae00 100644 --- a/packages/cli/test/verify-dashboard-windows.test.ts +++ b/packages/cli/test/verify-dashboard-windows.test.ts @@ -37,7 +37,7 @@ const MANIFEST = { version: '1.0.0', name: 'Verify Dashboard Windows', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const OBJECTS = [ diff --git a/packages/cli/test/verify-delete-behaviors.test.ts b/packages/cli/test/verify-delete-behaviors.test.ts index 18f5ee6d0ae..7cbb7a5f25e 100644 --- a/packages/cli/test/verify-delete-behaviors.test.ts +++ b/packages/cli/test/verify-delete-behaviors.test.ts @@ -35,7 +35,7 @@ const MANIFEST = { version: '1.0.0', name: 'Verify Delete Behaviors', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const OBJECTS = [ diff --git a/packages/cli/test/verify-host-root.test.ts b/packages/cli/test/verify-host-root.test.ts index 4c0165dbfa6..3c163c9fe9c 100644 --- a/packages/cli/test/verify-host-root.test.ts +++ b/packages/cli/test/verify-host-root.test.ts @@ -54,7 +54,7 @@ const STACK = { version: '1.0.0', name: 'Verify Host Root', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/verify-json-stdout.test.ts b/packages/cli/test/verify-json-stdout.test.ts index 07eb15e0563..c25723a4084 100644 --- a/packages/cli/test/verify-json-stdout.test.ts +++ b/packages/cli/test/verify-json-stdout.test.ts @@ -61,7 +61,7 @@ const STACK = { version: '1.0.0', name: 'Verify JSON Stdout', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/verify-parent-write-reach.test.ts b/packages/cli/test/verify-parent-write-reach.test.ts index b078bd2d8a5..30782f448ac 100644 --- a/packages/cli/test/verify-parent-write-reach.test.ts +++ b/packages/cli/test/verify-parent-write-reach.test.ts @@ -38,7 +38,7 @@ const MANIFEST = { version: '1.0.0', name: 'Verify Parent Write Reach', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const OBJECTS = [ diff --git a/packages/cli/test/verify-reference-shapes.test.ts b/packages/cli/test/verify-reference-shapes.test.ts index db0a394b879..1ae7f2e704a 100644 --- a/packages/cli/test/verify-reference-shapes.test.ts +++ b/packages/cli/test/verify-reference-shapes.test.ts @@ -36,7 +36,7 @@ const STACK = { version: '1.0.0', name: 'Verify Reference Shapes', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { diff --git a/packages/cli/test/verify-seed-outcome.test.ts b/packages/cli/test/verify-seed-outcome.test.ts index 2917fd8fecf..5275f20a972 100644 --- a/packages/cli/test/verify-seed-outcome.test.ts +++ b/packages/cli/test/verify-seed-outcome.test.ts @@ -47,7 +47,7 @@ const manifest = (id: string, namespace: string, name: string) => ({ version: '1.0.0', name, type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }); /** The showcase invoice's shape, reduced: an amount the engine converts into the home currency at write. */ diff --git a/packages/cli/test/verify-unique-scopes.test.ts b/packages/cli/test/verify-unique-scopes.test.ts index 7d81bbf228b..367c29931ac 100644 --- a/packages/cli/test/verify-unique-scopes.test.ts +++ b/packages/cli/test/verify-unique-scopes.test.ts @@ -44,7 +44,7 @@ const MANIFEST = { version: '1.0.0', name: 'Verify Unique Scopes', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const OBJECTS = [ diff --git a/packages/lint/src/authoring-rule-input-tier.test.ts b/packages/lint/src/authoring-rule-input-tier.test.ts index bbc3c25738b..20e05cffdaf 100644 --- a/packages/lint/src/authoring-rule-input-tier.test.ts +++ b/packages/lint/src/authoring-rule-input-tier.test.ts @@ -55,7 +55,7 @@ const manifest = { version: '1.0.0', type: 'app', name: 'Tier Probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; /** `defineStack` warns on the D2 conversion channel; keep test output clean. */ diff --git a/packages/lint/src/validate-form-layout.test.ts b/packages/lint/src/validate-form-layout.test.ts index 76bde3a36ce..73bff11663e 100644 --- a/packages/lint/src/validate-form-layout.test.ts +++ b/packages/lint/src/validate-form-layout.test.ts @@ -418,7 +418,7 @@ describe('#6251 — reachable on a REAL parsed app stack', () => { version: '1.0.0', type: 'app', name: 'Form Layout Probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }; const data = { provider: 'object' as const, object: 'fl_contact' }; diff --git a/packages/mcp/README.md b/packages/mcp/README.md index dccd438f225..5368bdde516 100644 --- a/packages/mcp/README.md +++ b/packages/mcp/README.md @@ -517,7 +517,7 @@ export default defineStack({ version: '0.1.0', type: 'app', name: 'My CRM', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, // Optional: the CLI already anchors a persistent SQLite database at // `/.objectstack/data/standalone.db`. Declare a datasource only @@ -627,7 +627,7 @@ export default defineStack({ version: '0.1.0', type: 'app', name: 'CRM Assistant', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [account, contact, opportunity], // Your actions become MCP tools — the plugin bridges them at start. diff --git a/packages/metadata-protocol/src/protocol.seed-external-id-refusal.test.ts b/packages/metadata-protocol/src/protocol.seed-external-id-refusal.test.ts index 147bdfa5298..ce5a4fd4549 100644 --- a/packages/metadata-protocol/src/protocol.seed-external-id-refusal.test.ts +++ b/packages/metadata-protocol/src/protocol.seed-external-id-refusal.test.ts @@ -353,7 +353,7 @@ describe('[#28952] controls — an `externalId` the object has is not refused', it.each([['insert'], ['replace']])('the retired mode `%s` is refused with its prescription', async (mode) => { const { protocol, rows } = makeSession({ objects: OBJECTS }); const attempt = protocol.saveMetaItem({ type: 'seed', name: 'r_ins', item: seed('seedkey_other', 'sku', mode), mode: 'draft' }); - await expect(attempt).rejects.toThrow(new RegExp(`seed\\.mode: '${mode}'\` was removed in @objectstack/spec 18\\.7\\.0`)); + await expect(attempt).rejects.toThrow(new RegExp(`seed\\.mode: '${mode}'\` was removed in @objectstack/spec 19\\.0\\.0`)); expect(stored(rows, 'seed', 'r_ins')).toEqual([]); }); diff --git a/packages/metadata/src/plugin-artifact-packages-attribution.test.ts b/packages/metadata/src/plugin-artifact-packages-attribution.test.ts index 2b07b37a2fa..8fe177d522f 100644 --- a/packages/metadata/src/plugin-artifact-packages-attribution.test.ts +++ b/packages/metadata/src/plugin-artifact-packages-attribution.test.ts @@ -63,6 +63,8 @@ import { describe, it, expect, vi } from 'vitest'; import { composeStacks, defineStack } from '@objectstack/spec'; import { MetadataPlugin } from './plugin.js'; +// Pay the plugin's dynamic `@objectstack/metadata-fs` load during collection, never inside a case. +import '@objectstack/metadata-fs'; const CORE_ID = 'com.example.multi.core'; const ORDERS_ID = 'com.example.multi.orders'; @@ -74,7 +76,7 @@ const coreStack = { namespace: 'crm', version: '1.0.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ { @@ -105,7 +107,7 @@ const ordersStack = { // would let a wrong-body stamp pass unnoticed. version: '2.4.0', type: 'module', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, dependencies: { [CORE_ID]: '^1.0.0' }, }, objects: [ diff --git a/packages/qa/dogfood/bench/sql-perf/app/objectstack.config.ts b/packages/qa/dogfood/bench/sql-perf/app/objectstack.config.ts index c75df5d7208..b891c750b04 100644 --- a/packages/qa/dogfood/bench/sql-perf/app/objectstack.config.ts +++ b/packages/qa/dogfood/bench/sql-perf/app/objectstack.config.ts @@ -86,7 +86,7 @@ export default defineStack({ type: 'app', name: 'SQL performance baseline fixture', description: 'Fixture for the SQL performance baseline: three parent levels over one high-volume child.', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ diff --git a/packages/qa/dogfood/test/authored-row-write-scope.dogfood.test.ts b/packages/qa/dogfood/test/authored-row-write-scope.dogfood.test.ts index f2e52814714..6879c8d3e65 100644 --- a/packages/qa/dogfood/test/authored-row-write-scope.dogfood.test.ts +++ b/packages/qa/dogfood/test/authored-row-write-scope.dogfood.test.ts @@ -155,7 +155,7 @@ const probeApp = defineStack({ version: '0.0.1', type: 'app', name: 'Authored Row-Write Scope Probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [OpenNote, SecretNote], permissions: [WidenerSet, PlainSet], diff --git a/packages/qa/dogfood/test/bulk-widener-probe.dogfood.test.ts b/packages/qa/dogfood/test/bulk-widener-probe.dogfood.test.ts index eedf1ae1a05..021117054e8 100644 --- a/packages/qa/dogfood/test/bulk-widener-probe.dogfood.test.ts +++ b/packages/qa/dogfood/test/bulk-widener-probe.dogfood.test.ts @@ -122,7 +122,7 @@ const probeApp = defineStack({ version: '0.0.1', type: 'app', name: 'Bulk Widener Probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [ProbeNote], permissions: [ProbeWidenerSet], diff --git a/packages/qa/dogfood/test/install-local-connector-spec-file.dogfood.test.ts b/packages/qa/dogfood/test/install-local-connector-spec-file.dogfood.test.ts index f0d4aa97a41..2030da53747 100644 --- a/packages/qa/dogfood/test/install-local-connector-spec-file.dogfood.test.ts +++ b/packages/qa/dogfood/test/install-local-connector-spec-file.dogfood.test.ts @@ -64,7 +64,7 @@ const STACK = { name: 'Connector spec file probe', version: '0.1.0', type: 'app', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, requires: ['automation'], connectors: [ diff --git a/packages/qa/dogfood/test/owd-public-read-write-write-floor.dogfood.test.ts b/packages/qa/dogfood/test/owd-public-read-write-write-floor.dogfood.test.ts index b213dc3c055..370535b302c 100644 --- a/packages/qa/dogfood/test/owd-public-read-write-write-floor.dogfood.test.ts +++ b/packages/qa/dogfood/test/owd-public-read-write-write-floor.dogfood.test.ts @@ -148,7 +148,7 @@ const probeApp = defineStack({ version: '0.0.1', type: 'app', name: 'OWD public_read_write Write Floor Probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [mk(OPEN, 'public_read_write'), mk(READ, 'public_read'), mk(SECRET, 'private')], permissions: [EditorSet, ViewerSet, ScopedSet], diff --git a/packages/qa/dogfood/test/security-catalog-cold-boot-environment-holder.dogfood.test.ts b/packages/qa/dogfood/test/security-catalog-cold-boot-environment-holder.dogfood.test.ts index ea6c27c88b1..027138f69a1 100644 --- a/packages/qa/dogfood/test/security-catalog-cold-boot-environment-holder.dogfood.test.ts +++ b/packages/qa/dogfood/test/security-catalog-cold-boot-environment-holder.dogfood.test.ts @@ -69,7 +69,7 @@ const SET = 'coldboot_env_set'; const POSITION = 'coldboot_env_position'; const manifestOf = (id: string, namespace: string) => ({ - id, namespace, version: '0.0.1', type: 'app' as const, name: id, engines: { protocol: '^18' }, + id, namespace, version: '0.0.1', type: 'app' as const, name: id, engines: { protocol: '^19' }, }); const Note = ObjectSchema.create({ diff --git a/packages/qa/dogfood/test/security-verdict-follows-runtime-metadata-change.dogfood.test.ts b/packages/qa/dogfood/test/security-verdict-follows-runtime-metadata-change.dogfood.test.ts index 516ea7363d3..899e14e2263 100644 --- a/packages/qa/dogfood/test/security-verdict-follows-runtime-metadata-change.dogfood.test.ts +++ b/packages/qa/dogfood/test/security-verdict-follows-runtime-metadata-change.dogfood.test.ts @@ -84,7 +84,7 @@ const probeApp = defineStack({ version: '0.0.1', type: 'app', name: 'Authorization Verdict Follows Runtime Metadata Probe', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, permissions: [MemberSet, CapableSet], }); diff --git a/packages/qa/dogfood/test/view-container-default-form.dogfood.test.ts b/packages/qa/dogfood/test/view-container-default-form.dogfood.test.ts index 798661b9eb1..c6854abde8e 100644 --- a/packages/qa/dogfood/test/view-container-default-form.dogfood.test.ts +++ b/packages/qa/dogfood/test/view-container-default-form.dogfood.test.ts @@ -94,7 +94,7 @@ const fixture = defineStack({ version: '0.0.1', type: 'app', name: 'Default form fixture', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, objects: [object('crm_lead'), object('crm_contact'), object('crm_account')], views: [ diff --git a/packages/qa/scenarios/test/export/exporter.test.ts b/packages/qa/scenarios/test/export/exporter.test.ts index a53b24c7ca0..0dd56b3131b 100644 --- a/packages/qa/scenarios/test/export/exporter.test.ts +++ b/packages/qa/scenarios/test/export/exporter.test.ts @@ -500,7 +500,7 @@ export default defineStack({ type: 'app', name: 'Travel Expense', // Protocol compatibility range. - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, }, requires: ['automation', 'triggers'], diff --git a/packages/runtime/src/standalone-stack-option-b-forward-conversion.test.ts b/packages/runtime/src/standalone-stack-option-b-forward-conversion.test.ts index 6fb674bf9e3..462314f6451 100644 --- a/packages/runtime/src/standalone-stack-option-b-forward-conversion.test.ts +++ b/packages/runtime/src/standalone-stack-option-b-forward-conversion.test.ts @@ -56,6 +56,10 @@ const dashboard = (name: string, refresh: Record) => ({ name, la /** * The shape `os build` writes for a two-package project: the artifact's own * `manifest` is its last package's, every collection sits in a body. + * + * The boot fixtures pass `'>=18.0.0'`, not `'^19'`: it keeps the floor `'^18'` + * read as (18.0.0), which opens the conversion window this file is about, and + * admits protocol 19 at the handshake. `'^19'` reads as the floor 19.0.0. */ function optionB(range: string, ordersBody: Bag, coreBody: Bag = {}): Bag { return { @@ -142,7 +146,7 @@ afterAll(() => { describe('[#23027] the runtime\'s artifact load converts every package body once', () => { it('loadArtifactBundle hands back the converted body, and a second conversion (the metadata door\'s) finds nothing left', async () => { - const { artifactPath } = writeArtifact('loader', optionB('^18', { dashboards: [dashboard('ob_overview', { refreshInterval: 300 })] })); + const { artifactPath } = writeArtifact('loader', optionB('>=18.0.0', { dashboards: [dashboard('ob_overview', { refreshInterval: 300 })] })); const loaded = (await loadArtifactBundle(artifactPath, { unwrapEnvelope: true })) as Bag; expect(loaded.packages[0].manifest.dashboards).toEqual([dashboard('ob_overview', { refreshIntervalSeconds: 300 })]); @@ -157,7 +161,7 @@ describe('[#23027] the runtime\'s artifact load converts every package body once describe('boots: the body\'s dashboard is served as `refreshIntervalSeconds: 300` under its own package', () => { let kernel: any; beforeAll(async () => { - kernel = await bootArtifact('subject', optionB('^18', { dashboards: [dashboard('ob_overview', { refreshInterval: 300 })] })); + kernel = await bootArtifact('subject', optionB('>=18.0.0', { dashboards: [dashboard('ob_overview', { refreshInterval: 300 })] })); }, BOOT_TIMEOUT); afterAll(async () => { try { await kernel?.shutdown(); } catch { /* noop */ } }); @@ -170,7 +174,7 @@ describe('[#23027] the runtime\'s artifact load converts every package body once let kernel: any; beforeAll(async () => { kernel = await bootArtifact('multi', optionB( - '^18', + '>=18.0.0', { dashboards: [dashboard('ob_overview', { refreshInterval: 300 })] }, { dashboards: [dashboard('ob_core_overview', { refreshInterval: 120 })] }, )); @@ -187,7 +191,7 @@ describe('[#23027] the runtime\'s artifact load converts every package body once let kernel: any; beforeAll(async () => { kernel = await bootArtifact('control', { - manifest: core('^18'), + manifest: core('>=18.0.0'), dashboards: [dashboard('ob_overview', { refreshInterval: 300 })], }); }, BOOT_TIMEOUT); @@ -225,7 +229,7 @@ describe('[#23027] the runtime\'s artifact load converts every package body once }; const refreshes: Record[] = [{ refreshInterval: 300 }, { refreshIntervalSeconds: 300 }]; for (const refresh of refreshes) { - const { dir, artifactPath } = writeArtifact('db', optionB('^18', { ...declared, dashboards: [dashboard('ob_overview', refresh)] })); + const { dir, artifactPath } = writeArtifact('db', optionB('>=18.0.0', { ...declared, dashboards: [dashboard('ob_overview', refresh)] })); const resolved = resolveProjectDatabaseUrl({ artifactPath, projectRoot: dir, env: {} }); expect([resolved.source, resolved.url, resolved.datasourceName], JSON.stringify(refresh)) .toEqual(['config-datasource', `file:${join(dir, 'ob.db')}`, 'ob_db']); diff --git a/packages/spec/src/data/field-inline-edit-boolean.pin.test.ts b/packages/spec/src/data/field-inline-edit-boolean.pin.test.ts index 090de0c1e86..73100cd467a 100644 --- a/packages/spec/src/data/field-inline-edit-boolean.pin.test.ts +++ b/packages/spec/src/data/field-inline-edit-boolean.pin.test.ts @@ -35,7 +35,7 @@ function issues(result: z.ZodSafeParseResult): { code: string; path: st } const PRESCRIPTION = - /^`field\.inlineEdit: true` and `field\.inlineEdit: false` were removed in @objectstack\/spec 18\.7\.0 \(ADR-0049 enforce-or-remove\) — .*`fieldGroups\[\]\.relatedList`.*Delete the key, or write `'grid'`.*Run `os migrate meta --from 17`/s; + /^`field\.inlineEdit: true` and `field\.inlineEdit: false` were removed in @objectstack\/spec 19\.0\.0 \(ADR-0049 enforce-or-remove\) — .*`fieldGroups\[\]\.relatedList`.*Delete the key, or write `'grid'`.*Run `os migrate meta --from 17`/s; describe('§1 the boolean arm of `inlineEdit` is refused', () => { for (const value of [true, false]) { diff --git a/packages/spec/src/data/field.zod.ts b/packages/spec/src/data/field.zod.ts index c346c229c2f..ee91123e2dd 100644 --- a/packages/spec/src/data/field.zod.ts +++ b/packages/spec/src/data/field.zod.ts @@ -1671,7 +1671,7 @@ function refuseMalformedLookupFilterEntry( * ⛔ Runtime text — no tracker numbers (`check:doc-authoring`). */ const INLINE_EDIT_BOOLEAN_RETIRED = - '`field.inlineEdit: true` and `field.inlineEdit: false` were removed in @objectstack/spec 18.7.0 ' + '`field.inlineEdit: true` and `field.inlineEdit: false` were removed in @objectstack/spec 19.0.0 ' + '(ADR-0049 enforce-or-remove) — neither boolean had an effect: a field group of the parent ' + '(`fieldGroups[].relatedList`) decides whether the parent\'s form inlines this child, and both ' + '`true` and `false` read as an absent key, the form factor picked from the child\'s shape. ' diff --git a/packages/spec/src/data/seed.test.ts b/packages/spec/src/data/seed.test.ts index 85dd4097c4b..46935a5c63f 100644 --- a/packages/spec/src/data/seed.test.ts +++ b/packages/spec/src/data/seed.test.ts @@ -15,8 +15,8 @@ describe('SeedMode', () => { // [#34613] The two unkeyed modes are retired (ADR-0049 enforce-or-remove): // each refusal names the mode, the version and the keyed fix. it.each([ - ['insert', /`seed\.mode: 'insert'` was removed in @objectstack\/spec 18\.7\.0.*every replay.*inserted each record again.*`mode: 'ignore'`.*`externalId`/s], - ['replace', /`seed\.mode: 'replace'` was removed in @objectstack\/spec 18\.7\.0.*no load ever clears one.*`mode: 'ignore'`.*`externalId`/s], + ['insert', /`seed\.mode: 'insert'` was removed in @objectstack\/spec 19\.0\.0.*every replay.*inserted each record again.*`mode: 'ignore'`.*`externalId`/s], + ['replace', /`seed\.mode: 'replace'` was removed in @objectstack\/spec 19\.0\.0.*no load ever clears one.*`mode: 'ignore'`.*`externalId`/s], ])('refuses the retired mode %s with its prescription', (mode, prescription) => { expect(() => SeedMode.parse(mode)).toThrow(prescription); const parsed = SeedSchema.safeParse({ object: 'task', mode, records: [{ name: 'a' }] }); diff --git a/packages/spec/src/data/seed.zod.ts b/packages/spec/src/data/seed.zod.ts index 908ec97570c..d45c395f3de 100644 --- a/packages/spec/src/data/seed.zod.ts +++ b/packages/spec/src/data/seed.zod.ts @@ -47,11 +47,11 @@ const SEED_MODE_RETIRED_FIX = * carries that judgement. */ const SEED_MODE_INSERT_RETIRED = - "`seed.mode: 'insert'` was removed in @objectstack/spec 18.7.0 (ADR-0049 enforce-or-remove) — a seed is " + "`seed.mode: 'insert'` was removed in @objectstack/spec 19.0.0 (ADR-0049 enforce-or-remove) — a seed is " + 'replayed on every boot, package install and publish, and `insert` matched no existing row, so every replay ' + 'inserted each record again. ' + SEED_MODE_RETIRED_FIX; const SEED_MODE_REPLACE_RETIRED = - "`seed.mode: 'replace'` was removed in @objectstack/spec 18.7.0 (ADR-0049 enforce-or-remove) — it inserted " + "`seed.mode: 'replace'` was removed in @objectstack/spec 19.0.0 (ADR-0049 enforce-or-remove) — it inserted " + 'every record and left clearing the table to the caller, and no load ever clears one, so every replay ' + 'inserted each record again. ' + SEED_MODE_RETIRED_FIX; diff --git a/packages/spec/src/kernel/protocol-version.ts b/packages/spec/src/kernel/protocol-version.ts index e6efaeca460..78a6fcae102 100644 --- a/packages/spec/src/kernel/protocol-version.ts +++ b/packages/spec/src/kernel/protocol-version.ts @@ -17,9 +17,14 @@ * Changesets pre mode with a pending `major` for this package: the constant may * already name the major that release is about to publish, so the protocol move * lands in a reviewed pull request with full CI rather than in the version pass - * (ruling record 6049734955, Q1 → B). + * (ruling record 6049734955, Q1 → B). Protocol 19 is that exception: it moved + * here while this package was still on its 18.x stable line, beside the v19 + * line's pending `major` (ruling record 7153441862, route A, item 2). In-repo + * manifests that mean "the current protocol" move to `'^19'` with it; the + * scaffolder's blank template follows at the version pass, and the published + * skills' examples in a change of their own. */ -export const PROTOCOL_VERSION = '18.0.0'; +export const PROTOCOL_VERSION = '19.0.0'; /** The protocol major as an integer — the value the handshake compares. */ export const PROTOCOL_MAJOR: number = Number.parseInt(PROTOCOL_VERSION.split('.')[0]!, 10); diff --git a/packages/spec/src/migrations/entries/semantic/19.protocol-18-range-refused.ts b/packages/spec/src/migrations/entries/semantic/19.protocol-18-range-refused.ts new file mode 100644 index 00000000000..f288c1800de --- /dev/null +++ b/packages/spec/src/migrations/entries/semantic/19.protocol-18-range-refused.ts @@ -0,0 +1,39 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +import type { SemanticMigration } from '../../types.js'; + +// The protocol move itself (ruling record 7153441862, route A, item 2). Not a +// key retirement: `engines.protocol` stays live and its schema is unchanged; +// what moves is the major the handshake compares it with, so a range that +// admits only 18 is refused at the doors that run the handshake. No D2 +// conversion: the range is the author's statement of which protocol the +// metadata was written against, and only the author can make it. +export const entry: SemanticMigration = { + id: 'protocol-18-range-refused', + surface: + 'manifest.engines.protocol (else engines.platform, else the legacy engine.objectstack) — a range ' + + 'that admits protocol 18 and not 19, such as \'^18\', on an app\'s manifest, on each package ' + + 'manifest of a multi-package app, or on a package installed through the package service or the ' + + 'marketplace', + replacement: + 'Declare the protocol-19 range: `engines: { protocol: \'^19\' }`. `objectstack migrate meta --from 18 ' + + '--write` rewrites the range of a root `defineStack` manifest, at the key the handshake reads. A ' + + 'manifest `composeStacks` composes from several packages has no one literal to rewrite: the command ' + + 'writes nothing there and lists the range for a hand edit, so change it in each package manifest. ' + + 'Move it together with the `@objectstack/*` versions: an 18.x runtime refuses \'^19\'.', + reason: + 'PROTOCOL_VERSION moved to 19.0.0, and the load-time handshake (ADR-0087 D1) compares only the major ' + + 'of a manifest\'s declared range with it. A range that admits 18 and not 19 is a major-version break, ' + + 'so the app plugin, the package service and the marketplace install refuse it with ' + + 'OS_PROTOCOL_INCOMPATIBLE before any of its metadata loads, naming the declared range, the runtime ' + + 'protocol and objectstack migrate meta --from 18. ⚠️ No D2 conversion: the range is the author\'s ' + + 'statement of the protocol the metadata was written against, so the runtime never rewrites it. ADR-0087.', + acceptanceCriteria: + 'Grep every manifest the project declares (objectstack.config.ts and each package manifest) for an ' + + 'engines.protocol range that does not admit 19. Run objectstack migrate meta --from 18 --write: it ' + + 'rewrites a root defineStack manifest\'s range to \'^19\', and for a manifest composed by ' + + 'composeStacks it writes nothing and lists the range left for a hand edit, so set each package ' + + 'manifest to \'^19\' yourself. Then objectstack validate passes, the deployment boots without ' + + 'OS_PROTOCOL_INCOMPATIBLE, and every package installs; a manifest already declaring \'^19\' loads ' + + 'exactly as before.', +}; diff --git a/packages/spec/src/migrations/registry.ts.template b/packages/spec/src/migrations/registry.ts.template index 2a82c15190e..02c69731bed 100644 --- a/packages/spec/src/migrations/registry.ts.template +++ b/packages/spec/src/migrations/registry.ts.template @@ -3699,10 +3699,38 @@ const step18: MigrationStep = { ], }; +/** + * Protocol 19 step — accumulating, uncut. + * + * Opened by the protocol move itself (ruling record 7153441862, route A, item + * 2): `PROTOCOL_VERSION` reads `'19.0.0'` on the v19 prerelease line, so the + * load-time handshake (ADR-0087 D1) refuses a manifest whose range admits only + * 18. That refusal is this step's first semantic entry, and the one every + * upgrading author meets first. Later retirements on the v19 line add their + * entries as files; a major-19 conversion, once one exists, graduates here the + * way step 18's do. + */ +const step19: MigrationStep = { + toMajor: 19, + rationale: + 'Protocol 19 moves the load-time handshake: a manifest whose `engines.protocol` range admits ' + + 'protocol 18 and not 19 is refused before any of its metadata loads, so each manifest an app ' + + 'or package declares moves its range to `^19`, together with its `@objectstack/*` versions.', + conversionIds: [], + semantic: [ + // One file per entry under `entries/semantic/`, concatenated here sorted by + // entry id by `gen:migration-registry` (#7297). Add an entry by adding a + // FILE — never by editing between the markers, which is generated. + // + // + ], +}; + /** All migration steps, keyed by the major they migrate into. */ export const MIGRATIONS_BY_MAJOR: Readonly> = { 17: step17, 18: step18, + 19: step19, }; /** The majors that have a step, ascending. */ diff --git a/packages/spec/src/system/translation-contributed-nav-bundle.test.ts b/packages/spec/src/system/translation-contributed-nav-bundle.test.ts index 20f3ae6c03e..44eabd4f1e9 100644 --- a/packages/spec/src/system/translation-contributed-nav-bundle.test.ts +++ b/packages/spec/src/system/translation-contributed-nav-bundle.test.ts @@ -47,7 +47,7 @@ const moduleStack = (translations: unknown[]) => ({ namespace: 'svc', version: '1.0.0', type: 'module', - engines: { protocol: '^18' }, + engines: { protocol: '^19' }, navigationContributions: [{ app: 'crm_enterprise', items: [{ id: 'nav_case', type: 'object', objectName: 'svc_case', label: 'Cases' }], diff --git a/packages/spec/src/ui/component.zod.ts b/packages/spec/src/ui/component.zod.ts index 1023ae6645d..c0613368b59 100644 --- a/packages/spec/src/ui/component.zod.ts +++ b/packages/spec/src/ui/component.zod.ts @@ -5466,7 +5466,7 @@ export const ObjectGridPropsSchema = lazySchema(() => strictObject({ * key from authored grids. */ singleClickEdit: retiredKey( - '`object-grid` property `singleClickEdit` was removed in @objectstack/spec 18.7.0 (ADR-0049) — ' + '`object-grid` property `singleClickEdit` was removed in @objectstack/spec 19.0.0 (ADR-0049) — ' + 'a grid that renders editable now selects a cell on a click and opens its editor on double-click, ' + 'Enter, F2 or typing, so a single-click entry no longer exists for this key to switch. ' + 'Delete the key; `editable` (with the viewer\'s write verdict) decides whether the grid edits. ' diff --git a/packages/spec/src/ui/object-grid-single-click-edit.pin.test.ts b/packages/spec/src/ui/object-grid-single-click-edit.pin.test.ts index a002d1f76c3..1eb39efaab5 100644 --- a/packages/spec/src/ui/object-grid-single-click-edit.pin.test.ts +++ b/packages/spec/src/ui/object-grid-single-click-edit.pin.test.ts @@ -37,7 +37,7 @@ function issues(result: z.ZodSafeParseResult): { code: string; path: st } const PRESCRIPTION = - /^`object-grid` property `singleClickEdit` was removed in @objectstack\/spec 18\.7\.0 \(ADR-0049\) — a grid that renders editable now selects a cell.*Delete the key; `editable`.*Run `os migrate meta --from 17`/s; + /^`object-grid` property `singleClickEdit` was removed in @objectstack\/spec 19\.0\.0 \(ADR-0049\) — a grid that renders editable now selects a cell.*Delete the key; `editable`.*Run `os migrate meta --from 17`/s; describe('§1 `singleClickEdit` is retired to a tombstone', () => { for (const value of [true, false]) { diff --git a/packages/spec/src/ui/view-column-state-retirement.test.ts b/packages/spec/src/ui/view-column-state-retirement.test.ts index 71343d698f4..9ec74dd07cd 100644 --- a/packages/spec/src/ui/view-column-state-retirement.test.ts +++ b/packages/spec/src/ui/view-column-state-retirement.test.ts @@ -53,8 +53,8 @@ const VALUE = { order: ['email', 'name'], widths: { email: 240 } } as const; // Unanchored: a thrown `ZodError`'s message is the JSON of its issues. The // key-first convention is asserted on the issue message itself below. -const PRESCRIPTION = /`view\.columnState` was removed in @objectstack\/spec 18\.7\.0 \(ADR-0049.*Delete the key\..*`os migrate meta --from 17`/s; -const LIST_BODY_PRESCRIPTION = /`listView\.columnState` was removed in @objectstack\/spec 18\.7\.0 \(ADR-0049.*Delete the key\./s; +const PRESCRIPTION = /`view\.columnState` was removed in @objectstack\/spec 19\.0\.0 \(ADR-0049.*Delete the key\..*`os migrate meta --from 17`/s; +const LIST_BODY_PRESCRIPTION = /`listView\.columnState` was removed in @objectstack\/spec 19\.0\.0 \(ADR-0049.*Delete the key\./s; type Issue = { code: string; path: PropertyKey[]; message: string; errors?: Issue[][] }; diff --git a/packages/spec/src/ui/view.zod.ts b/packages/spec/src/ui/view.zod.ts index 9ec5310daad..89cf9d5f5c0 100644 --- a/packages/spec/src/ui/view.zod.ts +++ b/packages/spec/src/ui/view.zod.ts @@ -3494,7 +3494,7 @@ export function checkListViewTimesheetBinding( * migration command — the author deletes the key by hand. */ const VIEW_LIST_COLUMN_STATE_RETIRED = - '`listView.columnState` was removed in @objectstack/spec 18.7.0 (ADR-0049 enforce-or-remove) — it was ' + '`listView.columnState` was removed in @objectstack/spec 19.0.0 (ADR-0049 enforce-or-remove) — it was ' + 'never a list view key: it held one column order and set of widths the console once stored on a view ' + 'row, and that layout is no longer applied. Delete the key. To ship a column order, list `columns` in that ' + 'order (or set `fieldOrder`); to ship a width, set `width` on the column.'; @@ -6389,7 +6389,7 @@ type ViewItemWireArmShape = { * the measured incident). */ const VIEW_COLUMN_STATE_RETIRED = - '`view.columnState` was removed in @objectstack/spec 18.7.0 (ADR-0049 enforce-or-remove) — it held one ' + '`view.columnState` was removed in @objectstack/spec 19.0.0 (ADR-0049 enforce-or-remove) — it held one ' + 'column order and set of widths on a shared view row; nothing writes it any more, and a stored layout is ' + 'no longer applied, so every reader sees the view\'s own column order and widths. The console keeps ' + 'column widths in each reader\'s browser and saves a column order into the view itself. ' diff --git a/ui/packages/i18n/scripts/released-keys-removed.mjs b/ui/packages/i18n/scripts/released-keys-removed.mjs index 21a8e0647ba..899f93a1f9e 100644 --- a/ui/packages/i18n/scripts/released-keys-removed.mjs +++ b/ui/packages/i18n/scripts/released-keys-removed.mjs @@ -52,6 +52,20 @@ const opt = (name, fallback) => { } return v; }; +// A closed argument set: an argument this script does not know (a typo such as +// `--refs`, or a bare positional) is refused rather than ignored, because an +// ignored `--ref` would answer for the default ref and look like the answer asked for. +const VALUED = new Set(['--tag', '--ref']); +for (let i = 0; i < args.length; i++) { + if (VALUED.has(args[i])) { + i++; + continue; + } + if (args[i] !== '--json') { + console.error(`released-keys-removed: unknown argument '${args[i]}' (known: --tag REF, --ref REF, --json)`); + process.exit(2); + } +} const TAG = opt('--tag', '@object-ui/i18n@18.6.0'); const REF = opt('--ref', 'origin/main'); const AS_JSON = args.includes('--json'); @@ -82,6 +96,13 @@ for (const ref of [TAG, REF]) { } } +// The commits both refs name. `^{commit}` peels an annotated tag to the commit it +// tags: a bare `rev-parse` of an annotated tag answers the tag OBJECT's id, which +// names no commit anyone can check out or compare against. +const commitOf = (ref) => git('rev-parse', `${ref}^{commit}`).trim(); +const TAG_SHA = commitOf(TAG); +const REF_SHA = commitOf(REF); + const tmp = mkdtempSync(join(tmpdir(), 'released-keys-removed-')); process.on('exit', () => rmSync(tmp, { recursive: true, force: true })); let seq = 0; @@ -225,8 +246,9 @@ const groups = [...removed.keys()].sort(); if (AS_JSON) { const body = { tag: TAG, + tagSha: TAG_SHA, ref: REF, - refSha: git('rev-parse', REF).trim(), + refSha: REF_SHA, total, movedBetweenModules: moved, groups: Object.fromEntries( @@ -238,7 +260,7 @@ if (AS_JSON) { }; console.log(JSON.stringify(body, null, 2)); } else { - console.log(`Keys in ${TAG} absent at ${REF} (${git('rev-parse', '--short', REF).trim()}): ${total}`); + console.log(`Keys in ${TAG} (${TAG_SHA.slice(0, 10)}) absent at ${REF} (${REF_SHA.slice(0, 10)}): ${total}`); for (const g of groups) { const space = before.has(g) ? g : 'translation'; const all = tagLangs(space);