Skip to content

Commit fc24941

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-l9edg2
2 parents 48c3a64 + dedc350 commit fc24941

161 files changed

Lines changed: 7734 additions & 2175 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
'@objectstack/metadata-protocol': minor
3+
'@objectstack/spec': patch
4+
'@objectstack/skills': patch
5+
'@object-ui/app-shell': patch
6+
---
7+
8+
fix(metadata-protocol)!: a write naming no package onto an installed package's view, dashboard, report, translation or email template is refused where `os migrate packageless-overlays` can move its row, naming the base's `.custom` pair and the command
9+
10+
Clause-②: yes (narrowing) — the metadata save, publish, delete and rollback doors refuse a write that names no package onto an item of the five overlay types that one installed read-only package ships, where the ceremony would classify the row (or the first write's body) `movable` and its move can succeed; they accepted it before as a package-unbound Setup row. Every row the ceremony lists and does not move keeps that write. One write is widened: a rollback of the `.custom` pair's own declared row of an item its base ships (#28644 item 1) is judged as the pair's declared override, where the store sealed it as an artifact override before, on every type the pair can override (a page or flow pair row included).
11+
12+
Metadata-protocol: narrowed (the `allowEnvironmentOverlay` flag of `view`, `dashboard`, `report`, `translation` and `email_template` no longer opens a package-less write onto a packaged item the ceremony can move; it stays the predicate the migration ceremony, the read of an unmigrated row and every row the ceremony leaves use)
13+
14+
Skills-docs: updated here — `skills/objectstack-platform/SKILL.md`'s ADR-0146 paragraph said "a package-unbound Setup row still wins over the base's until D11"; it now says such a row from before D11 wins over the base's until `os migrate packageless-overlays` moves it, and that its package-less save, reset and rollback are refused once the command can move it. To stay under the bundle's token ceiling, the same paragraph drops "the base's is unchanged" after the export sentence (which "replaces the base's document whole" already implies) and the aside that the other overridable types wait for their doors (the sentence already names the six types the read honours today).
15+
16+
<!-- adr-0087: registered packageless-overlay-write-closed -->
17+
18+
**BREAKING** write narrowing at the metadata doors (`@objectstack/metadata-protocol`), shipped as `minor` during the launch window.
19+
20+
**Upgrade, then run the ceremony.** The command ships in this release. On each deployment with Setup customizations of a package's items, upgrade, run `os migrate packageless-overlays` (preview) with the flags and environment the deployment boots with (`--preset` and `--dev` mean what they mean to `os serve`), then `os migrate packageless-overlays --apply`. Nothing breaks at the upgrade: between the upgrade and `--apply`, every customization is served as before, and the package-less save, reset, publish and rollback of one the command can move are refused, naming the command. Done when the preview lists no movable row.
21+
22+
The preview lists five dispositions; only `movable` rows are moved, and every other row keeps its package-less write:
23+
24+
- `movable`: `--apply` moves it into the pair. A move that ends `failed` keeps the row as it was; fix what the error names and re-run. When the error names the pair (it cannot be ensured, or it refuses the row) or the base's missing version, the row also keeps its package-less write and may be left.
25+
- `multi_shipped` (several packages ship the name): delete it naming no package, then save it into the pair of the package it customizes if it is still wanted (the pair's override is then served at that base's address, `?package=<base>`; a read naming no package is not pinned to it while several packages ship the name).
26+
- `no_pair` (the base's id forms no pair): nothing to do.
27+
- `foreign_declaration` (its `overrides` names another package): remove the key with a save naming no package, then re-run: the move declares the right override. (A package-less save that keeps a corrected `overrides` is refused by the override write gate.)
28+
- `shadowed` (the pair already holds the item; the pair's row is served when it declares the override, otherwise this row still is): nothing to do to keep the pair's declared override; or restore the package original (`DELETE …?package=<base>.custom`) and re-run to move this one.
29+
30+
### Migration: FROM → TO
31+
32+
FROM, a customization of the installed package `com.acme.crm`'s view written with no package:
33+
34+
```http
35+
PUT /api/v1/meta/view/account_list
36+
{ "name": "account_list", "label": "My accounts" }
37+
```
38+
39+
TO, the same customization written into the base's paired `.custom`, declaring what it overrides:
40+
41+
```http
42+
PUT /api/v1/meta/view/account_list?package=com.acme.crm.custom
43+
{ "name": "account_list", "label": "My accounts", "overrides": { "package": "com.acme.crm", "basedOn": "1.4.0" } }
44+
```
45+
46+
To restore the package original, FROM `DELETE /api/v1/meta/view/account_list` TO `DELETE /api/v1/meta/view/account_list?package=com.acme.crm.custom`. `basedOn` is the base's installed `manifest.version`. The pair is created by `os migrate packageless-overlays --apply`, or by Studio's Customize.
47+
48+
- **Now refused.** A save (draft or publish mode), a publish, a delete of the active item, or a rollback whose restored row is package-less, with no `?package=` (or an empty one), of a `view`, `dashboard`, `report`, `translation` or `email_template` that exactly one installed read-only package ships, where the item's stored package-less row in that state (or, with none, the saved body) is one the ceremony classifies `movable`, the pair can be ensured (the base has a namespace and a SemVer version), and the override write gate admits that row into the pair. This covers an unmigrated `movable` row, and the first package-less write of an item the pair already holds (a moved one). Each answers `403 NOT_OVERRIDABLE`, writes nothing, and its message names the item, the shipping package, the pair (`?package=<base>.custom`), the `overrides` declaration and `os migrate packageless-overlays`; a rollback's message says to save a version from before the move into the pair, declaring it. The metadata item page shows that message as sent when its URL holds no `?package=`. The refusal comes before every gate that reads a stored row's lock, so it is the same with or without `overrides` in the body.
49+
- **Still open.** Every write naming `?package=<base>.custom` (the pair's save, publish, delete and rollback, judged by the override write gate as before); a rollback of the pair's own declared row, which is judged as the pair's override; a write of a name no installed package ships (environment metadata); and every package-less write the ceremony would not move, as before this release: a name several read-only packages ship (`multi_shipped`); a base whose id forms no pair (`no_pair`); a base whose pair cannot be ensured (no namespace, or a version that is not SemVer); a stored package-less row whose `overrides` names another package (`foreign_declaration`) or beside the pair's row of the item (`shadowed`; its package-less writes are addressed to the pair's row as before, so its package-less delete restores the package original); and an `email_template` locale the base does not ship (the pair refuses it, #28777; the ceremony's move of it is #28904). Discarding a draft stays open.
50+
- **Unchanged.** A package-less row stored before this release is still served exactly as before, by every read. The ceremony still moves it: it writes into the pair, never package-less.
51+
- **Studio.** The read-only item notice no longer links to the package-less Setup overlay (`@object-ui/app-shell`).
52+
- **Removed with it.** #28413's interim allowance, by which a package-less save that landed on a moved row kept that row's `overrides` block, is gone: such a save is refused like any other.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
"@objectstack/core": patch
3+
"@objectstack/objectql": patch
4+
"@objectstack/service-automation": patch
5+
---
6+
7+
fix(objectql)!: a `runAs: 'system'` flow's record writes keep the reference check while keeping their authorization elevation (#28881)
8+
9+
Clause-②: no (narrowing) — a `runAs: 'system'` flow's `create_record` / `update_record` (and any custom node writing through `resolveRunDataContext`) that names a lookup, user or master-detail id resolving to no row is refused, which it admitted before. Nothing is widened.
10+
Metadata-protocol: none
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped. The write-time reference check the user path already applies now also applies to an elevated flow's record writes, with the same reference_not_found refusal; the mark that keeps it on is an internal symbol on the run's context, not an authorable key, so there is nothing for a migration to rewrite and no tombstone. -->
13+
14+
**BREAKING** accept-set narrowing at an elevated flow's record writes (`@objectstack/objectql`, `@objectstack/service-automation`).
15+
16+
- **Before.** The write-time reference check returned early for every system context. A flow that runs as system writes with `isSystem: true`, so its `create_record` / `update_record` stored a reference to a deleted row with no error, while the same write on the user path was refused `reference_not_found`.
17+
- **Now.** `resolveRunDataContext` marks a system run's data context (`markFlowWriteReferenceCheck`, `@objectstack/core`: a symbol, in no schema, not authorable), and the check keeps checking a marked write. The refusal is the user path's own: `VALIDATION_FAILED` with the field's `reference_not_found` error, carried as the node's inner refusal.
18+
- **Unchanged.** The run's authorization elevation: it still writes rows other people own, past RLS and FLS, inside the trigger's organization. Every system writer outside a flow run keeps the exemption: seed replay, package install, boot provisioning, import under a system principal, restore and migration, the cascade and set-null legs of a delete no flow made, and a hook's or action body's writes when no flow-run write set them off.
19+
- **Writes a flow write sets off.** They carry the mark too and are checked as the flow's own, as on the user path: a hook's `ctx.api` (and its `runAs: 'system'` or `ctx.api.sudo()` elevation) under a flow's write, and the engine's cascade legs under a flow's delete. A cascade leg writes no new link, so only the value it writes is judged.
20+
- **Who sees it.** A system flow that writes an id naming no row in its organization, including the owner it stamps from its trigger user when that user has no `sys_user` row. A flow that wants to tolerate a missing target clears the field first. One case surfaces data that is already wrong: a flow's `delete_record` whose `set_null` cascade removes the deleted id from a `multiple: true` reference field rewrites the members that remain, so if one of them already names a row that is gone, the cascade write is refused `reference_not_found` and the delete fails. The same delete on the user path fails the same way; a multi-value field keeping a deleted id is tracked in #29062.
21+
22+
**The remedy.** Write an id that resolves, or leave the field empty.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
'@object-ui/components': patch
3+
'@object-ui/plugin-grid': patch
4+
'@object-ui/plugin-list': patch
5+
'@object-ui/i18n': patch
6+
'@object-ui/app-shell': patch
7+
---
8+
9+
feat(ui)!: a record opened from a list opens in the drawer by default, and the split pane beside the list retires
10+
11+
Clause-②: yes (narrowing)
12+
Metadata-protocol: none
13+
14+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/components#RECORD_SPLIT_MIN_CONTENT_PX, @object-ui/components#RecordListFaceProvider, @object-ui/components#useRecordListFace, @object-ui/components#recordListFaceFor, @object-ui/components#RECORD_LIST_CARD_FACE_BELOW_PX, @object-ui/components#RECORD_LIST_NARROW_COLUMN_COUNT, @object-ui/components#RecordListFace) the retired operands are a React context provider, a hook, a helper, two constants and a type of the split pane's narrowed list face, in a published ui package's entry; no packages/spec schema, no registered node type, no ADR-0087 conversion surface and no stored shape names them (the split mode already left `NavigationModeSchema`), so there is nothing for `objectstack migrate meta` to rewrite -->
15+
16+
**BREAKING** for a host that drew the split pane through `@object-ui/components`, read its narrowed list face, or passed the Display menu a `split` choice. The maintainer ruled 「默认改抽屉,分屏彻底退役,只留抽屉和整页」: a record opens in the drawer or as the full page, and the split pane is gone.
17+
18+
- **The Console.** A row click on a drawer-mode object opens the record in the non-modal drawer over the list, which keeps its full width and every view column. A click on another row swaps the record, ↑ ↓ step through the list, the drawer drags from 360 px to 60% of the window, and ⤢ maximizes it in place. A view that declares `navigation.mode: 'page'` and a phone still open the full page. No metadata changes: `navigation.mode` keeps its values.
19+
- **The reader's preference.** The Display menu's 「打开记录」 (Open records) offers Drawer and Full page only. The preference under `os:record-open-mode` is `drawer` or `page`; a stored `split` is an unknown value and reads as the default, the drawer, with no compatibility read.
20+
- **`@object-ui/components`.** `NavigationOverlay` draws the drawer for `mode: 'drawer'` and no longer has a `split` face: `NavigationOverlayMode` is `page | drawer | new_window | none`. Over a `mainContent` list the drawer is non-modal and undimmed, as before, and the list keeps its full width. The open-row store stays (`ActiveListRecordProvider`, `useIsActiveListRecord`, `ActiveListRow`, `useScrollActiveListRecordIntoView`, `listRecordIdOf`). The split pane's 「Close panel」 label is no longer drawn; the drawer's ✕ is 「Close」.
21+
- **`@object-ui/plugin-grid`.** The grid no longer narrows to three columns or to compact card rows beside a record pane; it draws every view column.
22+
- **`@object-ui/plugin-list`.** `ListView`'s record-count bar always prints its count. The `recordOpen` host prop offers two choices: its `preference` is `'drawer' | 'page'`, its `setPreference` takes either, and its `selectPage` member is gone (pass `setPreference('page')`).
23+
- **`@object-ui/i18n`.** `list.recordOpenSplit` leaves all ten packs.
24+
25+
What leaves, and what to write instead:
26+
27+
- FROM `RECORD_SPLIT_MIN_CONTENT_PX` TO nothing: the drawer has no width floor to fall back from.
28+
- FROM `RecordListFaceProvider` TO nothing: no list is narrowed any more, so there is no face to publish.
29+
- FROM `useRecordListFace` TO nothing: a list under the drawer draws its full face; read `useIsActiveListRecord` for the open row.
30+
- FROM `recordListFaceFor` TO nothing.
31+
- FROM `RECORD_LIST_CARD_FACE_BELOW_PX` TO nothing.
32+
- FROM `RECORD_LIST_NARROW_COLUMN_COUNT` TO nothing.
33+
- FROM `RecordListFace` TO nothing.
34+
35+
A host that passed `mode="split"` to `NavigationOverlay` passes `mode="drawer"` with the same `mainContent`. A host of the Display menu that passed `selectPage` drops it and lets `setPreference` receive `'page'`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/service-messaging': patch
3+
---
4+
5+
fix(service-messaging): a `sys_notification_template` read for a recipient locale with no row tries the stack's declared fallback locale before `en` (#28919)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`NotificationTemplateStore` walked the named tag, its primary subtag (`zh-CN` → `zh`), then `DEFAULT_LOCALE` (`en`), and never read the stack's declared `i18n.fallbackLocale` (else `defaultLocale`). The email template ladder reads it since #28880, so the two template families answered the same recipient differently. The ladder is now: the named tag, its primary subtag, the declared fallback (read from the i18n service's `getFallbackLocale` at each resolve, so a service registered later is seen) and its primary subtag, then `en`. The store holds no locale list, so it tries exact rows; it does not fold with `resolveBundleLocale`. A host with no i18n service, a store built outside this package, and a call that names no locale answer exactly as before. Every shipped example declares `fallbackLocale: 'en'`, so their ladder is unchanged. The published `NotificationTemplateStoreOptions` is unchanged: the composition hands the reader in under a module-private key.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
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.

0 commit comments

Comments
 (0)