You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5620dd9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(lint)!: a roll-up summary whose `summaryOperations.filter` names a key its child object lacks is refused at build and publish (`object-field-ref-unknown`), because every child write then fails its recompute
6
+
7
+
Clause-②: no (narrowing) — `os validate`, `os build`, `os lint` and the object save and publish doors refuse a summary field they accepted before. No export is added: the position joins the existing `object-field-ref-unknown` rule.
8
+
Metadata-protocol: narrowed
9
+
Skills-docs: none — `skills/**` and `content/docs/**` teach `summaryOperations.filter` keys that are fields of the child object, which this rule accepts. The reasoning ships in the `os explain object-field-ref-unknown` entry.
10
+
11
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed or renamed: summaryOperations.filter keeps its shape and meaning, and lint now judges its keys against the child object the way lookupFilters[].field is judged against the referenced one. A refused key never filtered what the author meant (every child write answered a recompute failure and the summary stayed stale), so there is no rewrite that keeps the author's intent: the author names a real child field, and the verdict names the nearest one. -->
12
+
13
+
**BREAKING** accept-set narrowing in `os validate` / `os build` / `os lint` and at the object save and publish doors (`PUT /api/v1/meta/object/NAME` live save, the per-item and package publish; Studio, REST and MCP authors), through the `object-field-ref-unknown` rule.
14
+
15
+
-**Before.** A summary field with `summaryOperations: { object: 'invoice_line', function: 'sum', field: 'amount', filter: { stauts: 'paid' } }` parsed, built and published. The engine runs the filter as the `where` of an aggregate on the child, ANDed with the parent-FK match. Measured on a real `SqlDriver` (better-sqlite3): every insert of a child row then answered `SummaryRecomputeError` ("the triggering records WERE written"), and the summary kept a stale value.
16
+
-**Now.** Each key the child lacks is refused `error` at `objects[i].fields.FIELD.summaryOperations.filter.KEY`, naming the key, the child object and the nearest field ("Did you mean"). Keys inside `$and` / `$or` / `$not` groups are judged too. Three more shapes the recompute query refuses are refused the same way, each measured on the same driver as a `SummaryRecomputeError` on every child insert:
17
+
- a dotted key such as `account.status`: the cure is the nested one-level form the query serves, `{ account: { status: VALUE } }`;
18
+
- a child field computed on read, such as a `formula`: denormalise it onto the child as a stored field;
19
+
- beneath a relation, a key the related object lacks, a dotted key, a second relation holding a condition of its own, or an empty condition. The nested form reaches one level.
20
+
-**Accepted.** Child fields with any operator, and the nested one-level relation form `{ relation: { field: VALUE } }` over fields of the related object.
21
+
-**Not judged.** A child object the stack does not define, a child with no readable field map, and a registry-injected system column (resolved per object), the same skips every position of this rule takes.
22
+
23
+
**What an author does.** Nothing for a filter whose keys are fields of the child object. For a refused key: name the child field you meant (the verdict suggests the nearest one), or drop the key.
fix(mcp): `run_action` and `resume_run` answer a thrown error the way `POST /api/v1/actions` does, through that door's one reader
8
+
9
+
Clause-②: yes (widening)
10
+
Metadata-protocol: none
11
+
12
+
MCP `run_action` and `resume_run` answered an error thrown while running an action differently from `POST /api/v1/actions/:object/:action`, which runs the same action:
13
+
14
+
| The action threw | MCP answered |`/actions` answers, and MCP now answers |
15
+
| --- | --- | --- |
16
+
| A sandboxed body's own `throw new Error('Not enough leave')`| the runner's wrapper as bare text, naming the body: `action 'NAME' threw: Error: Not enough leave`|`400`, `HOOK_ABORTED`, `Not enough leave`|
17
+
| A plain `Error`| its bare text, no code |`400`, `VALIDATION_ERROR`, its own sentence |
18
+
| A driver error with a string code (`SQLITE_BUSY`) |`{ code: 'SQLITE_BUSY', message }`, no status |`400`, `VALIDATION_ERROR`, `declaredCode: 'SQLITE_BUSY'`|
19
+
| A sandboxed body that crashed (`TypeError`), with or without a declared code | the wrapper with the native error text |`500`, `INTERNAL_ERROR`, `Internal server error`|
20
+
21
+
The tool error is `{ "error": { "code", "message", "status" } }` with `isError`, plus `declaredCode` and `userMessage` when the door serves them. The full wrapper and the fault line are logged on the server, as the door logs them. A refusal with a registered code (a body that throws `{ code: 'RECORD_LOCKED', status: 409 }`) keeps its code, its own sentence and its status. A refusal with an app's own unregistered code (`{ code: 'LEAVE_EXHAUSTED', status: 409 }`) now crosses as `/actions` serves it: the closed code its status derives (`RESOURCE_CONFLICT`), with `declaredCode: 'LEAVE_EXHAUSTED'` beside it; MCP used to answer `code: 'LEAVE_EXHAUSTED'`. A thrown `details` (the confirmation gate's) still rides on a refusal and is no longer served on a fault (status 500 and above), which answers only the door's sanitised envelope; the `PERMISSION_DENIED` withhold is unchanged. This supersedes the line in the `31218` changeset that says `run_action` and `resume_run` are unchanged.
22
+
23
+
A driver string code answers what `/actions` answers. `/api/v1/data` answers the same throw `500 DATABASE_ERROR`; that difference between the two REST doors is not changed here.
24
+
25
+
**New export (`@objectstack/types`): `actionsDoorAnswerOf(err, objectName?)` and its `ActionsDoorAnswer` type**, the `/api/v1/actions` door's answer to a thrown value, beside `mapDataError` (the `/api/v1/data` door's). The `/actions` door (`@objectstack/runtime`) now answers through it; its responses are unchanged byte for byte.
docs(spec): the `ValidationRule``condition` example guards its nullable `amount` comparison with `record.amount != null`
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The publish-time null-guard rule refuses an ordering or arithmetic operator on a declared-nullable field in a validation `condition` unless an explicit `!= null` test guards it. The `condition``.describe()` text compared `record.amount` without one; it now reads `record.amount != null && record.amount < 0`, and the generated `content/docs/references/data/validation.mdx` rows follow. The two doc-comment examples in the same file (the `cross_field` discount limit and the `conditional` enterprise rule) get the same guard.
11
+
12
+
The spec change is description and doc-comment text only: no schema shape changes, and no accept set moves.
fix(cli): `os serve` names an unloaded `devPlugins` entry by the list it was written in
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
When `os serve --dev` refuses to boot because an entry that may provide the crypto provider (`crypto-provider`) did not load, a `devPlugins` entry is now named `devPlugins[i]` instead of by its position after the stack's `plugins`. Which entries are refused is unchanged: the refusal reads an entry's `providesServices` through the same predicate as the rest of the crypto-provider checks.
Copy file name to clipboardExpand all lines: content/docs/automation/flows.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2470,7 +2470,7 @@ placeholder such as `{today}` among them, which the query engine resolves.
2470
2470
2471
2471
| Where | Dialect | Write it like | Bindings |
2472
2472
|:---|:---|:---|:---|
2473
-
| Start-node `condition`|**CEL** (bare, no braces) |`record.amount > 500`|`record.*`, `previous.*`, bare field names, `vars.*`, `current_user`|
2473
+
| Start-node `condition`|**CEL** (bare, no braces) |`record.amount != null && record.amount > 500`|`record.*`, `previous.*`, bare field names, `vars.*`, `current_user`|
2474
2474
| Edge `condition`|**CEL** (bare, no braces) |`record.status == 'open'`| same as above |
2475
2475
| Decision-node `conditions[].expression`|**CEL** (bare, no braces) |`order_amount > 10000`| flow variables by name, `vars.*` and `current_user`|
2476
2476
| Field values and assignment values, as a **literal**| none — written as it is |`'open'`, `42`, `true`, `['a', 'b']`| — (a `{…}` template token is refused here since [#19939](https://github.com/objectstack-ai/objectstack/issues/19939), `{$User.*}` and the date macros `{NOW()}` / `{TODAY() ± N}` included: a date is `isoDate(today())` / `isoDatetime(now())` in an envelope) |
Hook `condition` is a **separate field with a different envelope** — a bare CEL string, or `{ dialect: 'cel', source }` (`ExpressionInputSchema` in `packages/spec/src/shared/expression.zod.ts`), not a `{ language, source }` body. e.g. `condition: 'record.status == "open" && record.amount > 1000'`.
74
+
Hook `condition` is a **separate field with a different envelope** — a bare CEL string, or `{ dialect: 'cel', source }` (`ExpressionInputSchema` in `packages/spec/src/shared/expression.zod.ts`), not a `{ language, source }` body. e.g. `condition: 'record.status == "open" && record.amount != null && record.amount > 1000'`.
75
75
76
76
Both forms are evaluated by the same formula engine that powers field formulas — see [Formula Reference](/docs/data-modeling/formulas).
Copy file name to clipboardExpand all lines: content/docs/deployment/cli.mdx
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3242,6 +3242,7 @@ is its production, so a deploy is always a deliberate act.
3242
3242
| `-s, --server <url>` | `OS_CLOUD_URL` | Control-plane URL. Default `https://cloud.objectos.ai`, or the URL recorded by `os cloud login` |
3243
3243
| `-t, --token <key>` | `OS_CLOUD_API_KEY` | Bearer token; `$OS_TOKEN` and `~/.objectstack/cloud.json` are the fallbacks |
3244
3244
| `--confirm-access-upgrade <token>` | — | Self-hosted target only: confirm the upgrade's access findings with the finding-set token the runtime's refusal printed (as [`os package install`](#os-package-install)). Refused when the target is ObjectOS Cloud |
3245
+
| `--confirm-upgrade <token>` | — | Self-hosted target only: confirm the upgrade's schema findings (a suspected rename, a type change that is not safe) with the finding-set token the runtime's refusal printed (as [`os package install`](#os-package-install)). Refused when the target is ObjectOS Cloud |
3245
3246
3246
3247
`os package publish` stays the command for a **release**: it publishes the
3247
3248
version the manifest declares, with `--install` optional.
@@ -3262,12 +3263,17 @@ answers are the ones printed.
3262
3263
build is printed; nothing is installed. A runtime that refuses it, or does not
3263
3264
serve install-local, stops the deploy with exit `1`. A runtime that predates the
3264
3265
dry run ignores it and installs: the command says so and exits `1`.
3265
-
3. **Install** — with `--confirm-access-upgrade` passed through. The endpoint's
3266
-
refusals (an access upgrade to confirm, a package the running kernel cannot
3267
-
register, …) stop the deploy with exit `1`.
3266
+
3. **Install** — with `--confirm-access-upgrade` and `--confirm-upgrade` passed
3267
+
through. The endpoint's refusals (an access upgrade to confirm, a schema
3268
+
upgrade to confirm, a package the running kernel cannot register, …) stop the
3269
+
deploy with exit `1`. An upgrade refusal prints its retry as
3270
+
`os deploy --confirm-access-upgrade <token>`for access findings or
0 commit comments