Skip to content

Commit 52b05b8

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-f473q9
2 parents 300aafa + 7b1ae33 commit 52b05b8

47 files changed

Lines changed: 2372 additions & 138 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
'@objectstack/core': patch
4+
---
5+
6+
fix(plugin-security): a permission set holding View All / Modify All on an object reads and edits every field of it, so an app's field mask no longer hides fields from platform admins
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
An app permission set could not withhold a platform object's fields from its own members without withholding them from platform admins too. Field permissions merge most-permissively, but only sets that declare a field entry voted. `admin_full_access` grants every object through its `'*'` super-user bits and declares no field entries, so it cast no vote, and an app set's `readable: false` hid the field from any admin who also held the app set. Lists dropped the columns, sorting or filtering on them was refused 403, and Setup screens rendered them empty.
12+
13+
Now, per ADR-0066 D2 ⑧ as amended (ruling of record 6573563853), a set that holds the super-user bypass on an object votes on every field of that object in the field merge:
14+
15+
- **`viewAllRecords` votes `readable: true`.** It never grants an edit.
16+
- **`modifyAllRecords` votes `readable: true` and `editable: true`.**
17+
- **Who counts as holding it is the row-level answer.** It is the same rule `PermissionEvaluator.superuserBypassSets` applies: the set's own entry for the object if it has one, otherwise its `'*'` wildcard. The field merge and the row bypass now read it through one function, `holdsSuperuserBypass` (`@objectstack/core`).
18+
- **Every reader agrees.** That covers list projection, record read, the sort and filter gate, the field-level write gate, `GET /auth/me/permissions` (`fields`) and `POST /security/explain`.
19+
- **Union without deny is otherwise unchanged.** A caller who holds the app set and no super-user set on the object is still masked. A field's `requiredPermissions` capability gate still applies to everyone.
20+
21+
**What to check after upgrading.** A permission set that holds `viewAllRecords` or `modifyAllRecords` on an object and also declares `readable: false` (or `editable: false`) on that object's fields no longer hides those fields from its own holders. To keep a field from someone, grant them the object without View All / Modify All and withhold the field there.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
perf(app-shell): the app sidebar and recent rows label their items by name
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Two label readers still downloaded a whole metadata list to name one row:
11+
12+
- Inside an app, a navigation entry with no label of its own read the whole object registry (`GET /api/v1/meta/object`, with the `/meta/view` list it is composed with) on every page whose route had not loaded it: the sidebar named it, and so did the closed command palette, which names every entry to build its lists. Both now resolve labels with `useNavTargetLabel({ byName: true })`: the entry's object by name, which the app bundle answers, and a dashboard entry the bundle does not hold by name too.
13+
- A recent dashboard, page or report row (Home, the command palette, the sidebar's recent list) read its type's whole list. Each row now asks its own item through the provider's by-name read (`useReadItemsByName`, beside `readObjectsByName`).
14+
15+
Once something else has loaded a list, these readers read it and ask nothing more. The labels shown are unchanged, in every language, and an item that has not landed shows its machine name, as before.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/lint': patch
3+
'@objectstack/metadata-protocol': patch
4+
---
5+
6+
Clause-②: no
7+
Metadata-protocol: none
8+
9+
A form view whose section names a field its object does not have, or a field group the object does not declare, now hears about it when it is saved and published, not only on a later read.
10+
11+
- `validateFormLayout` runs at the runtime publish gate for `view` writes (`runtimeTypes: ['view']`). An active save and a publish of such a view answer `form-field-unknown` / `form-section-group-unknown` in the response's `advisories`, with the lint's own message and hint. They are warnings: the write lands, nothing is refused. A draft save still runs no authoring rule; its read carries the warnings.
12+
- The rule now also reads a stored form item's `config` (`{ name, object, viewKind: 'form', config }`, the shape Studio saves), so a Studio-authored form is judged on save, on publish and by `os validate` / `os build` / `os lint` alike, at `config.sections…` paths. A list item's `config` is not walked.
13+
- The `/meta` view read now carries `form-section-group-unknown` in `_diagnostics.warnings` beside `form-field-unknown`, with the same message the lint prints. `valid` stays the schema's answer.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
fix(service-automation): the region refusal names the deeper suspended run it could not read instead of leaving it parked in silence
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
When a `subflow` or `map` call inside a `loop` body, a `parallel` branch or a `try_catch` slot starts a child flow that suspends, the run fails at the region boundary and cancels the child run with every run it is parked on. That walk read each link through a best-effort read, so a link deeper in the chain that the suspended-run store could not read stopped the walk with only a `warn`: that run, and every run below it, stayed parked. The walk now reads through the strict loader that `cancelRun` uses. It cancels every link it read, still cancels the link it could not read through `cancelRun` (which records its own `error` if the store is still unreadable), and logs one `error` naming that run, because any run below it was never reached and may still be parked. The refusal itself, its text and its un-routability are unchanged.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): a typed approval decision output's `type` and `multiple` are documented as enforced at the decision, not as a widget hint
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `DecisionOutputDefSchema` docblock, its `required` docblock and the `decisionOutputs` docblock on the approval node config said `type` and `multiple` only shape the decision dialog's input widget and that the runtime accepts whatever value shape arrives. They now state the contract (ADR-0104 as amended 2026-10-30): `multiple: true` takes a list with no entry twice, and an absent or false `multiple` takes one value, for every entry (`text` and bare-string entries included, judged by shape only); a picker output's values are also resolved, `user`, `department` and `team` by record id and `position` by the machine name of a position someone holds; a mismatch is refused with `400 VALIDATION_FAILED` naming `outputs.KEY`, before any write. The approvals guide (`content/docs/automation/approvals.mdx`) says the same, and its "previous approver picks the next step's approvers" example now declares `{ key: 'next_reviewers', multiple: true }`, since the list it sends is refused under a bare key. Comment and docs text only: no schema key, `.describe()` string, export or type changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): the by-id OCC comparison hands a row absent from the caller's read to the write door
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`updateData` and `deleteData` compare a caller's version token (`If-Match`, or `expectedVersion`) before the write is authorized. On a mismatch they re-read the row as the caller. When that read returns no row, the comparison is now dropped and the request goes on to the write, whose door answers it: the answer the request gets without a token, and the answer a token on an id naming no row gets. This restores the governing text for the write doors (ruling of record 5985885287).
11+
12+
- **Unchanged:** a row the caller reads still answers `409 CONCURRENT_UPDATE` with that row as `currentRecord`, including a row the caller reads but may not write. A caller read that throws — a refusal or a fault — propagates as raised, as before. A matching token, or none, reads nothing more than before.
13+
- **The write door's answers for a row absent from the caller's read:** a caller who may not update or delete the object gets that refusal (`403`); a caller who may write the object gets `404 RECORD_NOT_FOUND`, as for an id naming no row.

