Skip to content

Commit bcda1d6

Browse files
committed
Merge main into the 3b branch: keep main's subflow-retry gate map beside the connector instances
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT
2 parents e7bb208 + 87330e8 commit bcda1d6

129 files changed

Lines changed: 4789 additions & 649 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/service-automation': minor
3+
'@objectstack/spec': minor
4+
'@objectstack/lint': minor
5+
---
6+
7+
feat(automation)!: a flow that runs after a record change is not armed while a subflow it calls retries an inline outbound call, and a durable `http` node with no outbox does not hold the save
8+
9+
Clause-②: yes (narrowing) — a record-triggered flow the engine armed before is now registered but not armed when a `subflow` / `map` child retries an inline call; `@objectstack/spec/contracts` gains the `FLOW_UNBOUND_CAUSES` value `retried_callout_in_subflow`.
10+
Metadata-protocol: semantic
11+
Skills-docs: none — taught in content/docs/automation/flows.mdx (Try / catch / retry) and in `os explain flow-after-save-inline-retry`; no skill under `skills/**` teaches the subflow or the no-outbox case.
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed or renamed, and every flow that registered before still registers. One flow is no longer armed, and one durable request on a host with no outbox is sent in the background; no rewrite of a stored flow keeps what its author meant, so the author chooses the fix. -->
14+
15+
**BREAKING** for two shapes of a flow whose start node runs it after a record change (`record-after-create`, `-update`, `-delete`, `-insert`, `-write`). Ruling D on the after-save retry card: the record save never waits on an external system.
16+
17+
- **A retried inline call in a subflow.** Before, the after-save rule (`flow-after-save-inline-retry`) judged only the flow's own nodes, so a flow whose `subflow` or `map` node called a child holding a retried `http` (without `durable: true`) or `connector_action` node armed, and while the outside system was down the save waited through every attempt and backoff delay. The retry counts wherever it sits on the call chain: the child's own `try_catch` retry or `errorHandling: { strategy: 'retry' }`, a deeper child's, or a retry around the call in the caller. Now the arming gate declines such a flow, after its disabled-subflow, save-notice and region halves: it still registers, is not armed, and warns once, naming the call node, the retried node, the flow that holds it and what retries it. `GET /automation/_status` reports it `bound: false` with that reason and the new `unboundCause` value `retried_callout_in_subflow`, and the Studio's run note says it in plain words. Whenever a flow is registered, every flow whose calls reach it is judged again, so the decline does not depend on load order, and a child republished with the call durable (or unretried) arms the caller again.
18+
- **A durable `http` node on a host with no messaging HTTP outbox.** Before, such a node fell back to the inline call on every path, so on the save path a retry around it held the save through the whole ladder. Now, on the save path (an after-record-change run, or a `subflow` / `map` child of one), the request is sent once in the background and the run does not wait for it or see its outcome, as with the outbox: the node answers `{ enqueued: false, background: true }`, and a failed send is logged at `error` and is not retried. Off the save path the fallback is the inline call, as before.
19+
- **Not changed.** Registration, the save door and `objectstack validate` accept the same flows as before. A flow that does not run after a record change, an inline call nothing retries, and a durable `http` node with an outbox wired behave as before.
20+
21+
**What an author does.** For a declined flow: in the child the warning names, set `durable: true` on the `http` node, or remove the retry around it (a `connector_action` has no background path: remove the retry, or run that work on demand or on a schedule). For a host with no outbox: wire the messaging service with reliable delivery so a durable request is queued and retried, rather than sent once.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/metadata-protocol': minor
3+
---
4+
5+
fix(metadata-protocol)!: a row of an App's `.custom` pair declared for a package that still ships the name is never served at a bundle addition's address as its own item (ADR-0150 D4, #32606)
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
Skills-docs: none — `skills/**` and `content/docs/**` teach a declared override served at the package it declares and a tenant's edit following an item that moved between an App's packages (#31593); neither teaches a row declared for one package served at another that still ships nothing of the row's member, so no taught sentence moves.
10+
11+
<!-- adr-0087: registered declared-row-not-moved-to-addition -->
12+
13+
**BREAKING** for a reader of a bundle addition's member: an App `A` with module packages X and Z, Z depending on A and X; X ships `welcome` in `en-US`, Z ships only `fr-FR` (a bundle addition to X's template), and `A.custom` stores a `fr-FR` row declaring `overrides: { package: X }`.
14+
15+
The moved-edit rule (#31593, `isMovedOverrideRowOf` / `isMovedBaseRowOf`) serves a row that declares, or is bound to, a former owner of an item at the package that ships the item now. It asked whether the former owner still ships the item at the MEMBER's grain, so X (which ships `en-US`, not `fr-FR`) read as a package that no longer ships it, and Z took the row as its own moved edit. The rule now asks the former owner at the NAME's grain, as its own header states ("the old owner must not ship the name"): X still holds `welcome`, so the row stays X's alone.
16+
17+
**Every moved answer, before → after.** Both registration orders (Z installed first, the row stored first). First-party count 0: no first-party App stores a pair row declaring one module at a locale another module adds.
18+
19+
- `GET /meta/email_template/welcome?package=Z&member=fr-FR`: the row declared for X, stamped Z, `_diagnostics.valid: false` → Z's own `fr-FR`, which is what the registry answers at Z (`getPackageScopedItem`).
20+
- `GET /meta/email_template?package=Z` (Z's list) and the execution list a send resolved to Z reads (`getMetaItemsForExecution`): the row declared for X → Z's own `fr-FR`. A send resolved to Z sent X's customization of a member Z ships.
21+
- `listServedOverrides({ packageId: Z })` (the customizations read): the same row is no longer listed under Z.
22+
23+
**Not moved.** X's address, X's list and X's execution list serve the row declared for X, as before. `?package=A.custom` serves it. The read naming no package keeps its 409 naming both holders. A former owner that ships nothing of the name any more still hands its edit to the package that ships it now (#31593's flat → composed and composed → flat moves, and a member that moved together with its whole bundle), pinned as a CONTROL in both orders.
24+
25+
The fix for a reader: read the row at the package it declares (`?package=X`). To customize Z's own member, save a row declaring Z.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): the protocol upgrade guide names what a bundle addition's address and lists answer for an App pair row declared for a package that still ships the name: the addition's own member (ADR-0150 D4, #32606)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The semantic entry `declared-row-not-moved-to-addition` (`packages/spec/src/migrations/entries/semantic/18.declared-row-not-moved-to-addition.ts`) registers the change `.changeset/32606-declared-row-not-moved-to-addition.md` declares (ADR-0087, `adr-0087: registered`): no automatic rewrite, since every stored row keeps its shape and its binding. It adds no key and no export.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/metadata': patch
3+
---
4+
5+
fix(metadata): history retention keeps the latest N versions per package for a type stored per `(package, name)`, so one package's saves no longer evict another package's rollback targets
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`HistoryCleanupManager`'s `maxVersions` retention counted a name's history versions per `(type, name)`. For a type stored per `(package, name)` (`PACKAGE_SLOTTED_STORE_TYPES`), two packages and the environment each keep their own row of one name, and their snapshots share one version sequence, so a package saved often pushed every other holder's versions past the limit and `runCleanup()` deleted them: the other package had nothing left to roll back to. Retention for those types now keeps the latest `maxVersions` per `(type, name, package_id)`: each package's versions, the environment's versions (the `sys_metadata` marker) and versions recorded under no package (rows written before the `package_id` column existed) are each counted on their own. `getCleanupStats()` counts the same way. Every other type, a name only one package holds, the age-based retention and the `executionPinned` exemption (`flow`, `agent`) are unchanged. A row is only ever deleted now if the old rule would also have deleted it.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/plugin-webhooks': patch
3+
'@objectstack/cli': patch
4+
---
5+
6+
fix(plugin-webhooks, cli): an activation row a departed package left switches no remaining webhook holder, and the 18.x ownership ceremony writes a two-holder copy's switch as a row naming no package instead of picking one holder (ADR-0150 D8)
7+
8+
Clause-②: yes (widening; narrowing on a departed row switched on) — widening: a departed package's row switched off no longer keeps a remaining holder off, so its outbound deliveries start on upgrade. Narrowing: a departed package's row switched on no longer turns on a holder shipped inactive.
9+
Metadata-protocol: none
10+
11+
**A departed package's activation row (plugin-webhooks).** A declared webhook's slot with no activation row of its own read the name's rows naming a package that no longer declares the name as its switch while the name had one holder, and under two holders such a row switched off kept both off. Such a row was the departed package's switch, and it now switches no remaining holder, in either direction:
12+
13+
- one holder, a departed package's row switched off: FROM the holder off TO the holder at its own row, else its declared `isActive`;
14+
- one holder shipped inactive, a departed package's row switched on: FROM the holder on TO the holder off (its declared default);
15+
- two holders, a departed package's row switched off: FROM both off TO each at its own row or its declared default.
16+
17+
The source says so once per name at `warn`, naming the departed package, the holders and the per-holder address (`POST /api/v1/security/_activation/webhook/NAME?package=PACKAGE`). A row naming no package is read exactly as before: the one holder's switch, and under two holders off keeps every holder with no row of its own off and on turns none on. A holder's own row still wins.
18+
19+
**Operator action on upgrade.** A webhook you switched off while another package held its name, and which a remaining package now declares, starts delivering again after this release unless that holder has its own row. To keep it off, switch the holder off at its own address: `POST /api/v1/security/_activation/webhook/NAME?package=PACKAGE` (no `package` for the environment's own). The warning above names each such webhook and its holders.
20+
21+
**The 18.x ownership ceremony's declared-webhooks step (cli).** A customized `sys_webhook` copy writes the declaration's activation row. When the copy's definition names no package, the row named the holder the composition listed LAST for the name. Of a name one holder declares it still names that holder; of a name two or more holders declare it now names no package — the name-keyed switch the copy was — and the step's notes name every holder and the per-holder address. When the environment is one of those holders, a row naming no package would be the environment's own switch, so the step writes no switch row and its notes report the copy's switch (on or off) and name every holder; switch each at its own address. A copy whose definition names its package writes that package's row, as before.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/core': patch
3+
---
4+
5+
fix(core): the security catalog's list keeps every holder of a permission set name the metadata service holds, so a grant naming a package is judged by (package, name) whatever order the stored rows are listed in (ADR-0150 D4)
6+
7+
Clause-②: yes (widening; narrowing on the agent-account ceiling) — on the metadata-only path (a permission set name the engine registry holds nowhere, read from the metadata service, as an environment kernel reads its stored sets), a grant whose `permission_set_package` names the holder listed second moves FROM `409 RESOURCE_CONFLICT` `not-held-by-qualifier` naming only the first-listed holder TO stored with that package, the answer the registry path already gives. A refusal on that path (a package that holds no set of the name) now names every holder of the name, packages in id order and the environment's own row last, where it named the first row listed. Nothing refused on the registry path is admitted here. The narrowing: an agent-account grant (or a position binding the name) of a set name two packages hold on that path, read with no package, is judged against every holder's body (#32164); it moves FROM admitted, when only the holder listed second breaches the agent ceiling, TO the agent-ceiling validation refusal (`invalid_value` at `permission_set`, or at `position`) naming that breach, the answer the registry path already gives.
8+
Metadata-protocol: none
9+
10+
`createSecurityCatalogReader(...).list('permission')` answered, for a name only the metadata service holds, one entry: the first row of the name the service listed. Every reader that judges a named holder from that list (the grant name hook's `judgeGrantSet`, the activation door's `?package=` read, the activation ledger's holder count) therefore saw one holder, and which one followed the service's row order. The list now carries one entry per (package, name) holder on that path too — the shape the registry path gives — ordered by package id with the environment's own row (no package, or the `sys_metadata` provenance) last. A disabled package's row is still not listed, as on the registry path. A bare-name read is unchanged: the store still refuses a name two packages' slots hold, naming both.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(plugin-auth)!: an SSO provider's domain list takes bare host names only, and every rule that reads it reads each entry the same way
6+
7+
Clause-②: yes (narrowing) — narrowed: `POST /sso/register`, `POST /sso/update-provider` and the bridges that re-dispatch to them (`POST /admin/sso/register`, `POST /admin/sso/register-saml`, the edit bridge) now answer `400 VALIDATION_FAILED` on `domain` (`fields[0].code: 'invalid_value'`, the message naming the entry) for a `domain` value holding an entry that is not a bare host name (a URL, a port, a path, a user part, an escape, a dot run), where they stored it; and SCIM's adoption of an existing SSO account no longer reads an entry or an address that only folds into a host (full-width letters, for one) as a domain. Widened: SCIM adoption now reads an entry and an address in their one spelling, so an entry with a root dot (`acme.com.`) and the Unicode and punycode forms of an internationalised name (`bücher.de`, `xn--bcher-kva.de`) name the same domain, as the account rule already read them. New exports from the module `sso-account-at-proven-domain.ts`: `ssoDomainEntryHost`, `ssoDomainEntryHosts`, `ssoDomainEntryNotBare`.
8+
Metadata-protocol: none
9+
Skills-docs: none — no skill under `skills/**` teaches the SSO provider domain list; `content/docs/permissions/sso.mdx` gains the rule and how to correct a stored entry in this change.
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed, renamed or re-shaped: `sys_sso_provider.domain` keeps its type and length. The refusal is a runtime validation at the provider register and edit doors; stored rows are not rewritten, so there is nothing for a migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** for an administrator who registers or edits an SSO provider with a domain entry written as a URL or with a port or path (`https://acme.com`, `acme.com:443`): it is refused with `400 VALIDATION_FAILED` naming the entry, and nothing is saved. Such an entry was stored before and then proved nothing at sign-in under SSO domain verification.
14+
15+
Unchanged: providers already stored (not re-checked or rewritten until a request writes their domain); an edit that writes no domain; the one-provider-per-domain claim rule, which still reads a stored entry of another provider as before.
16+
17+
What to do: write each domain as a bare host name, separated by commas (`https://acme.com` becomes `acme.com`). For a provider already holding such an entry, send the bare host names as `domain` to `POST /api/v1/auth/sso/update-provider` (no console action edits a provider's domain) and verify the domain again.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
---
4+
5+
docs(driver-sql): how an operator finds and corrects the Postgres `date` values that releases before 18.4.0 stored one day early after a `datetime` → `date` publish; the platform does not repair them
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
**Not repaired automatically.** Affected: Postgres, a database server whose time zone is ahead of UTC (for example `Asia/Shanghai`), a field published from `datetime` to `date`, and a day written into it after that publish by a release before 18.4.0. Such a day was stored as midnight in the server's zone (`2026-11-12` as `2026-11-11T16:00:00Z` at `+08:00`), so it reads, filters and buckets as the previous day. 18.4.0 writes new days correctly and reads every door the same way, but it cannot tell those rows from a value written while the field was a `datetime` at the same instant, so it changes no stored value.
11+
12+
To find candidates, run against the object's table, with ZONE the server's zone (`SHOW TimeZone`) and FIELD the field:
13+
14+
```sql
15+
SELECT id, FIELD FROM TABLE
16+
WHERE (FIELD AT TIME ZONE 'ZONE')::time = '00:00'
17+
AND (FIELD AT TIME ZONE 'UTC')::time != '00:00';
18+
```
19+
20+
Check each row against what was entered (a value that really was entered as a date-time at local midnight is also listed), then correct the ones that are early days:
21+
22+
```sql
23+
UPDATE TABLE
24+
SET FIELD = ((FIELD AT TIME ZONE 'ZONE')::date)::timestamp AT TIME ZONE 'UTC'
25+
WHERE id IN (...);
26+
```
27+
28+
After the update the row reads, filters and buckets as the day that was entered.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
---
4+
5+
fix(driver-sql): on SQLite and MySQL, a `date` field whose column a `datetime` → `date` publish left as a date-time column now filters as its calendar day, so a row written while the field was a `datetime` is matched by a filter on the day it reads as
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
After a field is published from `datetime` to `date`, the column keeps its date-time type (SQLite `datetime`, MySQL `DATETIME`), and rows written before the publish still hold a time of day. They already read back as their day (`2026-11-12`), but an equality filter on that day (`where: { due: '2026-11-12' }`) compared the bare day against the whole stored instant and missed them, while `$gt` on that day matched them. The schema sync now records such a column on SQLite and MySQL as it already did for a Postgres `timestamptz` column, and every filter door (the query builder and the analytics native-SQL door) reads it as its calendar day: SQLite by the first ten characters of its canonical UTC text, MySQL by `date()` under its UTC session. Writes, reads and the day bucket are unchanged. As with Postgres, an index on such a column no longer serves a filter on the field; only columns a `datetime` → `date` publish left behind are affected.

0 commit comments

Comments
 (0)