diff --git a/.changeset/17281-metadata-drops-dead-platform-objects-dep.md b/.changeset/17281-metadata-drops-dead-platform-objects-dep.md new file mode 100644 index 00000000000..7f23ac13672 --- /dev/null +++ b/.changeset/17281-metadata-drops-dead-platform-objects-dep.md @@ -0,0 +1,39 @@ +--- +'@objectstack/metadata': patch +--- + +`@objectstack/metadata` no longer declares `@objectstack/platform-objects`. + +The dependency was the retired `adr-0030-notification-event` migration runner's, +and that runner was its only consumer. Nothing under `packages/metadata/src` +carries a `@objectstack/platform-objects` specifier any more, so the declaration +described an edge the package no longer has. The two test-tooling entries that +existed only to serve it go with it: the `@objectstack/platform-objects/system` +alias in `vitest.config.ts` (whose comment still cited the retired migration's +receipt cases as its reason) and the matching `paths` mapping in `tsconfig.json`. + +## What an installing consumer should check + +⚠️ This is a **published** package dropping a declared dependency, so it changes +what an install tree contains, not just what this repo builds. If you import +`@objectstack/platform-objects` **without declaring it**, and it resolved for you +only because `@objectstack/metadata` hoisted it, that resolution is gone — the +fix is one line, and it is the supported spelling either way: + +``` +pnpm add @objectstack/platform-objects # or npm/yarn equivalent +``` + +`@objectstack/platform-objects` is published on its own and is unchanged by this; +nothing is renamed, removed or re-exported. + +⛔ Nothing `@objectstack/metadata` itself ships is affected. Measured rather than +asserted: its built `dist/` (30 files, 10 declaration files) carries **zero** +occurrences of `platform-objects`, against a positive control in which all nine +of its other declared dependencies appear in four to twelve dist files each. No +runtime import and no type reference reaches it, so no consumer can arrive at it +through anything this package publishes. + +Grade `patch`, measured rather than defaulted: no export moves, no accept-set +widens, no runtime behaviour changes. Not `skip-changeset` either — `package.json` +is shipped by `npm pack`, and a consumer's install tree is what changes. diff --git a/.changeset/17281-platform-objects-attest-fresh-datastore.md b/.changeset/17281-platform-objects-attest-fresh-datastore.md new file mode 100644 index 00000000000..1d7e5c46a0f --- /dev/null +++ b/.changeset/17281-platform-objects-attest-fresh-datastore.md @@ -0,0 +1,30 @@ +--- +'@objectstack/platform-objects': minor +--- + +A datastore created from empty now attests **two** creation-attested migration ids, not +three. + +`attestFreshDatastore` (`@objectstack/platform-objects/system`) writes one `sys_migration` +row per id in `CREATION_ATTESTED_MIGRATION_IDS` (`@objectstack/spec/system`) at the moment +a store is created from empty. That tuple lost `'adr-0030-notification-event'` when the +ADR-0030 notification cut-over was retired, so a store born on this version is attested for +`'adr-0104-file-references'` and `'adr-0104-value-shapes'` alone. + +## What an operator sees + +- A fresh deployment's `sys_migration` table holds **two** creation-attested rows where it + held three. Nothing else about them moves: both carry the same + `attested: 'datastore-created-empty'` marker in `details`, and both ADR-0104 gates are + enabled from birth exactly as before. +- **No row is written under `'adr-0030-notification-event'` any more, and nothing reads + one.** A deployment that already holds such a row keeps it, untouched — + `NOTIFICATION_EVENT_MIGRATION_ID` (`@objectstack/spec/system`) survives as that row's + name so the table stays readable by an operator. The id gates nothing, and never did. +- Nothing this package exports is renamed, removed or re-signed. `attestFreshDatastore` + takes the same arguments and answers the same shape; a caller passing its own + `migrationIds` is unaffected, because only the default moved. + +There is nothing to adopt and no command to run. Pre-ADR-0030 `sys_notification` rows are +not carried by the platform on this line, so a store created from empty has nothing the +retired id could have attested. diff --git a/packages/metadata/package.json b/packages/metadata/package.json index d4d066c5756..6dac4f471b1 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -83,7 +83,6 @@ "@objectstack/core": "workspace:*", "@objectstack/metadata-core": "workspace:*", "@objectstack/metadata-fs": "workspace:*", - "@objectstack/platform-objects": "workspace:*", "@objectstack/spec": "workspace:*", "@objectstack/types": "workspace:*", "chokidar": "^5.0.0", diff --git a/packages/metadata/src/migrations/raw-exec-operator-detail-16657.test.ts b/packages/metadata/src/migrations/raw-exec-operator-detail-16657.test.ts index 516a22cd357..4502cb811d1 100644 --- a/packages/metadata/src/migrations/raw-exec-operator-detail-16657.test.ts +++ b/packages/metadata/src/migrations/raw-exec-operator-detail-16657.test.ts @@ -23,12 +23,16 @@ * ⚠️ That channel is a RULE, not byte-identity with what these `catch` blocks * used to compute, and the negative pins below do not claim otherwise: each * throws a NON-EMPTY `new Error(…)`, the shape for which the rule and the old - * expression agree. They differ elsewhere — at the three `err?.message ?? + * expression agree. They differ elsewhere — at the two `err?.message ?? * String(err)` sites `new Error('')` recorded `''` and now records `'Error'`, * and `{message:42}` recorded the number where it now records * `'[object Object]'`; at the `error instanceof Error ? … : String(error)` site * `{message:'x'}` recorded `'[object Object]'` and now records `'x'`. * + * ⚠️ Two, not the three this said when it was written. The third was + * `migrateSysNotificationToEvent`, and it went with that runner when the + * adr-0030-notification-event migration was retired. + * * ⚠️ The composed sentence is the producer's, copied; `driver-sql`'s * `sql-driver-16657-operator-facing-cause-text.test.ts` pins the copy against a * real `SqlDriver.execute()` refusal. diff --git a/packages/metadata/tsconfig.json b/packages/metadata/tsconfig.json index c67040664d6..21bcec5409d 100644 --- a/packages/metadata/tsconfig.json +++ b/packages/metadata/tsconfig.json @@ -13,9 +13,6 @@ "types": [ "node", "js-yaml" - ], - "paths": { - "@objectstack/platform-objects/system": ["../platform-objects/src/system/index.ts"] - } + ] } } diff --git a/packages/metadata/vitest.config.ts b/packages/metadata/vitest.config.ts index 87b076737ab..48350fede61 100644 --- a/packages/metadata/vitest.config.ts +++ b/packages/metadata/vitest.config.ts @@ -43,18 +43,6 @@ export default defineConfig({ replacement: path.join(path.resolve(__dirname, '..'), 'spec/src/$1/index.ts'), }, { find: /^@objectstack\/spec$/, replacement: path.resolve(__dirname, '../spec/src/index.ts') }, - // [#16100] The deployment-ledger writer/reader pair the notification-event - // migration's receipt cases drive (`attestFreshDatastore` seeds the - // fresh-store row, `isDataMigrationVerified` reads the verdict back). The - // entry is ANCHORED on the subpath rather than spelled bare: this package - // publishes a FILE-shaped subpath (`./plugin`), so a bare prefix rule with - // a file replacement would resolve `…/system` to - // `…/platform-objects/src/index.ts/system` — ENOTDIR at run time, from a - // config that reads as correct. - { - find: /^@objectstack\/platform-objects\/system$/, - replacement: path.resolve(__dirname, '../platform-objects/src/system/index.ts'), - }, // Subpath BEFORE the bare package, same prefix-match reason: `./node` is a // published subpath served by a FILE (`types/src/node.ts` — the node-only slice // the root export deliberately excludes), so the bare entry would resolve it to diff --git a/packages/plugins/plugin-audit/src/read-audit-view-instant-preservation.integration.test.ts b/packages/plugins/plugin-audit/src/read-audit-view-instant-preservation.integration.test.ts index c6336be0389..a9853933635 100644 --- a/packages/plugins/plugin-audit/src/read-audit-view-instant-preservation.integration.test.ts +++ b/packages/plugins/plugin-audit/src/read-audit-view-instant-preservation.integration.test.ts @@ -15,9 +15,11 @@ * the driver stores, on BOTH sides of any change to the write's context. The * case is green today, was green before #15964 flattened the ordinary insert * branch, and stays green after this card's fix. An instrument that cannot fail - * is indistinguishable from a pass — the same shape that let + * is indistinguishable from a pass — the same shape that let the since-retired * `migrate-sys-notification-to-event.test.ts` read `23 passed` for #16312 while - * the rows it described were being restamped. + * the rows it described were being restamped. That file went with the + * adr-0030-notification-event migration it covered; it is named here for the + * SHAPE it demonstrated, not as a file to go read. * * ⇒ this file is the instrument that CAN fail. It boots a real * {@link ObjectKernel} with the real {@link ObjectQLPlugin} (so the shipped @@ -25,8 +27,9 @@ * reads the persisted row back through the driver's own SQL surface. * * ⚠️ Unlike #16312's equivalent (`packages/runtime/src/notification-migration- - * audit-preservation.integration.test.ts`), this one lives beside the code it - * tests. That file had to leave `packages/metadata` because + * audit-preservation.integration.test.ts`, retired together with the migration + * it covered and no longer in the tree), this one lives beside the code it + * tests. That file had had to leave `packages/metadata` because * `@objectstack/objectql` depends on it and the test-only import would have * closed a cycle. Here the edge already runs the other way — * `@objectstack/plugin-audit` depends on `@objectstack/objectql` — and diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 981a61066d0..d02030ab565 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1206,9 +1206,6 @@ importers: '@objectstack/metadata-fs': specifier: workspace:* version: link:../metadata-fs - '@objectstack/platform-objects': - specifier: workspace:* - version: link:../platform-objects '@objectstack/spec': specifier: workspace:* version: link:../spec