Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .changeset/17281-metadata-drops-dead-platform-objects-dep.md
Original file line number Diff line number Diff line change
@@ -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.
30 changes: 30 additions & 0 deletions .changeset/17281-platform-objects-attest-fresh-datastore.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 0 additions & 1 deletion packages/metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 1 addition & 4 deletions packages/metadata/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"types": [
"node",
"js-yaml"
],
"paths": {
"@objectstack/platform-objects/system": ["../platform-objects/src/system/index.ts"]
}
]
}
}
12 changes: 0 additions & 12 deletions packages/metadata/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@
* 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
* audit stamp hooks are registered) over a real {@link SqliteWasmDriver}, and
* 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
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading