Skip to content

Commit 75dcf73

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-hictiz
2 parents ceeec02 + 529ed7d commit 75dcf73

79 files changed

Lines changed: 4574 additions & 990 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: 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.

‎.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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
feat(spec): `IAutomationService.dryRun`, a dry run of a flow definition that need not be published: once, unarmed, as a named user, against a supplied start, without changing live data (#33757)
6+
7+
Clause-②: yes (widening) — a new optional member on `IAutomationService` and new exported types. No existing member, type or code changes, and an implementation without the member still satisfies the contract.
8+
Metadata-protocol: none
9+
10+
The contract half of #33661 (objectstack-ai/cloud#3309 item 5, option A, ruled by the account owner); #33661 implements it in `@objectstack/service-automation` and `@objectstack/runtime`. The method's doc block states the semantics the implementation owes:
11+
12+
- **Writes are simulated, never made.** `create_record`, `update_record` and `delete_record` report the write they would make (object, operation, target rows, values as computed) and a three-way `permission`: an insert or update answers `allowed` or `refused` from the object-level write check, a delete answers `not_judged`, and every write answers `not_judged` when no object-level check is installed; `not_judged` never means allowed, and row-level refusals are never reported. A create binds an opaque placeholder id that later reads by id see, holding only the fields the flow set; an updated row reads as the live row with the simulated fields laid over it. No hook, trigger, other flow or audit row runs, since nothing is written.
13+
- **Identity is the named user**, whose own grants the engine resolves, and the run is never elevated, a `runAs: 'system'` definition included. A `tenantId` must be an organization the user is a member of. Admission is the by-name start rule (`flowStartRefusal`), judged on the supplied definition against the named user; a refusal answers `status: 'refused'` with `PERMISSION_DENIED`, before any node runs.
14+
- **A start condition that does not hold** answers `status: 'condition_not_met'` with the condition, mirroring the live run's skip exit. One whose evaluation throws answers `status: 'failed'` with no steps, the condition and the thrown message in `startCondition`, as the live run's catch does on the default error strategy; under `errorHandling.strategy: 'retry'` the live run's retry attempts do not evaluate the start condition (#33935), so there the dry run's answer is its own. Both answer before the node input-schema check.
15+
- **Approval nodes and waits stop the run** (every node type whose descriptor declares `supportsPause: true`), reported with who would be asked, what would resume it, the screen, or the flow it would start. Nothing is created or scheduled.
16+
- **Side effects outside the data** (`notify`, `http`, `connector_action`, `script`, `save_notice`) are never sent, only reported with their computed payload.
17+
- **Unarmed and unregistered**: never registered or listed, the trigger never armed, no run persisted, one pass with no retry. An invalid definition throws what `registerFlow` throws.
18+
19+
**In-process APIs.** `@objectstack/spec/contracts` exports `FlowDryRunOptions`, `FlowDryRunResult`, `FlowDryRunStatus`, `FlowDryRunRefusalCode`, `FlowDryRunWritePermission`, `FlowDryRunStep` and the step types it unions over (`FlowDryRunStepBase`, `FlowDryRunRouteStep`, `FlowDryRunAssignmentStep`, `FlowDryRunDecisionStep`, `FlowDryRunReadStep`, `FlowDryRunWriteStep`, `FlowDryRunOutboundStep`, `FlowDryRunStopStep`). All additive.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
Clause-②: no
7+
Metadata-protocol: none
8+
9+
Setup → Invitations no longer offers **Resend Invitation** on a cloud-managed environment. A resend is a call to invite-member, which a cloud-managed environment refuses with `409 RESOURCE_CONFLICT`, so the action now carries the same `features.cloudManaged != true` gate as the four Invite User mirrors and Copy Invite Link, and is booked in `PUBLIC_AUTH_FEATURES.cloudManaged.gatedInputs`. Off a managed environment it is offered exactly as before.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(platform-objects): Setup → Users offers Ban User and Unban User on environments without the better-auth admin plugin
7+
8+
Clause-②: no — offering an existing action in more kernels widens no accepted input set or public export; the dev measures the gaining kernels and the seat amends if the diff reads otherwise
9+
Metadata-protocol: none
10+
11+
`sys_user.ban_user` and `sys_user.unban_user` no longer carry `requiresFeature: 'admin'`. Their doors, `POST /api/v1/auth/admin/ban-user` and `POST /api/v1/auth/admin/unban-user`, already work without the better-auth admin plugin: the ban is written through the data engine and the banned person's next session is refused with `403 BANNED_USER`. The two actions were still hidden wherever `features.admin` is off, so a platform administrator could not deactivate or reactivate a person from the console there.
12+
13+
They are now offered on every environment that runs without the admin plugin, self-hosted and cloud-managed alike, to a platform administrator only, and still one at a time by the row's `banned` state. Nothing else changes: `requiredPermissions` and the predicates stay as they were, environments with the admin plugin (or SCIM, which turns it on) see no difference, and `unlock_user`, `create_user`, `set_user_password` and `impersonate_user` keep their admin-plugin gate.
14+
15+
`PUBLIC_AUTH_FEATURES.admin.gatedInputs` in `@objectstack/spec/kernel` no longer lists `sys_user.actions.ban_user` and `sys_user.actions.unban_user`, since neither is gated on that flag any more.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
fix(scenarios): a card that keeps to working days stays on working days on every run date
6+
7+
Clause-②: yes (widening) — new optional key `ScenarioCardSchema.workingDays` (`.`)
8+
Metadata-protocol: none
9+
10+
A scenario card can declare `workingDays: true`. The run-date rebase then moves its `asOf` onto the run
11+
date and every other date by whole working days instead of whole days, so a Monday-to-Friday leave day,
12+
and the weekday an ask names, stays on a working day however far from `asOf` the card runs (a weekend run
13+
date moves them as for the Friday before it). The loader refuses such a card when its `asOf` or any other date
14+
it holds falls on a weekend, or it has no `asOf`. The `leave_balances` card declares it, so its request days,
15+
balances and truths keep their meaning on every run date.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-list': patch
3+
---
4+
5+
fix(plugin-list): on a phone the list toolbar keeps the view name readable
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Below `sm`, the Console draws the list's view switcher at the start of the list toolbar (`toolbarLeading`). On one line with the filter chips, the 「In a queue」 toggle and the tool icons (44 px touch targets on a phone), the view name was cut to about one character: 「全部客户」 showed as 「全.」 at 375 px. With a leading node, the toolbar row now wraps below `sm`. The name keeps the row's width, and the chips, the toggle and the tools move to a second line when they no longer fit beside it, with the tools at the right edge. A name wider than the row ends in an ellipsis. Nothing scrolls the page sideways. From `sm` up, and in a list without a leading node, the toolbar is unchanged.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
fix(service-automation): a catalog connector descriptor saved active through `PUT /api/v1/meta/connector/:name` now gets the inert-connector warning at once
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The warning `[Automation] N declarative connector(s) declare actions but are not registered …` used to run only at boot and on `metadata:reloaded`. A direct active save raises neither, so a descriptor with actions and no runtime connector behind it stayed unreported until a later publish or a restart. The audit now also runs after the connector reconcile that a connector metadata change queues, so the save door reports it.
11+
12+
The warning is now printed when the set of inert descriptors changes, and it still names the whole set. A publish raises both the mutation signal and `metadata:reloaded`, and it still prints the warning once. A reload or save that leaves the set as it was prints nothing new. Before, every reload repeated the warning.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): `revertCommit` reports an item of any type whose registry write-through or heal faults
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`revertCommit` now puts a restored `view`, `permission`, `object_extension` or other non-object item into `failed[]` when the runtime registry write-through for its restored body throws, and the answer's `success` is `false`. The entry names the row state ("its row was restored to the body of version N") beside the registry's reason, and carries the reason's `code` where it declares one, the same way a refused `object` has been reported since the previous change to this door. Before, the write-through's non-object branches (the overlay hydration, and the `object_extension` registration) only logged the fault at `warn`, so such a revert answered `success: true` with the item in `reverted[]`, while the process kept serving the body the revert replaced. `rollbackToPackageCommit` carries each such item into its own `failed[]` and answers `success: false`.
11+
12+
A removed item is reported the same way. When the revert soft-removes an item the reverted commit created and the registry heal after the removal stops (a registry throw, or the registry refusing a row of the item still stored under another package), the item goes into `failed[]` naming "its row was removed from sys_metadata" and that the registry may still serve the removed row, with the reason and its `code`. Before, the heal's stop was only an `error` line in the server log, and the item answered `removed`. The `error` line is unchanged.
13+
14+
This supersedes the sentence of the note on the previous change to this door that says a write-through fault of every type other than `object` "is still not seen by the revert": after this change, the revert sees it, and a stopped heal too.
15+
16+
Save, publish and delete do not change. Save and publish do not ask the write-through for these faults: under the same fault, `saveMetaItem` and `publishMetaItem` of a non-object item still answer success with no advisory, and the fault is still the same `warn` line in the server log. `deleteMetaItem`, a publish's undo and a peer's convergence ignore the heal's answer, so a stopped heal still answers what it answered before there, with the same `error` line.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-grid': patch
3+
---
4+
5+
fix(plugin-grid): Tab leaves the import wizard's "Save current" reason again
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
In the import wizard's mapping step with no column mapped, "Save current" is disabled and a focusable wrapper around it gives the reason in a tooltip. Pressing Tab on that wrapper sent focus to the dialog itself, and the next Tab started over at the template select: a keyboard user could not reach the column-mapping selects, Next, Cancel, Back or Close, and could leave only with Escape. The tooltip's content was mounted inside the dialog and unmounted as the wrapper lost focus; the dialog's focus trap read that removal as the focused element disappearing and pulled focus to the dialog. The tooltip now renders outside the dialog, so Tab and Shift+Tab walk every control in order and the reason is still read out when the wrapper is focused.

0 commit comments

Comments
 (0)