Skip to content

Commit 0f9dc05

Browse files
committed
Merge origin/main into issue-35440
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyy9KSA69EGZtjDj9c
2 parents 64d7c50 + ca4ec2a commit 0f9dc05

49 files changed

Lines changed: 2453 additions & 169 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/objectql': minor
3+
---
4+
5+
fix(objectql): an update whose every caller-supplied field is dropped (read-only, or locked by `readonlyWhen`) is a no-op, so the record no longer shows a last-modified edit that changed nothing and `afterUpdate` automation no longer fires for it
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
An update could send only fields the engine refuses to store: a `readonly` field, or one a TRUE `readonlyWhen` locks for that record. The engine dropped them, reported them in `droppedFields`, and then still wrote the row: `updated_at` and `updated_by` were stamped, and every `afterUpdate` hook ran, so "on update" flows and triggers treated it as a real edit.
11+
12+
Now such an update writes nothing, on a single-record update and on a `multi: true` predicate update alike:
13+
14+
- no driver write, so `updated_at` / `updated_by` keep their stored values;
15+
- `afterUpdate` does not run, no roll-up recomputes and no record-changed event is published;
16+
- a single-record update answers the current record, and a predicate update answers `0` rows written;
17+
- the dropped fields are still reported exactly as before (`onFieldsDropped`, and the REST `droppedFields` answer).
18+
19+
`beforeUpdate` still runs, as it must before the engine can know what is left. When at least one field survives (a caller field, or a field a `beforeUpdate` hook wrote), the update takes the unchanged path. An update whose fields are all kept but equal to the stored values is unchanged. `strictReadonlyWrites` still refuses a dropped field before anything is written.
20+
21+
What to check in an app: an `afterUpdate` hook or record-change trigger that relied on firing for an update made only of read-only or locked fields no longer runs for it. Send a writable field in that update if the automation must run.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
docs(skills): the `description` of `objectstack-data`, `-ui`, `-automation`, `-formula`, `-i18n` and `-query` now leads with what the user is doing ("design or change a data model, in a project or through MCP"), keeps the `*.object.ts`-style file names as a secondary cue, and ends with a "Not for" clause naming the neighbouring skill. An agent building through MCP has no project files, so a description that triggered on file names never loaded the skill. Each is 432 to 450 characters (432 to 849 before). No skill body changes; the README index and the Skills reference page are regenerated from the new text.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/auth': patch
3+
---
4+
5+
fix(auth): a "Sign in with SSO" request that never answers gives the sign-in page back after 20 seconds
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On the login page, when the request behind "Sign in with SSO" got no answer, the button kept spinning and the email field stayed locked until the page was reloaded. The request now runs under the same 20-second limit as the identity-provider buttons: once it passes, the request is cancelled, the page says the sign-in timed out, and the email field and the button can be used again to retry. An answering request still sends the browser to the identity provider as before.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/service-analytics': patch
4+
---
5+
6+
fix(objectql,service-analytics): `query_dataset`'s ObjectQL face orders and cuts a top-N in the database instead of reading every group
7+
8+
Clause-②: yes
9+
Metadata-protocol: none
10+
11+
A top-N (`order` with a `limit`, optionally an `offset`) on the analytics ObjectQL face — date-bucketed queries, `$field` filters, drivers without raw SQL — used to read every group and cut in memory. On a driver that compiles the engine's order-and-cut (the SQL driver family: `driver-sql`, the WASM SQLite driver, Turso's local and replica faces) the face now hands the engine its order and `offset + limit`, the database orders, cuts and counts in one statement, and only the cut rows are read. `totalGroups` stays the count of every group, taken from that statement.
12+
13+
Visible change: a text-ordered top-N on such a driver now returns the database's choice of groups — its collation, NULL last in both directions — the same as the native SQL face and `aggregate_records`, instead of the in-memory comparator's (`localeCompare`, `''` read as empty).
14+
15+
Where the engine cannot serve the cut — the in-memory driver, MongoDB, OData, Turso's remote face, a date bucket or reference timezone the driver does not compile, a measure filter it does not evaluate — the face reads every group and cuts in memory as before, and no refusal reaches the caller. A select or lookup dimension ordered by its display label is still cut in memory, by label.
16+
17+
`@objectstack/objectql`: an `AGGREGATE_ORDER_CUT` request may set `declinable: true`; where the cut cannot be served the engine then reads nothing, answers `[]`, leaves `outcome` unset and records the reason on the request's new `declined` slot instead of refusing `INVALID_QUERY` / 400. Without the flag nothing changes: `aggregate_records` keeps its refusal, and `AggregateOrderCutOutcome` is 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): the `FilterCondition` nested-relation docblock states the engine's three-relationship limit
6+
7+
Clause-②: no — comment-only edits in packages/spec; no schema, export or accept set moves
8+
Metadata-protocol: none — no metadata key is touched
9+
10+
`@objectstack/spec`: comments only, in `src/data/filter.zod.ts`, which the package ships as source. The nested-relation form (`{ relation: { field: value } }`, form 4 on `FilterCondition`) and its three one-line mentions said the engine serves it one level deep; they now say up to three relationships deep (ADR-0071's 3-hop limit, `RELATION_CONDITION_MAX_HOPS` in objectql), with a condition past the third relationship refused as `INVALID_FILTER` / 400, and name the platform-provisioned `id`, `created_at` and `updated_at` beside the related object's declared fields as admitted keys.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
fix(approvals): rejecting through the `approval_reject` action requires a reason
6+
7+
Clause-②: no (narrowing)
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, and no export changes shape. What moves is one param declaration in this plugin's own object metadata: approval_reject's comment goes from optional to required, so a call to that action without a reason is refused. No stored row, registry key or authored value changes, so there is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** for a caller of the `approval_reject` action on `sys_approval_request` that sends no `comment`: the call used to reject the request and is now refused before the approvals route runs. It ships `patch` because it is a non-protocol breaking change (AGENTS.md Post-Task Checklist step 3): the declaration belongs to this plugin, and nothing a metadata author writes changes, so `Metadata-protocol` is `none`.
13+
14+
`approval_reject` declares its `comment` param `required: true`, so a reject through `approval_reject` always carries its reason. The declared param contract judges the call before the target route runs, and it counts an empty or whitespace-only string as missing: the REST action door (`POST /api/v1/actions/sys_approval_request/approval_reject`) and MCP `run_action` answer `400` with the param contract's refusal naming `comment`, and the console's param dialog holds Confirm until a reason is typed. A reject with a reason runs as before. The action's AI tool description now says the reason is required. The `POST /api/v1/approvals/requests/:id/reject` route itself is unchanged.
15+
16+
Fix for a caller: send the reason as `params.comment` when you run `approval_reject`.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
'@objectstack/driver-turso': patch
4+
---
5+
6+
fix(driver-sql)!: a boolean field is stored as a boolean whatever spelling the caller sends
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export changes shape. What moves is the write door of the SQLite-family drivers (SqlDriver on SQLite, both faces of TursoDriver, SqliteWasmDriver) for a direct caller: a value on a declared boolean or toggle field that spells no boolean is refused instead of stored, and the spellings it accepts are stored as the boolean they spell. The engine's own door already refuses those values with invalid_boolean, so no authored metadata, seed or stored row is rewritten and nothing needs a tombstone. -->
12+
13+
**BREAKING** for a caller that writes through a SQLite-family driver directly (`create`, `update`, `upsert`, `bulkCreate`, `bulkUpdate`, `updateMany`) and sends a declared `boolean` / `toggle` field a value that spells no boolean, such as `'yes'`, `'TRUE'`, `''`, `2` or an array: it used to be stored as written and is now refused with `VALIDATION_ERROR` / 400 before anything is written. It ships `patch` because it is a non-protocol breaking change (AGENTS.md Post-Task Checklist step 3): no metadata author writes a driver call, so `Metadata-protocol` is `none`, and the engine's door already refuses those values.
14+
15+
A declared scalar `Field.boolean` / `Field.toggle` is now stored as a boolean on SQLite whatever spelling the write sends. `true` / `false`, the numbers `1` / `0` and the text `'1'` / `'0'`, `'true'` / `'false'` and `'1.0'` / `'0.0'` are bound as the boolean they spell, so a column the driver created holds the INTEGER `1` / `0` and a `text` column retyped to `boolean` holds the text `'1'` / `'0'`. These are the spellings the local boot convergence already rewrites, read from the same table. Before, a string reached the column as text, on the local and the remote face of `TursoDriver` alike, so filters, sorts and groups did not read the row as the boolean it was written as. That includes a `beforeInsert` / `beforeUpdate` hook that assigns a string to such a field: the engine's own rewrite runs before the hooks, so the assignment now lands as a boolean too. On the remote face, a number written to a `toggle` field is stored as `'1'` / `'0'` instead of `'1.0'` / `'0.0'`.
16+
17+
A remote `TursoDriver.bulkCreate` checks every row before it writes the first one, so a refused row refuses the batch with nothing written, as the local face's single INSERT already did. `null` still writes NULL. Rows stored before this change keep their stored form.
18+
19+
To keep a direct write working, send `true` or `false` (or one of the spellings above) for a boolean or toggle field.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(plugin-auth)!: SSO discovery fetches only hosts that resolve to public addresses
6+
7+
Clause-②: no (narrowing)
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, and no export changes shape. What moves is one runtime answer of the SSO provider register door: a registration whose discovery document sits on a host that resolves to an address that is not public, on an origin the deployment's trusted origins do not list, is refused before anything is read. No stored row, registry key or authored value changes, so there is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** for an SSO provider registration (`POST /api/v1/auth/sso/register`, or the Register SSO Provider bridge `POST /api/v1/auth/admin/sso/register`) whose OpenID Connect discovery document sits on a host that resolves to a private, loopback, link-local or otherwise non-public address, on an origin `OS_TRUSTED_ORIGINS` does not list: it is refused `400 VALIDATION_FAILED` on `issuer` (or on `oidcConfig.discoveryEndpoint` when the registration names one), and the bridge answers `400 SSO_REGISTER_FAILED`. It ships `patch` because it is a non-protocol breaking change (AGENTS.md Post-Task Checklist step 3): no metadata author writes an SSO provider registration, so `Metadata-protocol` is `none`.
13+
14+
SSO discovery fetches only hosts that resolve to public addresses. Before a registration reads its discovery document, the server resolves that document's host and every address must be public (the same predicate `@better-auth/sso` applies to the endpoints it reads at sign-in). The origins a registration names stay trusted for that registration's discovery checks, as before; that trust never stands in for this one. A registration that reads no discovery document (a SAML provider, or `skipDiscovery`) resolves nothing, and a registration with no session is answered `401` before any name is resolved.
15+
16+
Fix for an operator whose identity provider runs on an internal network: list its origin in `OS_TRUSTED_ORIGINS`, and the registration reads its discovery document as before.

0 commit comments

Comments
 (0)