|
| 1 | +--- |
| 2 | +"@objectstack/spec": major |
| 3 | +--- |
| 4 | + |
| 5 | +refactor(spec)!: remove `activationEvents` (both keys) and the `ActivationEventSchema` vocabulary — lazy activation that no runtime ever implemented (#4657, ADR-0049) |
| 6 | + |
| 7 | +`activationEvents` promised lazy plugin activation ("plugins remain dormant |
| 8 | +until an activation event fires") on two authorable surfaces — |
| 9 | +`DynamicLoadRequest.activationEvents` (`@objectstack/spec/kernel`) and |
| 10 | +`StudioPluginManifest.activationEvents` (`@objectstack/spec/studio`, the |
| 11 | +`defineStudioPlugin` input) — and **no runtime in objectstack / cloud / |
| 12 | +cloud-v1 / objectui ever read either key** (four-repo bare-name scan in #4657, |
| 13 | +re-verified at implementation time). Every plugin has always activated |
| 14 | +immediately on load/registration; cloud-v1's own ROADMAP recorded lazy |
| 15 | +activation as ❌ unimplemented (planned v0.4.0). That is ADR-0049's |
| 16 | +declared ≠ enforced shape in the semantically-lying direction: an author |
| 17 | +writing `activationEvents: [{ type: 'onMetadataType', pattern: 'flow' }]` |
| 18 | +expected deferral and got eager activation with a clean parse. |
| 19 | + |
| 20 | +#4653 had just converged the two `ActivationEventSchema` declarations onto one |
| 21 | +structured `{ type, pattern }` form inside this same unreleased major; with the |
| 22 | +enforce-or-remove ruling landing on **remove**, that converged vocabulary |
| 23 | +retires before ever shipping. Composed across the two changes, a v16 author |
| 24 | +simply deletes the key in whichever form they carried. |
| 25 | + |
| 26 | +Migration (FROM → TO): |
| 27 | + |
| 28 | +- `activationEvents` in a `defineStudioPlugin` input / `StudioPluginManifest` |
| 29 | + value — v16 string form (`['*']`, `['onMetadataType:flow']`) or v17-rc |
| 30 | + structured form (`[{ type: 'onStartup', pattern: '*' }]`) alike → |
| 31 | + **delete the key**. There is no replacement value: eager activation is the |
| 32 | + only behaviour there has ever been, and `activate()` still runs at |
| 33 | + registration time. The strict manifest parse rejects the key (and its former |
| 34 | + VS Code-flavoured aliases `activation` / `events` / `onActivate`) with this |
| 35 | + prescription. |
| 36 | +- `activationEvents` in a `DynamicLoadRequest` value → **delete the key**. |
| 37 | + Tombstoned, not silently stripped — `DynamicLoadRequestSchema` is not |
| 38 | + `.strict()`, so a `retiredKey()` tombstone makes authoring it a `tsc` error |
| 39 | + and a parse error carrying the prescription. |
| 40 | +- `import { ActivationEventSchema, ActivationEvent } from '@objectstack/spec/kernel'` |
| 41 | + (or `/studio`) → **no replacement export** (TS2305 after upgrade). Nothing |
| 42 | + consumed the vocabulary; an exported schema with no consumer is read as a |
| 43 | + capability by whoever finds it (#3950), so the orphaned def goes with the |
| 44 | + keys. |
| 45 | +- Lazy activation is a **new capability**: if it is ever built it returns via |
| 46 | + the enforce route of ADR-0049 through a new ADR — executor first, vocabulary |
| 47 | + second — not by re-declaring inert keys. |
| 48 | + |
| 49 | +Self-check (#4535 §5): TS2305 — yes, two removed exports on two entries; |
| 50 | +metadata migration — none possible or needed (`StudioPluginManifest` is TS |
| 51 | +configuration parsed by `defineStudioPlugin`, a root schema never stored in |
| 52 | +`sys_metadata`; `DynamicLoadRequest` is a runtime request shape with no |
| 53 | +caller — no stored row exists for a D2 conversion to rewrite, so the change is |
| 54 | +one ADR-0087 D3 semantic record, `plugin-activation-events-retired`); shape |
| 55 | +change — two keys removed, zero behaviour change (eager activation before and |
| 56 | +after, byte-identical). |
| 57 | + |
| 58 | +The retirement kit: `retiredKey()` tombstone on the non-strict kernel schema; |
| 59 | +strict-parse `guidance` prescriptions on the studio manifest (including the |
| 60 | +three former aliases); ADR-0087 D3 semantic migration; baselines |
| 61 | +(`authorable-surface.json` — one `[RETIRED]` line, five lines dropped |
| 62 | +deliberately with the defs; `json-schema.manifest.json` — `kernel/ActivationEvent` |
| 63 | +and `studio/ActivationEvent` def removals; `api-surface.json`) regenerated |
| 64 | +deliberately; compiler-API export pin (`activation-events-retirement.test.ts`, |
| 65 | +zero holders across every public entry) — sabotage-verified. |
0 commit comments