‎content/docs/automation/approvals.mdx‎

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,10 @@ run is never killed — and the log says both that the fallback fired and that i
327327
found nobody.
328328

329329
The "previous approver picks the next step's approvers" loop needs no record
330-
field at all: declare `decisionOutputs: ['next_reviewers']` on node A, have the
331-
approver decide with `{ outputs: { next_reviewers: ['u2', 'u3'] } }`, and let
330+
field at all: declare `decisionOutputs: [{ key: 'next_reviewers', multiple: true }]`
331+
on node A (`multiple: true` because the answer is a list; a bare
332+
`'next_reviewers'` takes one value), have the approver decide with
333+
`{ outputs: { next_reviewers: ['u2', 'u3'] } }`, and let
332334
node B's approver be
333335
`{ type: 'expression', value: 'vars.<nodeA-id>.next_reviewers' }`. The author
334336
declares output keys, approvers only fill values; undeclared keys reject the
@@ -339,12 +341,31 @@ multiple: true }` — which renders a multi-select user picker in the decision
339341
dialog instead of free text (`department` / `team` render the matching
340342
system-object picker and commit record ids; `position` renders a picker over
341343
the position registry and commits position machine names; `multiple` collects
342-
an array of them). The type shapes only the input widget; the whitelist
343-
still works by `key`, so bare strings and typed declarations mix freely.
344+
an array of them). The whitelist still works by `key`, so bare strings and
345+
typed declarations mix freely.
346+
347+
The runtime enforces every declaration at the decision, on an approve and a
348+
reject alike, before anything is written:
349+
350+
- `multiple: true` takes a list, and only a list, with no entry twice. An
351+
absent or `false` `multiple` takes one value. This holds for every entry,
352+
`text` and bare strings included.
353+
- A picker output's values are also resolved, the way the matching
354+
`expression` approver's `resolveAs` expands them, in the request's
355+
organization: `user`, `department` and `team` by record id, `position` by
356+
the machine name of a position someone holds. A position name nobody holds is
357+
refused, and so is a `sys_position` record id: either would route to nobody.
358+
- A mismatch is refused with `400 VALIDATION_FAILED` naming every
359+
`outputs.<key>` that does not match. No decision is recorded and the request
360+
stays pending, so the approver can decide again.
361+
362+
A `text` output (the default, and every bare-string entry) is judged by shape
363+
only: its value is free text. A blank value is left to `required`, below.
344364

345365
Add **`required: true`** when the next step cannot run without it — the very
346366
case above, where node B has nobody to route to if the lead skipped the field.
347-
Unlike `type` / `multiple`, this one is enforced by the runtime: an **approve**
367+
Where `type` / `multiple` judge the shape of a value the approver supplies,
368+
`required` judges whether one is there: an **approve**
348369
carrying no value (or a blank one — `''`, `[]`) for a required key is rejected
349370
before any write, so the run can never resume past the node with the key
350371
missing. A **reject** never requires it: the run leaves down the `reject` edge,

‎content/docs/permissions/field-level-security.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ only constrain fields they explicitly enumerate, and field grants union
157157
most-permissively across a user's sets (one set's `readable: true`
158158
out-votes another set's `false`). Until a subtractive muting layer lands
159159
(ADR-0066 ⑧), a `{ readable: false }` rule masks the field only as long
160-
as **no other set the user holds** declares it `readable: true` — so
160+
as **no other set the user holds** declares it `readable: true` or holds
161+
View All (`viewAllRecords`, reads every field of the object) or Modify All
162+
(`modifyAllRecords`, reads and edits every field) on that object — so
161163
protect sensitive fields by granting them only in the sets that need
162164
them, and treat a sensitive field on a broadly-granted object as a
163165
review smell — see the

‎content/docs/permissions/permissions-matrix.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ Field-level security controls visibility and editability of individual fields pe
139139
| `account.name` | Visible, Editable | Visible, Editable | Visible, Editable | Visible | Visible |
140140
| `account.revenue` | Visible, Editable | Visible, Editable | Visible | Hidden | Hidden |
141141
| `contact.email` | Visible, Editable | Visible, Editable | Visible, Editable | Visible | Visible |
142-
| `contact.ssn` | Visible, Editable | Hidden | Hidden | Hidden | Hidden |
142+
| `contact.ssn` | Visible, Editable | Visible | Hidden | Hidden | Hidden |
143143
| `opportunity.amount` | Visible, Editable | Visible, Editable | Visible, Editable | Visible | Visible |
144-
| `opportunity.margin` | Visible, Editable | Visible | Hidden | Hidden | Hidden |
144+
| `opportunity.margin` | Visible, Editable | Visible, Editable | Hidden | Hidden | Hidden |
145+
146+
**View All / Modify All reach every field.** The Sales Manager column follows from section 2: `sales_manager_access` holds `viewAllRecords` on `contact` and `modifyAllRecords` on `opportunity`, and a set holding View All on an object reads every field of it, while Modify All also edits every field (ADR-0066 D2 ⑧ as amended). Field rules in other sets cannot hide `contact.ssn` from that manager. To keep a field from someone, grant them the object without View All / Modify All and withhold the field there.
145147

146148
### FLS States
147149

‎content/docs/protocol/kernel/http-protocol.mdx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,12 @@ each row of `updateMany` and of `batch` with `operation: "update"`. A caller who
753753
update the object gets `404 RECORD_NOT_FOUND` for an id that names no record, and for
754754
a record its row-level access hides.
755755

756+
A version token (`If-Match`, or `expectedVersion`) is compared only against a record the
757+
caller can read: a stale token on such a record is answered `409 CONCURRENT_UPDATE`,
758+
whether or not the caller may write it. For a record the caller's read does not return,
759+
and for an id that names no record, a stale token changes none of the answers above. A
760+
caller refused reading the object gets that read refusal.
761+
756762
### Delete Record
757763

758764
Delete a record by ID.

0 commit comments

Comments
 (0)