|
| 1 | +--- |
| 2 | +"@objectstack/spec": minor |
| 3 | +"@objectstack/service-automation": minor |
| 4 | +--- |
| 5 | + |
| 6 | +feat(spec,automation): graduate the seven flow-node config key aliases into the conversion layer — the `readAliasedConfig` shim retires with them (#3796) |
| 7 | + |
| 8 | +`FlowNodeSchema.config` is an unconstrained record, so the executors were the |
| 9 | +only statement of which config key is canonical — and seven deprecated aliases |
| 10 | +lived there as tolerance the spec never declared: one behind the |
| 11 | +`readAliasedConfig` deprecation shim (warned, ledgered), six as open-coded |
| 12 | +`??` fallbacks (no warning, no ledger, no retirement path). All seven now |
| 13 | +graduate into the ADR-0087 D2 conversion layer as protocol-17 **live-window** |
| 14 | +entries: a stored flow authored with an alias is rewritten to the canonical |
| 15 | +key at load — `defineStack` / `validate` / `lint` and the |
| 16 | +`AutomationEngine.registerFlow` rehydration seam alike — with a structured |
| 17 | +`ConversionNotice` per rewrite, and the executors read the canonical keys |
| 18 | +only. The shim (`service-automation/src/builtin/config-aliases.ts`) is empty |
| 19 | +and deleted. |
| 20 | + |
| 21 | +FROM → TO (per node type; conversion entry in parentheses): |
| 22 | + |
| 23 | +- `get_record`/`create_record`/`update_record`/`delete_record`: |
| 24 | + `config.object` → `config.objectName` (`flow-node-crud-object-alias`) |
| 25 | +- `notify`: `config.to` → `config.recipients`, `config.subject` → |
| 26 | + `config.title`, `config.body` → `config.message`, `config.url` → |
| 27 | + `config.actionUrl` (`flow-node-notify-config-aliases`) |
| 28 | +- `script`: `config.functionName` → `config.function`, `config.input` → |
| 29 | + `config.inputs` (`flow-node-script-config-aliases`) |
| 30 | + |
| 31 | +One-line fix: rename the key in your flow source — values are unchanged; `os |
| 32 | +migrate meta --from 16` rewrites all seven mechanically. Until then nothing |
| 33 | +breaks: the protocol-17 loader accepts and converts the old shape (window |
| 34 | +retires in 18). |
| 35 | + |
| 36 | +`actionUrl` (not `url`) is the deliberate canonical of its pair, resolving a |
| 37 | +contradiction where the notify descriptor documented `url` as canonical while |
| 38 | +the executor, tests, and examples preferred `actionUrl`: the whole downstream |
| 39 | +chain already uses that name (`sys_notification.action_url`, the |
| 40 | +channel-dispatch contract, the REST notification read model), and `url` |
| 41 | +elsewhere in the platform means "HTTP endpoint to call" (`http` node, |
| 42 | +webhooks) — a different concept from this in-app click-through target. The |
| 43 | +executor precedence already put `actionUrl` first, so the choice is |
| 44 | +behaviour-preserving; the `notify` descriptor's `configSchema` now documents |
| 45 | +`actionUrl`. |
| 46 | + |
| 47 | +Callers that hand a node config **directly** to an executor (bypassing |
| 48 | +`registerFlow`) no longer get alias resolution — build the config with the |
| 49 | +canonical keys. |
0 commit comments