Skip to content

Commit c9f012c

Browse files
committed
Merge origin/main into claude/project-thread-6oxw6l
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQztfi9hnsaBeBVcCU
2 parents 1d91110 + 8c75f83 commit c9f012c

139 files changed

Lines changed: 11800 additions & 438 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
fix(studio): a renamed validation rule keeps the hold of the server's verdict on its guard
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
In Studio's Validations tab a rule made from New takes its name from its error message, so editing the message renames it. The panel kept each rule's verdict by name and the condition editor reports only when its count changes, so a rename stranded the verdict under the old name: a guard the publish refuses (a nullable field compared without a null check) went on autosaving after the server had said so. The verdict now moves with the rule's name, through the message and through the name input: once the verdict shows, the next save is held and the held line names the rule. The first save of a refused guard still goes out, since only a saved draft is judged, and an edit of the guard itself still goes out to be judged again.
12+
13+
The held line the permission set editor and the hooks panel show reads "Fix the expression errors before saving." (zh 「请先修复表达式错误再保存。」) instead of naming CEL syntax errors, since it also holds the server's refusals.
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+
i18n(platform-objects): the platform objects, Setup, Studio and Account ship in German
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`@objectstack/platform-objects` now carries `de` beside `en`, `zh-CN`, `ja-JP`, `es-ES`, `zh-Hant`, `ar`, `fr`, `pt-BR` and `ru`: every `sys_*` object (labels, fields, help, options, views, actions and their dialogs), the metadata-type configuration forms Studio opens, the Setup, Studio and Account navigation, the System Overview dashboard and its datasets, the platform pages' titles, and the inline copy on the user and organization record pages. A user whose locale is `de` no longer reads English `sys_*` labels in the console. The new bundles pass through the same source-hash fallback as the existing ones, and every hand-authored leaf records the digest of the source it was translated from. The extract config documents `de` in its `--locales`, so `check:i18n` now gates the new bundles. Package 11 of #30512, sixth of seven locales; `ko` follows.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/driver-sql': minor
4+
'@objectstack/service-datasource': minor
5+
---
6+
7+
feat(spec, driver-sql, service-datasource): SQL Server as a federation-only dialect — an `external` datasource over Microsoft SQL Server reads live, and with the double opt-in writes live
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: added
11+
Skills-docs: generated only — `skills/objectstack-data/references/_index.md` gains the `driver/mssql.zod.ts` row (`gen:skill-refs`); no hand-written skill text enumerates a datasource driver-id roster or teaches per-dialect federation behaviour. `content/docs/data-modeling/external-datasources.mdx` gains the SQL Server section (§8, after Oracle's) (config shape, federation-only scope, schema-qualified tables, the 2017 floor), and `content/docs/references/data/driver-mssql.mdx` is generated.
12+
13+
- **`@objectstack/spec`**: the driver vocabulary gains `mssql` (aliases `sqlserver`, `tedious`), a second `federationOnly` row after `oracle`, with `hasLocalDefault: false`: no boot host offers it, and a `managed` datasource declaring it is refused at parse, at `schemaMode`, by the same refusal as `oracle`. `FEDERATION_ONLY_DRIVER_IDS` and `isFederationOnlyDriver()` now answer both drivers, and `DatabaseSelectionDriverId` excludes both. The boot-host selection tables are now built without the federation-only rows, so the withdrawal holds by the column rather than by each row's empty `aliases`. `MssqlConfigSchema` is the closed config: `host`, `port` (1433), `instanceName`, `database`, `username`, `ssl`; an inline password, a connection URL and `autoMigrate` are refused with the reason. Its `ssl` docblock documents a self-signed server as the datasource-level `ssl: { enabled: true, rejectUnauthorized: false }`, because a block without `enabled: true` turns encryption off. `type-compat`'s `SqlDialect` gains `'mssql'`, and `DIALECT_ALIASES.mssql` maps SQL Server's types (`nvarchar`/`nchar`/`ntext`/`xml` → text, `bit` → boolean, `datetime2`/`datetimeoffset`/`smalldatetime` → datetime, `uniqueidentifier` → uuid, `money`/`decimal`/`numeric` → decimal, `timestamp`/`rowversion` → binary). Oracle's exact-to-lossy demotion and SQL Server's added lossy pairing are now one table, `DIALECT_LOSSY_RULES` (`demoteExact` / `addLossy`, only ever toward `'lossy'`): on `mssql`, a text column backs a `json`, `tags` or `multiselect` field as `'lossy'`, because SQL Server keeps JSON in `nvarchar(max)`; Oracle's answers are unchanged. ADR-0015 §4.6 lists the dialect, and §5.1's federation-only arm names both drivers.
14+
- **`@objectstack/driver-sql`**: `dialectName` reads `'mssql'` for knex's `mssql` client, so nothing falls to `'unknown'`. Text predicates keep the #6518 contract on SQL Server's case-insensitive default collations (a `Latin1_General_100_BIN2` comparison, `TRANSLATE` for the ASCII fold, `[` escaped); a `bit` aggregand is cast for SUM/AVG/MIN/MAX; writes use `INSERT … OUTPUT inserted.*` through a temp table, so a table with triggers accepts them; a `uniqueidentifier` reads back in the canonical lower-case form (tedious `lowerCaseGuids`, unless the host sets it), so a GUID written as a string reads back as that string and filters by it in either case; an unsorted page of a federated table is ordered by its own single-column primary key, read from the catalog; `limit: 0` compiles to `TOP (0)`; JSON fields read back from `nvarchar`; introspection lists every user table as `schema.table` (`dbo.Orders`) with its primary key, foreign keys, unique columns and indexes. Managed DDL is refused as federation-only (`SQL_DIALECT_EMISSION_UNSUPPORTED`, through the same `'federation-only'` reason and message renderer as Oracle), and `$contains` / `$empty` on a multi-value field is refused rather than approximated.
15+
- **`@objectstack/service-datasource`**: the datasource driver factory builds an `mssql` datasource on `SqlDriver` with the `tedious` connection (`server`, `port`, `database`, `user`, the bound secret as password, `encrypt` / `trustServerCertificate` / `instanceName` from the config and the datasource `ssl` block), and reports `@@VERSION`. The `ssl` block's resolution moves, unchanged, to its own leaf module (`datasource-ssl-option.ts`).
16+
17+
Nothing existing changes for the other drivers.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the platform skill's Seed Data line no longer marks seed mode `replace` as data loss
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`replace` inserts every record with no match and deletes nothing, so a replay over a table nobody cleared leaves the existing rows as they are and adds the dataset's records again. The platform skill now says so (never deletes, duplicates), as the `SeedMode` comment and the data skill's seeds reference already did. The `PLATFORM_ALWAYS_ON_CAPABILITIES` comment in `@objectstack/spec` also says what `--preset minimal` still mounts: `job` and `queue` when `email`, `approvals` or `auth` is present, and `email` when `auth` is.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/service-settings': patch
3+
---
4+
5+
fix(service-settings): a `map` setting refuses every key when its key source answers an empty list
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 or re-shaped and no stored row is read differently: the narrowing is one runtime refusal at the settings save door and the OS_* env door, for a map key on a host whose key source answers no keys, and its remedy is to clear the value, so there is nothing for `objectstack migrate meta` to rewrite. A value already stored is not re-judged. -->
11+
12+
A `map` specifier's keys are judged against the key's option source (`registerOptionSource`), the list the running system answers, such as the lifecycle-declared objects for `lifecycle.quotas` and `lifecycle.retention_overrides`. When that source answered an empty list, the key check was skipped and any key was saved and put in force from `OS_*`. It now refuses each key with `invalid_option` at the save door and logs the override as not in force at the env door, as for any key the list does not hold. This narrows what is accepted: on a host with no lifecycle-declared object, a non-empty value for those keys, saved or set in `OS_LIFECYCLE_*`, was accepted before and is refused now; no such key could name an object the sweep reads. An empty map still saves. A key whose source could not answer, or which has no source, is still judged against its declared options and admits any key when it declares none.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/cli': patch
3+
'@objectstack/runtime': patch
4+
---
5+
6+
fix(cli,runtime): the organization-ownership refusal from `os start --home` / `-d` names the database it refused
7+
8+
Clause-②: yes (widening) — `@objectstack/runtime`'s published `OrganizationOwnershipBootGuardOptions` gains one optional member, `databaseUrl`, and the refusal's two ceremony commands carry `--database-url` when the boot's database came from `os start`'s `-d` or a `--home` home. What `os start`, `os serve` and `os migrate organization-ownership` accept or refuse is unchanged.
9+
Metadata-protocol: none
10+
11+
`os start` resolves its database with two inputs the ceremony never sees: its `-d` flag and its `--home` flag. When a boot on such a database was refused for its organization-ownership shape, the refusal printed `os migrate organization-ownership --out PLAN` (and the `--apply` command) with no database, so run as printed in the same directory the ceremony planned the project's own database, or found none ("holds none of the platform tables"), and the database that was refused stayed as it was. On a tree that also holds a pre-18 project database, the printed apply would have upgraded that one instead.
12+
13+
`os start` now hands its `serve` child, on an internal channel, the database it resolved whenever `-d` or a `--home` home chose it, and the boot guard names it in both commands: `os migrate organization-ownership --database-url file:/srv/os/home/data/objectstack.db --out PLAN`. A database the ceremony already reaches on its own (`$OS_DATABASE_URL`, the project's declared datasource, the project's `.objectstack` or an exported `$OS_HOME`) is named as before, with no `--database-url`.
14+
15+
A database URL that carries a credential (a password, or a token in its query) is never printed: the commands read it as `--database-url "${OS_DATABASE_URL:?…}"`, the refusal says to export it, and the shell stops with that message when the variable is unset rather than planning another database. `OrganizationOwnershipBootGuardOptions` (`@objectstack/runtime`) gains the optional `databaseUrl` that carries it.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/rest': patch
3+
---
4+
5+
fix(rest): `POST /api/v1/email/send` refuses a JSON array or `null` body with its own `400 INVALID_REQUEST` before the email service is reached
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The send door's body check read `typeof body !== 'object'`, which an array passes, and it defaulted a JSON `null` body to `{}`. Either way the message reached the email service, which refused it as a malformed message (`400 VALIDATION_FAILED`, "subject is required"). The door now admits a present body only when it is a plain JSON object, so an array or `null` gets the same `400 INVALID_REQUEST` ("JSON body required") as a string or a number, and the service is never called. A request with no body is still the empty message for the service to judge, and every object body is forwarded exactly as before. Both kinds of body were refused with a 400 before this change and are refused with a 400 after it; only the code changes, from the service's `VALIDATION_FAILED` to the route's `INVALID_REQUEST`.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/metadata-core': patch
3+
'@objectstack/cloud-connection': patch
4+
'@objectstack/spec': patch
5+
---
6+
7+
feat(metadata-core): export the schema upgrade verdict and its finding set token, so a host's install door forwards the platform's own verdict
8+
9+
Clause-②: yes (widening) — `@objectstack/metadata-core` gains exports and nothing else: `schemaUpgradeVerdict`, `installedRecordUnavailableVerdict`, `schemaUpgradeFindingSet`, `SCHEMA_UPGRADE_CONFIRMATION_REQUIRED`, `SCHEMA_UPGRADE_CONFIRMATION_STATUS`, `SCHEMA_UPGRADE_TOPIC`, `SCHEMA_UPGRADE_CONFIRMED_CATEGORIES` and the types `SchemaUpgradeFinding`, `SchemaUpgradeUnavailableFinding` and `SchemaUpgradeVerdict`. No request, answer, key or code changes on any door.
10+
Metadata-protocol: none
11+
12+
The verdict that decides which findings of a package upgrade plan stop a managed upgrade until the installer confirms them (a suspected rename; a type change in the `needs_confirm` or `destructive` drift category, on a declared rename too) and the token that confirmation must echo were private to the install-local door. They now live in `@objectstack/metadata-core` beside `comparePackageVersions`, and the install-local door imports them. A host that installs a package version from its own stored versions, such as the hosted control plane installing into an environment, applies the same rule and mints the same token, so the same pair of versions is refused with the same findings and the same token whichever door installs it.
13+
14+
- **`@objectstack/metadata-core`:** the exports above. `schemaUpgradeVerdict(packageId, plan)` answers `{ findings, findingSet }`; `installedRecordUnavailableVerdict(packageId, finding)` is the verdict of a door with no installed side to compare (one confirmable finding, never "no finding"), the finding's sentence being the door's own.
15+
- **`@objectstack/spec`:** one `PROVENANCE_WAIVERS` entry: `SCHEMA_UPGRADE_CONFIRMATION_REQUIRED` is now defined in metadata-core and still registered under `@objectstack/cloud-connection`, the package whose door puts it on the wire (the `UPDATE_ID_MISMATCH` shape). No row is added or moved.
16+
- **`@objectstack/cloud-connection`:** the install-local door's `409 SCHEMA_UPGRADE_CONFIRMATION_REQUIRED` refusal, its findings, its sentences and its token are unchanged. The token for a given plan is byte-identical before and after, pinned by a test with values the door's own digest minted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/runtime': patch
3+
---
4+
5+
fix(runtime): the environment-membership check reads the organization a session's resolution vetted
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On a multi-environment host, the dispatcher does not ask a caller acting in the platform organization for environment membership. For a caller a session cookie admitted, that organization is now the one the request's resolution vetted, the same one every other door reads. Callers an API key or an OAuth access token admitted are unchanged, and so are hosts without environment scoping and hosts that turn the check off (`api.enforceProjectMembership: false`).

0 commit comments

Comments
 (0)