Skip to content

Commit 997cb02

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-30103-rate-field-scale-floor
2 parents 08d3f67 + b6ae87c commit 997cb02

17 files changed

Lines changed: 2144 additions & 44 deletions
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+
fix(spec): an array in an analytics filter slot is refused once, and the refusal shows the object form
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A dashboard widget `filter`, a dataset or measure `filter`, or a report's `runtimeFilter` written as a list view's rule array (`[{ field: 'status', operator: 'in', value: ['new', 'in_progress'] }]`) used to fail `os validate` with two lines that contradicted each other and named no fix: `Expected record but received object.` and `Expected object but received object.`. It now fails with one `invalid_type` issue at the same path, saying that these slots take the condition object a query's `where` takes and showing it: `{ status: { $in: ['new', 'in_progress'] } }`.
11+
12+
Only the text changes, and the duplicate line goes. Every filter accepted before is accepted, every filter refused before is refused, and the published JSON Schema is unchanged.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/service-datasource': patch
3+
---
4+
5+
fix(service-datasource)!: an object imported from a package's external datasource is saved into that package, or into its customization package
6+
7+
Clause-②: yes (narrowing) — `POST /api/v1/datasources/:name/external/tables/:remote/import` (and the MCP `import_object` tool) now saves the object into the package that declares the datasource, or into that package's customization package `<base>.custom` when the package is read-only, and names it in that package's namespace. An explicit `name` in the read-only base's own namespace (`showcase_orders` over the showcase's `showcase_external`) is now refused with ADR-0028's message naming the pair-prefixed name (`showcase_custom_orders`); under a walled tenancy posture (`group`, `isolated`) an import that needs a customization package that does not exist yet is refused, naming the platform operator and the ensure door. `ExternalDatasourceServiceConfig` gains the optional `resolveImportLanding`, `persistObject` an optional third `packageId` argument, and the package exports the `ImportLanding` type.
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: the imported object's definition keeps its shape, and the import request and its answer keep theirs. What moves is which package the import door saves the object into and therefore which namespace its name carries; rows already stored are not rewritten, so there is nothing for a migration to rewrite. -->
11+
12+
**BREAKING** accept-set narrowing at the external-datasource import door (`@objectstack/service-datasource`), ruling B on where an imported object lives (ruling record 6660988968).
13+
14+
- **Where an import lands.** The datasource's owning package decides. A datasource no package declares (added in Setup) keeps today's answer: a package-less row, environment metadata that no package export carries (ADR-0146 D11). A datasource declared by a writable package saves the object into that package. A datasource declared by a read-only installed package (a booted code package or a marketplace install) saves it into that package's customization package `<base>.custom`, which the import obtains from the ensure door first (ADR-0146 D2/D3), so `os package export` and `GET /api/v1/packages/<base>.custom/export` carry it.
15+
- **The name it gets.** The save door judges the name against the package written into, so an import over a read-only package's datasource is named in the pair's namespace: the showcase's `customers` table imports as `showcase_custom_customers`, where it imported as `showcase_customers`. The draft door (`…/tables/:remote/draft`, the `*.object.ts` an author commits into the package's own source) still names it in the datasource package's namespace.
16+
- **Walled postures.** Under `group` and `isolated` the platform operator alone creates a customization package. The import never creates it: it saves into one that already exists, and while none does it is refused (`400 EXTERNAL_IMPORT_ERROR`) with a message naming the platform operator and `POST /api/v1/packages/<base>/ensure-customization`. It is never saved package-less instead.
17+
- **Objects imported before this release** stay where they are, package-less and under their old names. Importing the same table again makes a second object under the new name in the customization package; delete the old one once nothing points at it.

‎docs/qa/scenarios/README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,6 @@ meet this floor:
156156
1. Write `<id>.json` here; `id` equals the basename.
157157
2. Keep it generic — a scenario anyone could write from the domain alone.
158158
3. Run `pnpm --filter @objectstack/scenarios test`: a refusal names the file and the field
159-
path. Then add the card's hand-worked truths, per persona too, to `test/library.test.ts`.
159+
path. Then pin the card's hand-worked truths, per persona too, in its own
160+
`packages/qa/scenarios/test/<id>.test.ts` (model: `travel-expense.test.ts`). The three control
161+
cards keep theirs in `test/library.test.ts`.

0 commit comments

Comments
 (0)