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 3b8da3e
Browse filesBrowse the repository at this point in the historyBrowse files
feat(automation): `IAutomationService.dryRun` runs an unpublished flow definition once, unarmed, as a named user
10
+
11
+
Clause-②: yes (widening) — `AutomationEngine.dryRun` admits a `runAs: 'system'` self-triggered draft for the named user (ruling B); `@objectstack/core` exports the shared flow-start rules (`aiAccountElevatedStartRefusal`, `requiredPermissionsStartRefusal`, `requiredPermissionsRefusal`, `missingCapabilities`, `isAiServiceAccount`, `AI_ACCOUNT_ELEVATED_START_REFUSAL`, `FlowStartPermissionRefusal`); plugin-security's registered `security` service serves `canWriteObject`
12
+
Metadata-protocol: none
13
+
14
+
The automation service now implements `dryRun(definition, { userId, record, … })`, the method the `IAutomationService` contract declares. A dry run admits the definition by the checks `registerFlow` asks, then by the rules that admit a start by name, and then runs it once against the supplied record as the named user. It registers nothing and arms no trigger, and it writes, sends and pauses nothing:
15
+
16
+
- Record writes (`create_record`, `update_record`, `delete_record`) are simulated. The step shows the values the run would write and a placeholder id for a new record. The named user's object-level write permission is judged as allowed, refused or not judged. A later read by id in the same run sees the simulated row.
17
+
- Routing and computing nodes (`assignment`, `decision`, gateways, loops, parallel branches, try/catch) run on the engine's own executors. A decision step shows the branch taken and the expressions it evaluated.
18
+
- Outbound nodes (`http`, email and the like) are never executed. The step shows the payload they would send.
19
+
- The run stops at a node that pauses (`approval`, `wait`, `screen`, a subflow) and names why. A node type the dry run cannot simulate stops it as `not_simulated`.
20
+
21
+
Under maintainer ruling B (record 6917953931), a draft declaring `runAs: 'system'` whose type starts on its own trigger is admitted to a dry run for the named user, and the run is never elevated. The contract's admission text says so. A by-name start of a published flow keeps refusing such a flow.
22
+
23
+
The AI service account rule and the flow's own `requiredPermissions` rule now live in `@objectstack/core`. The by-name start doors and the dry run both ask that one copy. `@objectstack/runtime` re-exports every symbol under the name it had. The registered `security` service now also exposes `canWriteObject`, so a dry run can judge a write without performing it.
Copy file name to clipboardExpand all lines: .changeset/33792-cross-object-orphan-native.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ Metadata-protocol: none
11
11
12
12
**BREAKING** for a reader of an analytics answer served by the native SQL strategy (a cube or dataset query with no bucketed time dimension, on a SQL datasource) that reads a related object's field through a relationship path (`'order.status'`) in any of the three filter positions one compile serves: the query's `where`, a measure's own `filter` (its conditional aggregate) and the dataset's own `filter`:
13
13
14
-
- FROM: a detail row whose relation field is empty, or names no existing record, was selected by `$ne`, `$nin`, `$notContains`, `$null: true`, `$eq: null`, `$exists: false` and `$empty: true` on the related field, because the `LEFT JOIN` read every related column of such a row as NULL. So the same widget answered a different total once a time bucket sent it to the engine path. TO: such a leaf is evaluated on an existing parent (the last hop's `id = id` is conjoined to it, through every hop of the path: TRUE for an existing parent, UNKNOWN for none, so a `$not` cannot flip it), and outside `$not` no such row is selected by those operators. Under `$not` the native answer is the one it gave before. The native, engine and `/data` answers agree on those operators.
14
+
- FROM: a detail row whose relation field is empty, or names no existing record, was selected by `$ne`, `$nin`, `$notContains`, `$null: true`, `$eq: null`, `$exists: false` and `$empty: true` on the related field, because the `LEFT JOIN` read every related column of such a row as NULL. So the same widget answered a different total once a time bucket sent it to the engine path. TO: such a leaf is evaluated on an existing parent (the last hop's `id = id` is conjoined to it, through every hop of the path: TRUE for an existing parent, UNKNOWN for none, so a `$not` cannot flip it), and outside `$not` no such row is selected by those operators. Under one `$not` the native answer is the one it gave before. Under two, `{ $not: { $not: { 'order.status': { $null: true } } } }`, the two negations now cancel and the answer is the un-negated condition's, so such a row is no longer selected there either, where it was before. The native, engine and `/data` answers agree on those operators.
15
15
16
-
**Not moved.** A parent that exists with no value in the field still satisfies `$ne`, `$nin`, `$notContains` and `$null: true`. A positive operator (`$eq` a value, `$in`, `$gt`, `$contains`, …) selected no such row before either, and its statement is unchanged. A leaf on the base relation field itself (`{ order: { $null: true } }`) reads no join and is unchanged. Two native-path answers still select such a row, unchanged by this release: a positive comparison under `$not`(`{ $not: { 'order.status': 'open' } }`, a shape the engine path refuses; write `$ne` / `$nin` inside the condition instead), and `$nin: []`, which folds to the constant TRUE and selects every row, where the engine path leaves such rows out.
16
+
**Not moved.** A parent that exists with no value in the field still satisfies `$ne`, `$nin`, `$notContains` and `$null: true`. A positive operator (`$eq` a value, `$in`, `$gt`, `$contains`, …) selected no such row before either, and its statement is unchanged. A leaf on the base relation field itself (`{ order: { $null: true } }`) reads no join and is unchanged. One native-path answer still selects such a row, unchanged by this release: under one `$not`, any condition a missing value does not satisfy, such as a comparison with a value (`{ $not: { 'order.status': 'open' } }`) or a presence test (`$null: false`, `$exists: true`, `$ne: null`, `$empty: false`), a shape the engine path refuses; write `$ne` / `$nin` inside the condition instead.
17
17
18
18
The fix for an author who wants the rows with an empty relation: OR the base relation field in, `{ $or: [{ 'order.status': { $ne: 'open' } }, { order: { $null: true } }] }`. A row naming a record that no longer exists is not brought back by it, on either path.
feat(spec): the Ask data tools' `source` block can state that no row restriction applied (`scope: 'all_records'`)
6
+
7
+
Clause-②: yes (widening) — `ObjectQuerySourceSchema.scope` accepts a second value, `'all_records'`, beside `'visible_to_you'`; it stays required and closed, and every block that parsed before parses the same
8
+
Metadata-protocol: added
9
+
10
+
`ObjectQuerySourceSchema.scope` (`@objectstack/spec/ai`) is now a closed, required enum of two values. Both are judged by the producer per call from `ISecurityService.getReadFilter(object, ctx)` for the caller and the object the figures were read from, under the context the read ran under:
11
+
12
+
-`'visible_to_you'`: a row restriction applied, so the figures cover only the records the caller may read. The organization wall counts as one: under the `isolated` and `group` tenancy postures an organization owner reads `'visible_to_you'` on every object that carries `organization_id`.
13
+
-`'all_records'`: only when that call resolved to `undefined`, so no row restriction applied. For a caller no row rule or sharing narrows, that is the `single` posture, an object outside tenancy, a platform admin crossing the wall, or a system context.
14
+
15
+
An absent security service, an absent `getReadFilter`, a call that throws or rejects, or a call made under another context than the read's own states `'visible_to_you'`. "A restriction applied" is the fact the value states; it is not a count of rows the caller could not see. The value speaks for the block's `object` only, not for its `related` lookup paths. A block without `scope`, or with any other value, is still refused.
16
+
17
+
Before this, `scope` had one value and every answer carried it, so the console's "How this was computed" block told every caller, an organization owner on a `single` deployment included, that the figures covered only the records visible to them. The console reader already draws its access line ("Only records visible to you") for `'visible_to_you'` only, so a block whose scope is `'all_records'` now draws without that line. A reader that switches on `scope` handles the new value; a reader that ignores it needs nothing.
feat(plugin-audit): an audit checkpoint signer can sign ES256 beside Ed25519, and a host signer that takes over pins the local keys
7
+
8
+
Clause-②: yes (widening)
9
+
Metadata-protocol: none
10
+
11
+
A host `audit.checkpointSigner` whose KMS cannot sign Ed25519 (Azure Key Vault signs EC and RSA keys only) can now sign **ES256** (ECDSA on P-256 with SHA-256). The live check of `os audit verify`, the redaction amendment writer and the offline check of a proof bundle (`--bundle --trusted-key`) all verify it (ADR-0154 D4 and D6, amended).
12
+
13
+
-**The trusted key's type decides the algorithm.** A record carries no algorithm field. The public key a signer's `trustedPublicKey` answers is either an Ed25519 key's raw 32 bytes (unchanged) or an ES256 key's DER SubjectPublicKeyInfo, P-256, point uncompressed. The key id is the lowercase hex SHA-256 of exactly those bytes.
14
+
-**An ES256 signature is `r || s`, 64 bytes** (IEEE P1363, the JWS form). A signer whose KMS returns DER (AWS KMS, Vault transit by default) converts it before returning. A DER signature does not verify.
15
+
-**Fails closed.** Any other key type, curve or encoding is untrusted: P-384, RSA, a compressed point, an Ed25519 key in SPKI form. So is a key whose bytes do not hash to the id it was asked under. What such a key signed reads `untrusted_key`. The id check applies to every anchor. The local signer already answers only keys that hash to their id, so no Ed25519 chain changes.
16
+
-**Unchanged:** Ed25519 key ids, the local signer (Ed25519) and the proof bundle format (`objectstack.audit.proof-bundle.v1`). Every chain sealed before this release verifies as before. An older CLI reads an ES256 key in a bundle as untrusted.
17
+
18
+
**Switching to a host signer.** A registered host signer is the only trust anchor: the local key's derivation is not asked. Before the switch, run `os audit verify --out FILE`. The bundle's `keys` lists each trusted fingerprint with its public key. The host signer's `trustedPublicKey` must answer for exactly those fingerprints beside its own key. If it does, every checkpoint the local key signed stays trusted. If it does not, they all read `untrusted_key`. The `IAuditCheckpointSigner` docblocks in `@objectstack/spec/contracts` state both rules.
docs(skills): an `async` after-hook on a write event starts after the commit and is dropped on rollback; an `async``afterFind` starts at dispatch
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
`skills/objectstack-data/references/data-hooks.md`, the **Transaction** row of Before vs After Hooks: an `async: true` hook on `afterInsert` / `afterUpdate` / `afterDelete` starts once the outermost transaction commits and never runs if it rolls back, a failed commit included; on `afterFind` it starts as the read is dispatched; outside a transaction it starts at once. The row used to say "in the background, after commit" for every event and did not say the hook is dropped on rollback. Best Practices gains one DON'T: do not react to a refused or rolled-back write from an `async: true` hook, which never runs then; use a sync hook, whose `ctx.api` writes roll back with the write, or record it in the caller, where the write is made. Two eval cases exercise it: a background `afterInsert` that must not announce an order that did not survive, and a request for a background hook that records a failed insert. The file pays by dropping three restatements (the "Update by id" paragraph, which repeated its row of the `ctx.api.object` method table; the sentence above the `body` vs `handler` table, which repeated the table; and the closing sentence of the `findOne` note, which repeated its opening paragraph), so its token ceiling does not move. No schema or runtime change.
docs(skills): `objectstack-data` teaches the `lookupFilters``{ $record }` reference and `orEmpty`
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
objectstack-data's `rules/field-types.md` now teaches a lookup filter that reads the record being edited. A `lookupFilters` value may be `{ $record: 'field' }`, or one lookup hop away, `{ $record: 'lookup_field.field' }` (at most one dot). It is the whole `value`, never a member of an `in` / `notIn` list, and pairs only with `eq`, `ne`, `gt`, `lt`, `gte`, `lte`. Only a record form resolves it; every other picker host leaves the entry out, and while the referenced value is empty the entry is dropped. `orEmpty: true` also matches a candidate whose column is null, with the same six operators. The picker re-queries when a referenced field changes, so that field is not also listed in `dependsOn`, which would add an equality filter on it. The section's example is now a quote's price-book lookup.
11
+
12
+
Five restatements in the same file are cut to pay for part of it (the `secret` row's recommendation, which the `password` row states; the `autonumber` row's token summary and second format example, which the Autonumber section carries; and two repeats of "pad width is a minimum"). The data-modeling docs pages `relationships.mdx` and `fields.mdx` teach the same four points.
fix(service-analytics)!: on the native SQL strategy, an empty `$nin` on a related field no longer selects a detail row with no parent, as on the engine path and `/data`
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, renamed or re-shaped, and no export changes shape. The moved answer is an aggregate over a cross-object filter written with an empty $nin, which now leaves out the detail rows with no parent, as the engine path and the /data nested-relation filter already did: no stored row, registry key or authored value changes, so there is nothing for a migration to rewrite and no tombstone. -->
11
+
12
+
**BREAKING** for a reader of an analytics answer served by the native SQL strategy (a cube or dataset query with no bucketed time dimension, on a SQL datasource) whose filter reads a related object's field through a relationship path with an empty list, `{ 'order.status': { $nin: [] } }`, in any of the three filter positions one compile serves: the query's `where`, a measure's own `filter` and the dataset's own `filter`:
13
+
14
+
- FROM: the empty `$nin` folded to the constant TRUE (`1 = 1`), so it selected every detail row, including one whose relation field is empty or names no existing record. The same widget answered a different total once a time bucket sent it to the engine path, which leaves such rows out.
15
+
- TO: it is evaluated on an existing parent, like every other operator on a related field: the last hop's `id = id` (TRUE for an existing parent, UNKNOWN for none) takes the place of the constant, through every hop of the path. It selects every detail row whose related record exists, including one whose field has no value. The native, engine and `/data` answers agree.
16
+
17
+
**Not moved.** An empty `$nin` on the queried object's own field is still the constant TRUE, and its statement is unchanged. An empty `$in` selects no row on either path, as before. Under `$not` an empty `$nin` on a related field selected no row and still selects none.
18
+
19
+
The fix for an author who wants the rows with an empty relation: OR the base relation field in, `{ $or: [{ 'order.status': { $nin: [] } }, { order: { $null: true } }] }`. A row naming a record that no longer exists is not brought back by it, on either path.
feat(spec): an action's answer fields gain a `table` format, so a per-row answer is drawn as rows, not raw JSON
7
+
8
+
Clause-②: yes (widening) — `format: 'table'` joins the field formats of `resultDialog.fields` and `preflight.fields`, and the field row gains `columns`; the only new refusals fall on the new value and the new key, and every action that parsed before still parses unchanged
9
+
Metadata-protocol: added
10
+
11
+
An action whose server answers a list of rows (adding several people, importing a CSV) can now say how to show it. A field in `resultDialog.fields` (or `preflight.fields`, which shares the row) takes `format: 'table'` with `columns`, one entry per cell: `{ path, label?, format? }`, where `path` is read in one element of the array.
12
+
13
+
**FROM → TO.** FROM: the answer's list could only be shown as a JSON block (`format: 'json'`). TO: `{ path: 'rows', format: 'table', columns: [{ path: 'email', label: 'Email' }, { path: 'reason', label: 'Reason' }] }` draws one row per element, one cell per column, in `columns` order, with the column `label` (or its `path`) as the header.
14
+
15
+
Refused at parse, each with a message that names the fix:
16
+
17
+
-`format: 'table'` without `columns`, or with an empty list. The columns are never guessed from the elements' keys.
18
+
-`columns` beside any other `format`, or on a field with no `format` (the dialog-level default is never `table`).
19
+
-`table` as a cell `format` (a table does not nest) and as the dialog-level `resultDialog.format` (a default carries no `columns`).
20
+
21
+
The renderer contract is stated on `resultDialog`. The console's table renderer is still to come: until it lands, a `table` field draws its label alone, and `columns` is marked `[PLANNED — not yet rendered]`.
22
+
23
+
`@object-ui/core`: the `ResultDialogSpec` / `ResultDialogFieldSpec``format` members now derive from the contract, as their label members already do, so the console's action renderers keep type-checking against the widened set.
fix(cloud-connection): install-local answers a composed artifact the resolver refuses with the resolver's 422 at the declared-rename step, not a 503 telling the author to retry
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The declared-rename step of `POST /api/v1/marketplace/install-local` (step 2c″) reads every package body of a composed artifact through the artifact resolver. When the resolver refused the artifact, the step answered `503 SERVICE_UNAVAILABLE`: "the tables its declared rename(s) carry could not be read … Retry once the database answers." Examples are a `packages` that is not a list, or a package entry that carries a retired bare `indexes[].unique: true`. A retry never helps, and the author looked for the fault in the wrong place.
11
+
12
+
The step now resolves the bodies before it reads any table. A refusal answers with the resolver's own declared status and code: `422 INVALID_ARTIFACT_PACKAGES` or `INVALID_ARTIFACT_PACKAGE_ENTRY`, with the resolver's sentence. Nothing is written. This is the answer the `isolated`-posture unique-scope gate already gives for the same bytes, through the same reader. An undeclared throw out of the resolver, such as a dependency cycle between two packages of one artifact, is rethrown and is not relabelled. The 503 now means only that a table could not be read.
13
+
14
+
The door reaches this step first only on a runtime that predates the install-time code judgements (`collectJobsWithoutBody`, `collectHooksWithoutBody`). A runtime that carries them resolves the packages earlier, so its answer does not change.
0 commit comments