Skip to content

Commit d547136

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/area-o1C-38210
2 parents 677ed7a + fd9ac00 commit d547136

226 files changed

Lines changed: 12396 additions & 1161 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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
chore(spec): the ADR-0087 ledger names the refusal of a manual share or sharing rule whose user recipient does not resolve
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: narrowed
9+
10+
<!-- adr-0087: registered share-user-recipient-unresolved-refused -->
11+
12+
A new semantic entry, `share-user-recipient-unresolved-refused`, under step 19: `objectstack migrate meta` and the upgrade guide now say that `POST /api/v1/data/OBJECT/ID/shares` and `POST /api/v1/sharing/rules` refuse a `user` recipient that names no existing user (on a walled deployment with the record's or rule's organization known, no member of that organization, where a rule's organization is the caller's or, for a platform operator with no active organization updating a stored rule, the stored rule's own; where that organization does not resolve, the recipient is not judged) with 400 `VALIDATION_FAILED`, and how to find the inert shares stored before the refusal. No schema, key or export changes.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/plugin-sharing': minor
3+
---
4+
5+
fix(plugin-sharing)!: a manual share, or a sharing rule, to a user id that names no user is refused instead of stored as a grant that grants nothing
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: narrowed
9+
10+
<!-- adr-0087: registered share-user-recipient-unresolved-refused -->
11+
12+
**What was wrong.** `POST /api/v1/data/OBJECT/ID/shares` with `{"recipientType":"user","recipientId":"nobody_xyz"}` answered 201 and stored a `sys_record_share` row, listed by `GET …/shares` like any other grant. The read and write gates look a share up by `recipient_id` equal to the signed-in user's id, so a row naming an id no user carries grants no one anything: a share that looks granted and enforces nothing. `grant()` checked only that `recipientId` was present. `POST /api/v1/sharing/rules` (`defineRule`) stored a rule with the same kind of `user` recipient.
13+
14+
**Now.** On the non-system path, `SharingService.grant` asks whether the recipient names a user the gates could ever match before it writes:
15+
16+
- on a deployment walled by organization (tenancy posture `isolated` or `group`) with the record's organization known: a member of that organization (`organizationMemberStanding`, the engine's one membership predicate);
17+
- on `single`, and behind a wall on a deployment that registers no membership table: an existing `sys_user`;
18+
- on a walled deployment where the grant's organization does not resolve (the record's organization could not be read, or the record carries none and the session has no active one): nothing is judged, because the engine already refuses that insert for every recipient alike (`ERR_SYSTEM_WRITE_ORGANIZATION_REQUIRED`, 500) and writes nothing; judging the recipient there would answer an unknown id differently from a real one.
19+
20+
A recipient that does not resolve is refused `VALIDATION_FAILED` (400 at the REST door) with `recipientId "ID" does not name a user this record can be shared with, so no access check would ever match the share. Name an existing user (on a multi-organization deployment, a member of the record's organization).` and nothing is written. On a walled deployment, a user of another organization gets the same answer as an id that does not exist, so the door tells no caller who exists in another tenant. The check runs after the caller's authorization, so a caller who may not manage shares on the record learns nothing about the user directory.
21+
22+
`SharingRuleService.defineRule` applies the same check, in the rule's organization, to a non-system `user` recipient when the rule is new or its recipient changes (the refusal says `…a user this rule can share with, so the rule would grant no one access…`). The rule's organization is the caller's or, for a platform operator with no active organization, the stored rule's own when the call updates one: that update is not refused by the engine's insert-only organization rule, so a move onto a user outside the stored rule's organization is refused here with the same answer. A new rule written with no organization on a walled deployment is not judged: the engine refuses that insert for every recipient alike. Saving a stored rule again with its recipient unchanged is not judged, so a rule whose user has since left can still be switched off.
23+
24+
**BREAKING** for a caller that shares a record, or saves a sharing rule, naming a user id that does not exist or, on a walled deployment with the record's or rule's organization known, a user outside that organization: it answered 201 and stored a row that granted nothing; it answers 400 `VALIDATION_FAILED` and stores nothing.
25+
The fix for a caller: send the id of an existing user, on a multi-organization deployment a member of the record's (or rule's) organization.
26+
27+
Unchanged: the system context (the rule materialiser's own grants), shares and rules already stored (nothing is rewritten or removed), a deployment that registers no `sys_user` (nothing to resolve against: the check stands aside), and a `sys_sharing_rule` row written through the `/data` door, which this change does not judge.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/rest': patch
4+
'@objectstack/runtime': patch
5+
'@objectstack/mcp': patch
6+
'@objectstack/metadata-protocol': patch
7+
'@objectstack/service-analytics': patch
8+
'@objectstack/service-storage': patch
9+
---
10+
11+
feat: an answer whose translations could not be read says so, as `translationWarning`
12+
13+
Clause-②: yes (widening) — `GetMetaItemsResponseSchema`, `GetMetaItemResponseSchema` and `QueryDatasetOutputSchema` gain the optional string `translationWarning`; the MCP `list_objects` and `describe_object` answers gain the same optional member, and `DiagnosedObjectListing` and the dataset tools' `DatasetToolSource` gain the optional `translationWarning` they carry it in; `DatasetToolsDeps` gains an optional `logger`
14+
Metadata-protocol: added
15+
16+
When the deployment's i18n service resolves but its translations cannot be read (its `getLocales` or `getTranslations` throws), the metadata and dataset answers are served in the authored language, untranslated. Until now only `list_datasets` told the caller why; every other answer looked exactly like one for a locale with no translation. These answers now carry `translationWarning`, one fixed sentence saying the translations could not be read, beside what they serve: `GET /meta/:type` and `GET /meta/:type/:name` on both HTTP hosts (the REST server and the runtime dispatcher), the MCP `list_objects` and `describe_object` tools on both transports, and `query_dataset`. It is present only on such a fault, so an answer whose translations were read is byte for byte what it was. `list_datasets` keeps the `partial` and `warning` it already serves for the same fault. Every warning sentence here, `list_datasets`' warning when the dataset catalogue itself cannot be read, and `query_dataset`'s 503 refusal when the dataset read fails, are now the platform's client-facing failure text: a fixed sentence, with the original error in the server log only. A list answered as a bare array (a protocol that answers without the `{ type, items }` envelope) has no member to carry it; the server log says the fault either way.
17+
18+
Three more places read the i18n service's whole catalog with no guard, so the same fault failed them with an unhandled error:
19+
20+
- An object save and the stored-metadata migration (its preview and its apply pass, from the REST route, the runtime dispatcher and `os migrate meta`) read the catalog to tell a translated label a Studio session sent back from one the author typed. Both are now refused as 503 `SERVICE_UNAVAILABLE`, a declared refusal whose fixed sentence reaches the HTTP caller ("The translations could not be read, … nothing was saved or migrated. Retry once the translations can be read."), and nothing is stored; the i18n error is logged on the server. Retrying once the translations read again saves the same body. Going on without the catalog would have stored translated labels as the authored ones, or counted an echoed stored row as canonical.
21+
- A dataset query's select-option labels and the upload page's object and field labels are now served as declared, with one `warn` line saying the translations could not be read.
22+
23+
Nothing to migrate.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/i18n': patch
3+
---
4+
5+
feat(i18n): the Studio sharing-defaults overview's line and confirm for an object the AI assistant left unpublished changes on
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Two keys join the studio namespace in English and Chinese: `engine.studio.owd.aiDraftNotice`, the line an organization-wide-defaults row shows when the AI assistant (copilot or MCP) left unpublished changes on that object, and `engine.studio.owd.aiDraftDiscardConfirmUnsaved`, the confirm its discard asks when the row also holds an edit the person has not saved. Both name the whole object, since saving or discarding that row reaches the object's whole pending draft. No key is renamed or removed.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/plugin-report': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(plugin-report): the report chart honours `chart.showEmptyGroups`, and the report builder offers it as a switch
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: added
10+
11+
- On a chart with a category axis (bar, column, horizontal-bar, line, area, radar, combo), the dataset report chart adds the `xAxis` field's declared options that the answer left out when `chart.showEmptyGroups` is on: in their declared place, with the option's label and colour, valued `0` for a count or sum and left empty for avg/min/max. With a `seriesBy` split an added option reads the empty value in every series. Whether an option is missing is judged by the stored value the answer's `drillRawRows` carries wherever the answer has it, so a label the server translated differently is not drawn as a second, zero-valued group; a row with no raw value falls back to matching the option's spellings. A value-sized chart (pie, donut, funnel, treemap, sankey) and scatter get nothing added. Nothing is added for a field with no declared options, when the report's `order` reaches the chart's query, or on an answer with no rows. A bar on an added option opens no record list.
12+
- The report builder's chart settings gain a "Show groups with no records" switch on the category-axis charts (bar and line among the builder's choices, and a stored column, area or other category-axis type). It writes `chart.showEmptyGroups: true`; off removes the key. An edit keeps an authored key on every series chart type, the donut included, and only a single-value or table chart drops it.
13+
- `@object-ui/i18n`: `report.builder.chart.showEmptyGroups` in all 11 locales.
14+
- `@object-ui/plugin-report` now lists `@objectstack/spec` under `dependencies` (it was a dev dependency): the chart reads the analytics executor's empty-group values from `@objectstack/spec/data` at runtime.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): `chart.showEmptyGroups` on a report chart — show the declared options that have no records
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
- `ReportChartSchema` gains an optional boolean `showEmptyGroups`. A grouped query returns only the values that have rows, so a select option no record carries was missing from a report chart rather than drawn at zero. With `showEmptyGroups: true` the report renderer adds every declared option of the `xAxis` field the answer left out, valued the way the analytics executor values any empty group (`emptyGroupValueFor`: `0` for count and sum, empty for avg/min/max).
11+
- Optional with no default: a report that does not set it parses exactly as before and its chart draws exactly the groups the query returned. A non-boolean value is refused at `chart.showEmptyGroups`.
12+
- Acts on a chart with a category axis (bar, column, horizontal-bar, line, area, radar, combo); a chart that sizes its marks by value (pie, donut, funnel, treemap, sankey) and scatter get nothing added, and on a single-value or table chart the key has no effect. Only a field that declares its options is filled. Nothing is added when the report's `order` reaches the chart, and an answer with no rows at all still draws no chart. A date axis needs no switch: the executor already returns every bucket of the report's period.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
---
4+
5+
fix(driver-sql): a boolean field declaring the string `'false'` / `'true'` as its default no longer reads as schema drift on SQLite
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The schema sync stores a boolean column's literal DEFAULT in the boolean's own spelling: on SQLite, `'0'` for `defaultValue: 'false'` and `'1'` for `defaultValue: 'true'`, on both Turso faces. The drift differ compared a string declaration as text, so such a column was reported as `default_mismatch` / `set_column_default` on every drift read (the boot drift warning and `os migrate plan`), and `os migrate apply` wrote the same DEFAULT again without clearing the entry. On a `boolean` or `toggle` column the differ now reads the exact strings `'true'` and `'false'` as the booleans they spell. A column whose DEFAULT really differs from the declaration is still reported, and one apply clears it.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/core': patch
3+
---
4+
5+
fix(core): a failed boot destroys every plugin whose `init()` ran, not only the ones that started
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`ObjectKernel.bootstrap()` used to roll back only the plugins whose `start()` had succeeded. A plugin that opened a resource in `init()` (a pool, a client, a timer) kept it after a refused boot if it never got to a successful `start()`: its own `start()` threw, an earlier plugin's `start()` failed first, or a later plugin's `init()` refused the boot. A failed boot leaves the kernel `stopped`, `shutdown()` on it does nothing, and so no `destroy()` ever ran. A normal shutdown does destroy such a plugin.
11+
12+
- **What changes.** With `rollbackOnFailure` on (the default), a failed boot now destroys every plugin whose `init()` finished, in reverse init order, at whatever point the boot fails: a later `init()`, a `start()`, the system-requirement check, or a `kernel:ready`, `kernel:bootstrapped` or `kernel:listening` handler. Before, a failure during `init()` destroyed nothing at all.
13+
- **What stays the same.** A plugin whose `init()` threw or never ran is not destroyed. A plugin with no `destroy()` is skipped. A `destroy()` that throws is logged and the other plugins are still destroyed. The error the boot rejects with is the same as before. `rollbackOnFailure: false` still leaves every plugin as it is.
14+
- **No plugin is destroyed twice.** The rollback after a failed `start()` now runs with the kernel `stopping`, as the later-phase rollback already did. A `shutdown()` called from inside a `destroy()` during that rollback is ignored now. Before, it destroyed every plugin a second time.
15+
- **For plugin authors.** On a failed boot, `destroy()` can now run without `start()` having run first. Release only what `init()` or `start()` actually set up, for example with `this.pool?.end()`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/i18n': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/fields': patch
5+
'@object-ui/plugin-chatbot': patch
6+
'@object-ui/console': patch
7+
---
8+
9+
fix(i18n): sentences that name Studio read 应用搭建 in Chinese and App Studio in the other languages
10+
11+
Clause-②: no
12+
Metadata-protocol: none
13+
14+
The brand, the app name and the doors into Studio already read 应用搭建 / App Studio; the sentences that mention it still said "Studio", so a Chinese interface mixed the two names. Every such sentence now names the builder by its display name: 应用搭建 in the Chinese packs (繁體 應用搭建, regenerated), App Studio in every other pack, with each sentence's wording otherwise unchanged. That covers 24 keys of the UI packs (for example `common.editInStudio`, `console.studio.accessRequired`, `empty.openInStudio`, the "unpublished changes in Studio" notices and the `capability.label.studio_access` capability label) and 20 keys of the `studio` namespace (for example `engine.studio.menu.label`, `engine.studio.backToAppTitle` and `engine.studio.refusal.draftUnreadable`). The inline `defaultValue` fallbacks paired with those `en` values follow. Display text only: the `/studio` address, the `studio.access` capability name, package names and identifiers are unchanged.

0 commit comments

Comments
 (0)