Skip to content

Commit 1e495c2

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/area-E2-33386
2 parents e4729b3 + dd291b8 commit 1e495c2

316 files changed

Lines changed: 14375 additions & 1198 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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/objectql': patch
4+
---
5+
6+
feat(objectql, spec): a number or boolean comparand on a text- or option-family field compares as its string, the form the write door stores (#29486)
7+
8+
Clause-②: yes (widening) — a filter that compares a text-family field (`text`, `textarea`, `email`, `url`, `phone`, `password`, `markdown`, `html`, `richtext`, `code`, `signature`, `qrcode`) or an option-family field (`select`, `radio`, `multiselect`, `checkboxes`, `tags`) with a number or a boolean now matches the rows the write door stored for that value; before, it matched none on every driver, with no error.
9+
Metadata-protocol: semantic
10+
Skills-docs: `content/docs/deployment/cli.mdx` (`os migrate text-scalars`, `os migrate option-codes`) now says a filter on the number reads as the string. No `skills/**` page teaches how a filter reads a comparand on a text or option field.
11+
12+
Maintainer ruling A on #29486: a number or boolean comparand on a text- or option-family field compares as `String(value)`, the form the write side stores since #29241 (text) and #29562 (options).
13+
14+
**What answers differently.**
15+
16+
- `{ code: 42 }`, `{ code: { $in: [42, true] } }` and `{ stage: 3 }` against a `text` / `select` field written `42` / `3`: FROM no row (InMemoryDriver and SQLite measured) TO the rows written `42` or `"42"` (`3` or `"3"`). `$ne` / `$nin` FROM every row TO every row but those. `true` / `false` read as `"true"` / `"false"`, and a `bigint` within ±2^53 as the number it names.
17+
- A range is now a STRING range. `$gt` / `$gte` / `$lt` / `$lte` bounds and `$between` members are narrowed like any comparand, so a range on a text or option field compares strings in the column's order: `{ code: { $gt: 9 } }` does not match `"10"` (`"10"` < `"9"` as strings), and `{ code: { $between: [1, 10] } }` does not match `"5"` (`"5"` > `"10"`). Before, InMemoryDriver and MongoDB matched no row for a number bound (they do not order a number against a string), and SQLite compared by the column's affinity: measured, `{ $gt: 9 }` matched `"alpha"` and `{ $gt: 4, $lt: 5 }` matched `"5"` and `"42"`, where it now matches `"42"` alone. To range over numbers, declare the field as a number.
18+
- Every engine verb that collects a filter (`find`, `findOne`, `count`, `aggregate`, `update`, `delete`), both spellings of `where` (the object form and the `FilterArray` sugar), the per-aggregation `filter` and `having`, and every REST door that reaches them. The comparand is narrowed at the engine's field-aware filter seam, beside the number and boolean doors, so every driver receives the string.
19+
- Unchanged: a string comparand, `null` (the null test, never `"null"`), a `Date`, the text operators (`$contains: 42` is still refused), and every other field type. A scalar comparison on a multi-value option field is still refused by the drivers ("use `$contains`"); only the comparand they are handed changes.
20+
- Rows written before #29241 / #29562 and not yet migrated: a raw `42` on driver-memory with persistence matched `{ code: 42 }` and no longer does, as `{ code: "42" }` never did. Run `os migrate text-scalars --apply` and `os migrate option-codes --apply` (tracked in #29643).
21+
22+
**In-process APIs.** `@objectstack/spec/data` exports `stringStoredComparandDoorVerdict`, `stringStoredComparandFieldVerdict`, `STRING_STORED_COMPARAND_DOOR_FAMILIES`, `STRING_STORED_COMPARAND_DOOR_SCALAR_OPERATORS`, `STRING_STORED_COMPARAND_DOOR_LIST_OPERATORS`, the type `StringStoredComparandDoorFieldMeta` / `StringStoredComparandDoorVerdict`, and the cross-driver conformance table `FILTER_STRING_STORED_COMPARAND_CASES` with its fixture (`FILTER_STRING_STORED_COMPARAND_FIELDS`, `FILTER_STRING_STORED_COMPARAND_ROWS`, `StringStoredComparandRow`, `StringStoredComparandCase`). All additive.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
'@objectstack/rest': patch
4+
---
5+
6+
feat(plugin-audit, rest): a query of an opted-in saved dataset writes one `dataset_query` row in `sys_audit_log` (#31797)
7+
8+
Clause-②: yes (widening) — a new `sys_audit_log.action` value, `dataset_query`, with its writer; a new `AuditPlugin` option, `datasetQueryAudit` (`datasets`, `maxBatchSize`, `flushIntervalMs`); a new `recordDatasetQuery` member on the `audit` service slot; and new exports from `@objectstack/plugin-audit` (`createDatasetQueryAuditWriter`, `buildDatasetQueryAuditRow`, `DATASET_QUERY_AUDIT_ACTION` and their types). `createReadAuditBatcher` takes an optional event type parameter and an optional `overflowMessage`, both defaulting to what it did before. No door answers differently: with no dataset named, nothing is recorded or buffered.
9+
Metadata-protocol: none
10+
Skills-docs: none — no file under `skills/**` teaches the audit ledger's actions or `AuditPlugin`'s options; `content/docs/permissions/record-view-auditing.mdx` gains a "Dataset queries" section.
11+
12+
**What a deployment gets.** Name saved datasets in `new AuditPlugin({ datasetQueryAudit: { datasets: [...] } })` and each query of one through `POST /analytics/dataset/query`, or through each query of its batch door, writes one run-level row: the caller (`user_id`, `actor`, `tenant_id`), the dataset's base object in `object_name`, and in `metadata` the dataset name, the package holding it (`dataset_package`, `null` for the environment's own definition; a name in `datasets` covers every holder of that name), `preview: true` when a draft definition was read, the dimensions and measures selected, the filtered field names and operators (never the values), the row count and the outcome. A report or dashboard is composed in the browser, so the row names the dataset, not a report.
13+
14+
**The rules.** Off by default and opted in per saved dataset; an inline definition (the Studio preview) writes no row. A request the door refuses before the read writes no row; a query that fails after the read started writes one row with outcome `failed`, the HTTP status and the error's machine code, never the error's text. Rows are written in batches off the request path, stamped with the query's instant, and a lost batch is reported at `error` once per cause.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
'@objectstack/cli': patch
4+
---
5+
6+
fix(plugin-audit, cli): the audit sealer skips only the chain a chain-local fault belongs to; `os serve` hands its crypto provider to an AuditPlugin the app composed with none
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
**The sealer (ADR-0154 D3, S4).** A fault that belongs to one chain of a sealed object — a row a canonical rule refuses, or a malformed checkpoint of that chain (its head among them) — now skips that chain for the rest of the pass instead of stopping the whole object. Every other chain is still sealed. Each chain now resumes from its own oldest unsealed window, as `window` checkpoints, so a skipped chain catches up once its fault is fixed. No checkpoint's `sealed_through` passes a window a skipped chain leaves unsealed. The sealer reports each skipped chain once at `error`, naming the object, the chain, the fault and the window it is unsealed from, and again each hour while it lasts. A lock lapse, a signer, crypto-provider or storage fault still stops the object's pass, as before. `os audit verify` reads the skipped chain's rows in a window another chain sealed as `late` and unsealed, and fails.
12+
13+
**An app-supplied AuditPlugin (ADR-0154 D2, D6).** An app that puts its own `AuditPlugin` in its stack `plugins` (to turn on `readAudit`, for example) supersedes the one `os serve` composes, and so lost the host's crypto provider: its sealer sealed nothing and said so at `error`. `os serve` now hands it the host's provider when the app composed it with no `cryptoProvider`, and keeps its sealer off on an `OS_MIGRATE_AND_EXIT=1` boot, as for the instance it composes itself. A provider the app composed is never replaced, an app's `armSealer: false` stays off, and a plugin that only carries the AuditPlugin name is never handed anything. The new `AuditPlugin.adoptHostCryptoProvider(provider, { armSealer })` is the method a host calls to do this.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/core': patch
3+
---
4+
5+
fix(core): a release artifact entry wrapped correctly whose content is refused ends its refusal on that content refusal, not on advice about the wrapper or about glob patterns
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`resolveArtifactPackageEntries` (ADR-0130 D4) refuses a `packages[]` entry as `INVALID_ARTIFACT_PACKAGE_ENTRY` / `422` and quotes the entry's parse issues. It used to append the same two pieces of advice to every such refusal: wrap an inlined body as `{ manifest: { … } }`, and the body holds definitions, not the authoring manifest's glob patterns. So an entry wrapped correctly whose record page places no component, whose `manifest.id` is invalid or whose body carries an undeclared key pointed its author at the wrapper and at globs, away from the one thing to fix.
11+
12+
The advice now follows the issue it answers. The wrapper advice is given when the entry itself is not an object or carries keys beside `manifest` / `source` (an inlined body), or when its `manifest` is missing or not an object. The assembled-body advice is given when `manifest.objects` or `manifest.datasources` (or an element of either) holds a string. Any other refusal ends on the quoted issues and, when issues are withheld, their count. A quoted issue that already ends on a period is no longer followed by a second one. The error code, the status, the leading sentence and the quoted issues are unchanged, and so is what is refused.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/objectql': patch
4+
'@objectstack/metadata-protocol': patch
5+
---
6+
7+
docs(spec, objectql, metadata-protocol): the transaction docblocks no longer say the in-memory driver cannot roll back
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
TSDoc only; no behaviour, type or export changes. The edited docblocks land in the shipped `dist/*.d.ts` (and `@objectstack/spec` ships `src/**/*.zod.ts` itself), so they publish:
13+
14+
- `driverSupportsTransactions` (`@objectstack/spec`): the in-memory driver is no longer listed among drivers with no `beginTransaction`; it implements `beginTransaction` / `rollback` by snapshotting its whole store.
15+
- `EngineTransactionOptions.require` (`@objectstack/spec`): the callers the no-transaction degrade suits are test doubles; the in-memory driver is no longer named among them, since it implements `beginTransaction`.
16+
- `ObjectQL.transaction` (`@objectstack/objectql`) and `SysMetadataEngine.transaction` (`@objectstack/metadata-protocol`): the drivers that cannot roll back are a test double with no `beginTransaction` and those declaring `supports.transactionsUnsupported` (remote Turso, OData). The in-memory driver does roll back, restoring the whole store to its state at begin: no isolation, and a rollback also discards what other callers wrote since that begin, so do not rely on it with concurrent writers.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
'@object-ui/data-objectstack': patch
5+
---
6+
7+
fix(console): a metadata save's advisories and refusals show the server's sentence in the user's language
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
**Advisory toast.** After a save or publish, each advisory finding that carries a `userMessage` (the sentence the server composes for the person who saved, in the request's language, else the workspace default, else English) shows that sentence after its rule id and location, in place of the developer-facing English `message` and `hint`. A finding the server wrote no sentence for keeps the `message` and `hint`.
13+
14+
**Refused save.** The issues of a `422` refusal from the runtime authoring gate carry the same `userMessage`. `formatMetadataIssue` (and so `formatMetadataError` and the Studio publish-failure list) shows it after the issue's path in place of the English `message`, and Studio's refusal sentence carries it verbatim instead of reading the English `message` through the console's own validation-message table. A spec-validation issue carries no `userMessage` and is shown as before.
15+
16+
**Type.** `MetadataValidationIssue` on `@object-ui/data-objectstack` gains the optional `userMessage`, typed from `RuntimeAuthoringIssue['userMessage']` in `@objectstack/spec/api`.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
'@objectstack/plugin-email': patch
3+
---
4+
5+
fix(plugin-email)!: the email template send judges the served holders, so a disabled package holds no name at the send (ADR-0150 D3)
6+
7+
Clause-②: yes (narrowing) — widened: a send of a template name an enabled and a disabled package hold, made with no package or from a caller whose closure holds both, is served the enabled holder's template where it was refused naming both. Narrowed: a send that only a disabled holder's side answered (its customization pair's row, a dependent's added locale, the environment's item or a package-less stored row beside a name only it holds) finds no template; a send of an auth name whose one overriding package is disabled is served the built-in copy. Refusals name only the packages that serve the name. With no holder of the name disabled, every answer is unchanged.
8+
Metadata-protocol: none
9+
Skills-docs: none — no skill under `skills/**` and no page under `content/docs/**` teaches what an email template send answers when a package holding the name is disabled.
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) every moved answer follows a package's enabled state, which the operator flips back with the enable door; no authored key, stored row or export changes -->
12+
13+
**BREAKING** for a send of an email template (`createRegistryEmailTemplateLoader`: the `sendTemplate` path and a flow's `notify` delivery) of a name a disabled package holds. Before, the send counted every holder, a disabled package's included: a disabled package was still the answer, and a refusal still named it. Now, when a holder of the name is disabled, the name is resolved over the served holders, and the bundle is read only where no member of a disabled holder's side is listed: the resolved holder's own address, or the built-ins' own address. A caller whose own holding is the disabled one, or that no served holder answers, finds no template. With no holder disabled, every read is the one it was.
14+
15+
Why the read is chosen and never filtered: the environment-wide execution list keeps a disabled holder's customization-pair rows and a dependent's added locales listed, and an item's `_packageId` there is the slot it fills, not the package that stores it (a pair row filling a dependent's locale wears the dependent's id; the environment's item over a disabled holder's slot wears the disabled holder's), so no member can be told apart after the read.
16+
17+
**Every moved answer, before → after.** Holders ALPHA and BETA; ALPHA's pair `ALPHA.custom` stores a member row; ADDER depends on ALPHA only and adds a locale. Both registration orders, the protocol's read and the registry's own read. First-party count 0: no first-party composition ships an email template name two packages hold, or disables a package that holds one.
18+
19+
Widening:
20+
21+
- Row 27. Two holders, one disabled, a send with no package (omitted or `null`): 409 naming both → the enabled holder's address (its template; a locale only the disabled side carries finds no template).
22+
- Row 28. The same, from a caller whose closure holds both: 409 naming both → the enabled holder's address.
23+
24+
Refused, the disabled package no longer named:
25+
26+
- Row 29. Two holders, one disabled, a caller whose closure reaches the name only through the disabled holder (a dependent of it included): no template, or the disabled holder's pair row → 409 `outside-closure` naming the enabled holder.
27+
- Row 30. Two holders, one disabled, a caller that reaches neither (the built-in package as caller included): 409 `outside-closure` naming both → naming the enabled holder.
28+
29+
Served or refused → no template:
30+
31+
- Row 31. Every holder disabled, every caller: 409 naming them, or the pair's row → no template.
32+
- Row 36. Two holders, the disabled holder's own send: its pair's row → no template.
33+
- Row 37. One holder, disabled, every caller: the environment's item, a package-less stored row, ADDER's locale or the pair's row (the environment-wide list), or 409 `outside-closure` naming it for a caller with no path → no template.
34+
35+
Re-targeted to the built-in copy:
36+
37+
- Row 38. An auth name (`auth.*`, platform-requested) whose one overriding package is disabled: every caller but that package → the built-ins' own address (the built-in template, or a package-less stored row there), where the environment-wide list sent the disabled package's side; ADDER's send, refused naming ADDER and the package → the same; the package's own send → no template.
38+
39+
**Not moved.** A send of a name none of whose holders is disabled; a disabled dependent's addition beside enabled holders (the address it was read at already left it out); the enabled holder's own send beside a disabled holder (read at its address, as before, so its own pair row and a package-less stored row there are still its customization). The metadata reads (`/meta`, `?package=`, `_env`) and the lists are not touched.
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): a stored computed field reads only its own row; the skills name the cross-record and volatile-input warnings
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The three places the published skills tell an agent to move a `formula`'s `expression` onto a stored field now say what that field may read. `objectstack-data` → Relationships → Computed column owns the sentence: a stored computed field reads only its own row; a related record's value (`record.product.unit_price`) keeps what it held at the row's last write and draws the `stored-expression-cross-record-input` warning, so it stays a `formula` (read time, not totallable) or becomes a snapshot a flow on the related object writes, and a field left stored is repaired by `os migrate stored-expressions --object OBJECT --field FIELD --changed --apply`; the clock (`now()`, `today()`, `daysFromNow()`, `daysAgo()`), the acting user, `can()` and `hasCapability()` are fixed at the write and draw `stored-expression-volatile-input`; a `formula` keeps them current, and for the clock a scheduled flow does too. The `formula` row in `rules/field-types.md` and the total-over-a-computed-value bullet in `objectstack-ui` `rules/dashboards.md` point to it. The dashboards bullet also stops saying existing rows have no backfill: rows a publish did not fill are filled by `os migrate stored-expressions --apply`. Both rules are warnings, not refusals; no schema or runtime change.

0 commit comments

Comments
 (0)