You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spec): register the ADR-0030 notification cut-over in sys_migration's well-known migration ids (#15450)
* feat(spec): register the ADR-0030 notification cut-over in sys_migration's well-known ids
`sys_migration` records, per deployment, that a data migration ran against that
deployment's own database — the evidence consumers gate on instead of the
platform version. Its well-known ids were the two ADR-0104 scans and nothing
else. `migrateSysNotificationToEvent` had no id: it is destructive and one-way,
operators are handed the call verbatim in the ADR-0030 handoff, and a run of it
recorded nothing, so a deployment that performed the cut-over and one that never
did read identically from the ledger. An id is what a row can be keyed by;
without one the question had nowhere to be answered even in principle.
Adds `NOTIFICATION_EVENT_MIGRATION_ID = 'adr-0030-notification-event'` to
`@objectstack/spec/system`. Purely additive: no existing export, schema or
predicate moves, and no consumer reads the new id.
What a row under the id MEANS is deliberately left open, and the docblock says
so rather than letting its silence be read as an answer. The two ADR-0104 ids
take their `last_run_at` / `applied_at` / `verified_at` / `blocking` semantics
from an `os migrate` command that scans, self-checks and only then records; this
migration has neither command nor self-check and reports
`migrated`/`already_done`/`not_applicable`/`error` to its caller. Which columns
one of its runs may claim, whether anything may gate on the row, and whether a
datastore created after the cut-over belongs in
`CREATION_ATTESTED_MIGRATION_IDS`, are contract questions on this surface.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
* chore(spec): regenerate api-surface and export-origins for the new migration id
`check:generated` proved exactly 2 of 15 artifacts stale (api-surface/,
export-origins/); regenerated exactly those two with the package's own
generators. Each diff is one line naming NOTIFICATION_EVENT_MIGRATION_ID and its
declaration file — nothing else moved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
---------
Co-authored-by: Claude <noreply@anthropic.com>
`@objectstack/spec/system` now names the ADR-0030 notification cut-over, so "has this deployment run it?" has a place to be answered.
6
+
7
+
`sys_migration` is the ledger a deployment writes to record that a data migration ran against its own database, and consumers read it instead of the platform version. Its well-known ids were `adr-0104-file-references` and `adr-0104-value-shapes` — the two ADR-0104 scans, both driven by an `os migrate` command that records the row. `migrateSysNotificationToEvent` (`@objectstack/metadata/migrations`) had none. It is destructive and one-way, operators are handed the call verbatim in `docs/handoff/adr-0030-notification-convergence.md`, and it recorded nothing when it ran: a deployment that performed the cut-over and one that never did are indistinguishable from the ledger. A row can only be keyed by an id, so without one the question had nowhere to be answered even in principle.
8
+
9
+
Added: `NOTIFICATION_EVENT_MIGRATION_ID = 'adr-0030-notification-event'`, exported from `@objectstack/spec/system`. Purely additive — no existing export, schema or predicate changes, and nothing reads the new id yet.
10
+
11
+
Deliberately NOT decided here, and the constant's docblock says so rather than leaving its silence to be read as an answer: what a `sys_migration` row under this id means. The two ADR-0104 ids get their `last_run_at` / `applied_at` / `verified_at` / `blocking` semantics from a command that scans, self-checks and only then records; this migration has no command and no self-check, and reports `migrated` / `already_done` / `not_applicable` / `error` to its caller instead. Which of those columns one of its runs may claim, whether anything may gate on the row, and whether a datastore created after the cut-over belongs in `CREATION_ATTESTED_MIGRATION_IDS`, are contract questions on this surface and are left open.
0 commit comments