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
{{ message }}
Repository navigation
Commit 281d91a
Browse filesBrowse the repository at this point in the historyBrowse files
docs(spec): the email template locale docs describe the ladder #28880 landed (#28896)
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The `SendTemplateInput.template` / `.locale` docs, the `EMAIL_TEMPLATE_FLOOR_LOCALE` docblock, the `EmailTemplateDefinitionSchema.locale` docblock and its served `describe`, and the `defineStack` warning for a bundle with no `en-US` row said the resolver matches the named locale exactly and retries only `en-US`, with no language-subtag folding. Since #28880, over the built-in template loader, a call that names a locale folds it against the template's own locales (exact, case-insensitive, base language, variant expansion), then tries the stack's declared fallback locale (`i18n.fallbackLocale`, else `defaultLocale`) folded the same way, then `en-US`, then fails with `TEMPLATE_NOT_FOUND`. The texts now say so, and say that a replacement `TemplateLoader` keeps the exact ladder and that a call naming no locale keeps its own ladder (`en-US`, then the bundle's lowest tag).
11
+
12
+
Text only: no schema shape, accept set or warning trigger changes. `en` and `en-US` are still two rows of one bundle.
fix(service-datasource)!: the datasource admin doors refuse an empty `secret` instead of sealing it over the working credential
6
+
7
+
Clause-②: no (narrowing) — `POST /api/v1/datasources` and `PATCH /api/v1/datasources/:name` refuse one body that used to answer 201 / 200: a `secret` whose value is the empty string (`"secret": ""` or `"secret": { "value": "" }`), now `400 DATASOURCE_ADMIN_ERROR` naming `secret`. No new error code, no new answer member, no exported type changes.
8
+
Metadata-protocol: none
9
+
10
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped: secret is the doors' own credential channel, split off the body before the datasource draft is judged. The refused value stored nothing usable, and a row sealed with it before is reported at connect with a reason that says the credential is empty, so there is nothing at rest for a migration to rewrite. -->
11
+
12
+
**BREAKING** accept-set narrowing at the datasource admin doors (`@objectstack/service-datasource`): an empty `secret` is refused.
13
+
14
+
-**Before.** An empty `secret` was taken as a value. A create sealed it as the datasource's credential. An edit took it as a rotation: a new `sys_secret` row holding an empty value, `external.credentialsRef` repointed at it, and the working row removed. The live pool kept serving, so the datasource broke only at its next connect, with the old credential already gone.
15
+
-**Now.** Both doors refuse it before anything is written: no `sys_secret` row is written, the stored record and its `credentialsRef` are unchanged, and no row is removed. A whitespace-only value is still a value, sealed and used as sent. `null` and an absent `secret` keep the stored credential, as before.
16
+
-**Rows sealed before.** A datasource whose stored credential decrypts to an empty value still fails closed at connect (`failed-credentials`), and its status reason now says the credential is empty instead of blaming a missing `sys_secret` row or a changed encryption key.
17
+
-**Who moves.** The console sends `secret` only when the field holds a value, so it never sent an empty one. A script or SDK call that sends `"secret": ""` to mean "no change" gets the 400.
18
+
19
+
**The remedy.** To keep the stored credential, leave `secret` out of the request (or send `null`). To replace it, send the new credential.
fix(cli): `os migrate meta --json` says when no migration step ran
6
+
7
+
Clause-②: yes (widening)
8
+
Metadata-protocol: none
9
+
10
+
An empty range (`--from N` where `N` is already the highest major this build carries a step for, or `--from N --to N`) and an inverted one (`--from` above `--to`) replay no step. The human run has always warned that such a run "replayed nothing — that is not a finding that the metadata is canonical", but the `--json` answer looked exactly like a clean replay: `applied: []`, `todos: []`, `schemaValid: true`, exit 0. A script or CI step with a wrong `--from` was told its metadata had been migrated.
11
+
12
+
The `--json` answer now carries `replayedNothing` whenever no step ran:
13
+
14
+
-`reason`: `empty-range` when the range is well-formed but holds no step, `inverted-range` when `--from` is above `--to`.
15
+
-`widestRange`: the widest range this build carries from the same `--from` (`from`, `to`) and how many mechanical (`applied`) and manual (`manual`) changes it holds for this stack, or `null` when no wider range exists: `--to` already reaches the highest major, or `--from` is at or above it.
16
+
17
+
Both faces read the same answer, so the human run now also names an inverted range as inverted. A run that replays at least one step carries no `replayedNothing` member and its payload is unchanged, and the exit code is unchanged in every case: an inverted range is answered, not refused.
Studio field inspector: when a field of a read-only base package opens in display-patch mode, every control it locks (API name, Type, Required and Unique, Default value, option values and colours, Track history, the rule editors, Move up/down, Remove and the rest) now explains itself. Each sits in a focusable wrapper described by the "you can change only …" sentence, which also shows as a tooltip on hover and keyboard focus. The editable display properties (Label, Description, Help text, Placeholder, option labels) carry no reason.
fix(console): a caller the Setup app refuses gets "You don't have access to this app" on an object list spelled with the `setup` alias, as on the package-id spelling, instead of the list inside another app's shell
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
`/apps/setup/OBJECT`, `/apps/setup/OBJECT/view/ID` and `/apps/setup/OBJECT/data` (and the legacy `/apps/setup/system/users`, which forwards onto the first) now wait on the Setup app's access verdict, the way Setup's root, metadata, settings and marketplace routes already did. A member the server refuses the Setup app sees the access-denied screen there, as on `/apps/com.objectstack.setup/OBJECT`; before, they saw the object list under the default app's header and sidebar while the address bar read `setup`. The server's data reads are unchanged, and so is everything an admitted caller sees. Record pages under the Setup segment (`/apps/setup/OBJECT/record/ID`, the address the approvals inbox links to) stay reachable as before.
fix(spec): a connector read serves only the keys `retryConfig` and each `actions` element declare, and a save of the served form keeps the rest
8
+
9
+
Clause-②: no
10
+
Metadata-protocol: none
11
+
12
+
The built-in `connector` read-path redactor now serves, inside `retryConfig` and inside each element of `actions`, only the keys those shapes declare. Every metadata read exit that serves a stored connector applies it. Each withheld position is named in `redactedKeys` (an `actions` element by its index), and the stored row is never changed. A `retryConfig` that is not an object, and an `actions` that is not an array or holds an element that is not an object, are withheld whole (a cleared form excepted).
13
+
14
+
A save of the served form keeps every withheld nested value: the save door carries each one forward from the stored row. An `actions` element is followed by its `key`, so a reordered list keeps each element's value on that element; for every carried-forward position, an array element with no `id` is now identified by its `key`. A `retryConfig` or an `actions` element the author removes is removed.
15
+
16
+
`MetadataManager.getPublished` now hands the type's redactor the authored document alone and serves the metadata layer's own scalar bookkeeping beside the answer unchanged (`packageId`, `state`, and the publish keys). A publish snapshot nested under `publishedDefinition` (a package published more than once) is served through the same redaction at every depth; any other bookkeeping value that is not a scalar is not served.
fix(app-shell): a read-only flow node inspector says why its controls are disabled, on hover, on keyboard focus and to assistive tech
6
+
7
+
Clause-②: yes (widening)
8
+
Metadata-protocol: none
9
+
10
+
On a read-only package, Studio's flow node inspector disabled every control (ID, Label, Node Type, the config fields, Remove node) and gave no reason anywhere: no tooltip, no accessible description, and Tab skipped the whole panel. The inspector body now carries the treatment Studio's field rail and validation-rule editor carry: it is a tab stop described by the reason, and hovering any disabled control in it shows the reason in a tooltip.
11
+
12
+
The reason is the host's to give, because the inspector is shared by hosts whose read-only causes differ. `MetadataInspectorProps` gains an optional `readOnlyReason?: string`; an inspector that honours it draws the reason while `readOnly` is true. Studio's Automations pillar passes the read-only package sentence. A host that passes nothing renders exactly as before.
|**category**|`never`| optional |[REMOVED]`email_template.category` was removed in @objectstack/spec 18 (ADR-0049 enforce-or-remove) — nothing read it: the Studio listing never offered the filter facet it promised, and delivery never depended on it. Delete the key. A template is found by its `name`, so group templates with a dotted namespace prefix instead (`auth.password_reset`, `crm.welcome`). Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. |
51
-
|**locale**|`string`| optional (default: `"en-US"`) | BCP-47 locale (e.g. en-US, zh-CN) — the bundle key the resolver matches EXACTLY. A call that NAMES a locale gets exactly one retry rung, the literal `en-US`, with no language-subtag folding: `en` and `en-US` are different ROWS of one bundle and neither reaches the other, so a bundle with no `en-US` row has no fallback floor for those calls and every recipient locale it does not carry a row for raises TEMPLATE_NOT_FOUND, which is permanent — the delivery dead-letters with no retry. A call naming NO locale is the other case and does not dead-letter: it drops to the bundle's lowest locale tag and renders that silently. Your stack's own `i18n.defaultLocale` is the wrong tag here unless it is spelled `en-US`. |
51
+
| **locale** | `string` | optional (default: `"en-US"`) | BCP-47 locale (e.g. en-US, zh-CN) — the bundle key. Each rung of the resolver reads one row at one tag exactly, so `en` and `en-US` are different ROWS of one bundle. A call that NAMES a locale, over the built-in template loader, folds it against the bundle's tags (exact, case-insensitive, base language, then variant expansion: `en-GB` reaches `en`, `zh-TW` reaches `zh-CN`), then folds the stack's declared fallback locale (`i18n.fallbackLocale`, else `defaultLocale`) the same way, then tries the literal `en-US`; a replacement template loader matches the tag exactly and retries only `en-US`. `en-US` is the floor every loader honours: when no rung lands on a row the call raises TEMPLATE_NOT_FOUND, which is permanent — the delivery dead-letters with no retry. A call naming NO locale folds nothing and does not dead-letter: it starts at `en-US` and otherwise drops to the bundle's lowest locale tag and renders that silently. Tag the English row `en-US` so every loader has the floor. |
52
52
|**subject**|`string`| ✅ | Subject template. Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over the send's `data`, with at most one formatter per hole (a second, chained formatter is refused). A formatter is one word, optionally followed by `:` and its argument (text that is not, such as `date-long`, is refused), and it is one the template engine knows (an unknown name, such as a misspelled `curency`, is refused, naming the known formatters). A `currency` argument is either a literal ISO 4217 code in three capital letters (`currency:EUR`) or, in a mail template only, `@` followed by a path into the send's data whose value is such a code (`currency:@currency_code`). |
53
53
|**bodyHtml**|`string`| ✅ | HTML body template. Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over the send's `data`, with at most one formatter per hole (a second, chained formatter is refused). A formatter is one word, optionally followed by `:` and its argument (text that is not, such as `date-long`, is refused), and it is one the template engine knows (an unknown name, such as a misspelled `curency`, is refused, naming the known formatters). A `currency` argument is either a literal ISO 4217 code in three capital letters (`currency:EUR`) or, in a mail template only, `@` followed by a path into the send's data whose value is such a code (`currency:@currency_code`). |
54
54
|**bodyText**|`string`| optional | Plain-text body template (auto-derived from HTML when omitted). Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over the send's `data`, with at most one formatter per hole (a second, chained formatter is refused). A formatter is one word, optionally followed by `:` and its argument (text that is not, such as `date-long`, is refused), and it is one the template engine knows (an unknown name, such as a misspelled `curency`, is refused, naming the known formatters). A `currency` argument is either a literal ISO 4217 code in three capital letters (`currency:EUR`) or, in a mail template only, `@` followed by a path into the send's data whose value is such a code (`currency:@currency_code`). |
0 commit comments