Skip to content

Commit 9dd398c

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/area-E1-32622
2 parents e57e7c0 + 27c2f1e commit 9dd398c

268 files changed

Lines changed: 14095 additions & 1480 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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): a bare save of a name an enabled and a disabled package both hold writes the enabled holder's row, where the bare read serves it
6+
7+
Clause-②: yes (widening) — a bare save of a name an enabled and a disabled package both hold, refused 409 naming both when each held a stored row, now writes the enabled holder's row; nothing the save door accepted is refused
8+
Metadata-protocol: none
9+
10+
A save that names no package (`PUT /meta/:type/:name` with no `?package=`, or `saveMetaItem` with no `packageId`) now resolves its address the way the read at the same address does (ADR-0150 D3/D5). A disabled package holds nothing an address reaches. Before this fix the save door still counted a disabled package as a holder of the name. So when an enabled package E and a disabled package D both held the name, the save could:
11+
12+
- write a new package-unbound row, an environment-own item that shadows both packages once D is enabled again;
13+
- update D's row silently, so the next read kept serving E's item and the edit never showed;
14+
- refuse 409 naming D, while the read served E without ambiguity.
15+
16+
The bare save of such a name is now E's write (ADR-0150 D4). It writes E's row, D's row stays byte-unchanged, and D is never named. When two or more enabled packages hold the name beside the disabled one, the save refuses 409 and names only the enabled ones. When a package-unbound row already stands in for the item, the save edits that row, which is the one the read serves. Once D is enabled again, the bare read and the bare save both answer 409 naming both packages. A name no disabled package holds saves exactly as before. So does a name only disabled packages hold.
17+
18+
What moves, for a bare save of a name held by an enabled package E and a disabled package D:
19+
20+
- FROM D's row silently updated TO E's row written, D's row unchanged.
21+
- FROM a package-unbound row written TO a row bound to E.
22+
- FROM 409 naming E and D TO E's row updated (a widening: the save now writes where it refused).
23+
24+
Nothing to migrate. To edit D's own row while D is disabled, name it: `?package=` on the REST door, `packageId` in process.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/runtime': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(runtime): a channel list with a member off the declared shape is not judged at the automation save doors, so it no longer refuses every channel
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The `/automation` write doors (`POST /api/v1/automation`, `PUT /api/v1/automation/NAME`, `POST /api/v1/automation/NAME/clone`) read the messaging service's `getKnownChannels()` to refuse a `notify` node naming a channel nothing registers. A reader that throws or answers no list was already not judged. A list whose members were not all `{ id: string }` (the declared shape) had those members dropped instead, so a reader answering bare channel ids left an empty roster and every named channel was refused `400 VALIDATION_FAILED`. Such a list is now an unreadable registry like the other two: not judged, and the save goes on as it did before the check existed. No first-party messaging service answers that shape; `MessagingService.getKnownChannels()` answers the declared one, and a flow naming an unknown channel on it is refused exactly as before.
12+
13+
The `notify-channel-unknown-refused` entry `os migrate meta` prints now lists every not-judged case the doors have (a save before `kernel:ready` has settled, and an unreadable channel reader, beside the four it named) and the paths a refusal names (`nodes.N.config.channels`, `nodes.N.config.channels.M` for a list member, a longer path inside a region body). Data text only.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
---
4+
5+
fix(plugin-security): the catalog reference boot report names a refused grant's candidates and the reviewed bind, and a refused audience-binding suggestion's fix follows its package column
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The catalog reference boot report listed a grant naming no package, of a permission-set name two packages hold, as a grant naming a set the catalog does not resolve, with no candidates and the fix "declare the permission set again", which changes nothing. Such a grant is now listed on the same line with the resolver's refusal (`refusals` in the line's meta: the grant, the package its column names, the reason and every candidate), and the line's fix names `os migrate stored-references bind --table sys_user_permission_set --id ID --package PACKAGE` for a refused grant naming no package, and, for one that already names a package, to grant the candidate meant again naming its package and then remove the listed grant. The position half of the report already named its refusals and candidates.
11+
12+
A suggestion refused for a `permission_set_package` column that already names a package (a package that no longer serves the set) no longer offers `os migrate stored-references bind`, which writes only a column naming no package. Its refusal now names the package and the fix that applies: install or enable that package again if its set is the one meant, or dismiss the suggestion. A suggestion whose column names no package keeps the bind.
13+
14+
No grant or suggestion confers more or less: only the report's lines and the refusal's text move.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/runtime': patch
3+
---
4+
5+
fix(runtime): an addressed `/automation/:ns/:name/(runs|trigger)` route under a verb it does not serve answers the automation domain, as its bare path does
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On the standalone server (the dispatcher plugin on an HTTP adapter), an address is served exactly as its bare path (ADR-0150 D5), but a verb the route is not served under was answered differently on the two. `DELETE /api/v1/automation/send_digest/runs` answered the automation domain's `405` with `Allow: GET` in the dispatcher's envelope, and `401 UNAUTHENTICATED` to an anonymous caller. `DELETE /api/v1/automation/crm/send_digest/runs` answered the transport's `405` with `Allow: GET, HEAD` and an `error.details` envelope, to an anonymous caller too. The same held for `POST` / `PUT` on the addressed `/runs`, `GET` on `/automation/NS/NAME/trigger` and `GET` on `/automation/trigger/NS/NAME`.
11+
12+
The dispatcher now declares those three addressed shapes as routes whose domain decides every verb, as it already did for their bare two-segment shapes. Each of them answers an anonymous caller `401`, and a signed-in caller the domain's `405` with the verbs the route serves (`Allow: GET` for `/runs`, `Allow: POST` for both triggers) in the dispatcher's envelope. A served verb on an address (`GET .../runs`, `POST .../trigger`) is unchanged, and so is a three-segment path whose first segment is no installed namespace: under an unserved verb it now answers the dispatcher's `404 ROUTE_NOT_FOUND`, as the same path does under `GET`.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
'@objectstack/platform-objects': patch
4+
'@objectstack/lint': patch
5+
---
6+
7+
fix(plugin-auth): Set Manager refuses only a person a SCIM directory holds, so an admin can change the manager of someone who signs in through SSO
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
`POST /api/v1/auth/admin/set-user-manager` refused every user whose `sys_user.source` is `idp_provisioned` with `403 PERMISSION_DENIED`, saying a directory owns their manager. ADR-0135 D4 stamps that value on every sign-in through an identity provider by a person with no local password: the platform's own SSO on a hosted environment, and any social or enterprise OIDC provider. Those people have no directory behind them. So after their first sign-in, nobody could change their manager, and approvals routed to the manager could not follow a reorganisation.
13+
14+
The endpoint now refuses only a person a SCIM directory holds: `source` is `idp_provisioned` and a SCIM connection has provisioned or linked them (a `sys_scim_subject` row). The answer is unchanged for them (`403 PERMISSION_DENIED`, `details.reason: 'idp_provisioned'`), and its message says to change the manager in the directory. Everyone else gets the answer a local user gets. The admin user import's `manager_id` column runs the same check, so an SSO-only row's manager link now lands. The self-assignment, cycle, depth and cross-organization refusals are unchanged. Nothing that was accepted before is refused now.
15+
16+
`sys_user`'s **Set Manager** action is now offered to a platform admin on every user row. It used to be hidden on `idp_provisioned` rows. A SCIM-held row is refused by the endpoint, which names the directory.
17+
18+
`os explain approval-approvers-may-resolve-empty` now says the admin operation refuses an identity a SCIM directory holds, and that an identity that only signs in through SSO is set like any other.
19+
20+
The `idp_provisioned` stamp itself (ADR-0135 D4) and the password refusals are unchanged.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(auth)!: a cloud-managed environment sets no local password for anyone, a platform administrator included
6+
7+
Clause-②: yes (narrowing) — narrowed: on a cloud-managed environment only (`OS_CLOUD_MANAGED=1`), `POST /admin/set-user-password` now answers `409 RESOURCE_CONFLICT` for an `env_native` target too, where it set the password, and `POST /set-initial-password` now answers `409 RESOURCE_CONFLICT` to a signed-in platform administrator too, where it set their first local password; `POST /reset-password` and `POST /phone-number/reset-password` now answer `409 RESOURCE_CONFLICT` to every request, where a valid token or code set (or created) the password, and `POST /request-password-reset` and `POST /phone-number/request-password-reset` answer `409 RESOURCE_CONFLICT` too, where they answered success and sent a link or code. Two refusal sentences are added (`CLOUD_MANAGED_REFUSAL_MESSAGES.resetPassword` and `.requestPasswordReset`). The two existing ones (`.setUserPassword` and `.setInitialPassword`) no longer promise a local or break-glass password. The managed `set-user-password` arm no longer reads the target's identity source, so its `503 SERVICE_UNAVAILABLE` answer for an unreadable source is gone on a managed environment.
8+
Metadata-protocol: none
9+
Skills-docs: none — no skill under `skills/**` teaches the cloud-managed password doors; `content/docs/permissions/authentication.mdx` gains the rule in this change.
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed, renamed or re-shaped. The moved answers are runtime refusals at six auth doors under a deployment switch that only hosted environments set, so there is nothing stored for a migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** for a cloud-managed environment (`OS_CLOUD_MANAGED=1`, set only on hosted containers): a hosted environment sets no local password for anyone and has no local break-glass administrator. `POST /admin/set-user-password` (the Set Password action on a user) refuses every target, an environment-native account included; `POST /set-initial-password` refuses every signed-in caller, a platform administrator included; and the self-service reset doors (`POST /reset-password`, `POST /phone-number/reset-password`, and `POST /request-password-reset`, `POST /phone-number/request-password-reset`, which send the link or code) refuse every request. Each answers `409 RESOURCE_CONFLICT` and writes nothing. A caller with no session at `set-initial-password` is answered as before.
14+
15+
Unchanged: every self-hosted deployment (the variable unset), where the doors answer as before, SSO-only mode's rules included; and a local password a user already holds on a managed environment (invalidating those is the hosting cloud's work).
16+
17+
What to do: nothing on a self-hosted deployment. On a hosted environment, sign in through the hosting organisation's identity provider; there is no local password to set.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): the by-name read of an action grafts a package's artifact envelope only onto the item that package holds at its own `(object, name)`, so the environment's own action on another object is served as the environment's (#33456)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
ADR-0150 D4 keys an action by `(package, object, name)`. The by-name read (`getMetaItem`, `getMetaItemForExecution`) looked the served item's artifact envelope up by name alone, so beside ONE package that binds an action name to one object, the environment's own package-less action of that name bound to another object (or object-less) was served carrying that package's `_packageId`, `_packageVersion` and `_provenance: 'package'`.
11+
12+
What moves, with ALPHA and BETA two packages and `approve` the action name:
13+
14+
- ALPHA binds `approve` to `account`, the environment's own row binds it to `contact` (or BETA binds it to `contact` alone and the row binds it to `account`): `GET /api/v1/meta/action/approve` on `RestServer` and the runtime dispatcher, `getMetaItemForExecution`, and the declaration `/actions/contact/approve` (`/actions/account/approve` in the second shape) judges, serve the environment's item with no package envelope, FROM the holder's `_packageId` and `_provenance: 'package'`. The route's `packageId` stays unset and the environment's handler runs, as before.
15+
- The same with the row object-less beside ALPHA on `account`, or bound to `account` beside ALPHA object-less: no package envelope, FROM ALPHA's.
16+
17+
Not changed: a package-less row on the object a package binds the name to (that package's customization, still under its envelope); a name two packages hold on one object (refused, naming both); a name one package holds with no package-less row; a read naming a package (`?package=`), which keeps that package's own item and envelope; every type other than `action`; stored rows (no migration).
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/plugin-security': patch
4+
---
5+
6+
fix(plugin-security, spec): the master-detail write refusal tells its user which master record needs their access, in their language
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
A write of a `controlled_by_parent` detail (create, edit, delete and the other write verbs) refused because the caller lacks edit access on its master record (or read access, on a detail that declares `writeRequiresMasterRead`) now carries a `userMessage`. It names the master object's label: the deployment's translation in the caller's language, else the declared label. The caller's language is the request locale, else the workspace default, else English. The console shows a refusal's `userMessage` in place of its generic "You don't have permission to save this record.", so a user creating a billing milestone under a contract they can read but not edit now reads that the missing access is on the contract.
12+
13+
The sentences are new keys in the operation-message catalog (en, zh-CN, ja-JP, es-ES): `errors.master_record_edit_denied` and `errors.master_record_read_denied`, with `{{master}}`, and their `_opaque` forms, which name no master. The opaque forms answer a writer who cannot read the master reference (the refusal names no master to them) and a master object with no label. A deployment overrides any of the four with a `translation` item under that key.
14+
15+
The HTTP status, `code`, `message` and `details` of the refusal are unchanged; only `userMessage` is added. The owner-rule refusal of a row whose optional master is empty is unchanged and carries no `userMessage`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
---
4+
5+
fix(platform-objects): the Sessions page subtitle no longer says "active" on the revoked view
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`sys_session`'s object description was "Active user sessions", and the console draws an object's description as the subtitle of every list view, so Setup → Sessions → Revoked (the audit view of ended sessions) was titled as active sessions. The description is now the neutral "User sessions", in the source and in all eleven locale bundles. No key, field, view or action changes; the toolbar's "Sign out other devices" action is unchanged and still shows on every session view.

‎.changeset/33563-revert-commit-honest-outcome.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Metadata-protocol: none
99

1010
`revertCommit` now reports an item whose row was written but whose next step did not land in `failed[]`, not `reverted[]`, and the answer's `success` is `false`. The steps are: the runtime registry refusing the restored object, its storage not following the restored body (the `object-storage-sync-refused` advisory stays on `advisories`), the mutation projector failing, and any step after the row write throwing. The entry names the row state ("its row was restored to the body of version N", or "its row was removed from sys_metadata") beside the step that failed, and quotes no driver text. The revert's own commit still records the row change. Before, each of these answered `success: true` with the item in `reverted[]`, against the method's own contract ("a revert that answers `success: true` is one the running process has already acted on"). `rollbackToPackageCommit` carries each such item into its own `failed[]` and answers `success: false`.
1111

12-
A write-through fault the registry helper only logs (every metadata type other than `object`) is still not seen by the revert.
12+
The same holds for an item of any other metadata type: a restored item whose registry write-through throws, and a removed item whose registry heal stops, so that the registry may still serve the removed row.
1313

1414
A revert is now itself revertible, as ADR-0067 D3 says. The revert's own commit records, for each row it changed, the version that row held before the revert, so reverting the revert brings that body back, and an item the revert removed is written again. An item recorded as existing before the commit but carrying no version to restore, which is how every revert commit recorded by an earlier release records the items it restored, is named in `failed[]` with nothing written. Before, it was skipped: it appeared in neither `reverted[]` nor `failed[]`. To undo such an older revert, restore each item from its own version history (`GET /api/v1/meta/:type/:name/history`, then `POST /api/v1/meta/:type/:name/rollback`).
1515

0 commit comments

Comments
 (0)