Skip to content

Commit 03adc6e

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/area-A2-32656-refusals
# Conflicts: # packages/metadata-protocol/src/protocol-publish-drafts-advisories.test.ts # packages/runtime/src/domains/meta-save-user-text-locale.test.ts
2 parents 979fbb3 + 34c0522 commit 03adc6e

328 files changed

Lines changed: 14862 additions & 1140 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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(auth)!: an unmapped SAML sign-in reads the standard email and name claims before the NameID, and an SSO provider creates an account only for an email address
6+
7+
Clause-②: yes (narrowing) — narrowed: a new account a SAML or OIDC sign-in would create through an `@better-auth/sso` provider is refused `403 INVALID_EMAIL` (`error=INVALID_EMAIL` on the sign-in's error redirect) when the email the sign-in resolved to is not an email address, with SSO domain verification off as well as on, where it was created with that value as its email. Widened: for each SAML attribute-mapping member a provider leaves unset, the sign-in first reads the standard claim the assertion carries (`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress`, `givenname`, `surname`, `name`), where it read only `email` / `givenName` / `surname` / `displayName` and the NameID. No first-party composition in this repository registers a SAML or OIDC provider.
8+
Metadata-protocol: none
9+
Skills-docs: none — no skill under `skills/**` teaches the SAML attribute mapping or SSO account creation; `content/docs/permissions/sso.mdx` gains both rules 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, and no stored row changes: the provider's stored mapping is read as before, the added claims are read at sign-in only, and the moved answer is a runtime refusal at account creation, so there is nothing for a migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** for a deployment whose SAML or OIDC provider resolves a person to a value that is not an email address: such a sign-in no longer creates an account. The common case is an identity provider that sends no email attribute, so the sign-in fell back to an opaque persistent or transient NameID (Microsoft Entra ID's IdP-initiated sign-in is one), or an OIDC mapping that names a claim holding a user name. With SSO domain verification on, such a value was already refused `EMAIL_DOMAIN_NOT_ALLOWED`, and still is. Also moved: for a SAML provider with no email mapping set whose assertion carries both a plain `email` attribute and the standard `emailaddress` claim, the standard claim now takes precedence, so where the two differ a new account is created at the claim's address rather than the `email` attribute's (an existing account still signs in by its account key).
14+
15+
Unchanged: an account that already exists signs in as before, whatever its email; linking; and every account creation that is not through an SSO provider.
16+
17+
What to do: nothing, unless a provider's users are created with a value that is not an address. For such a provider, map its email attribute (SAML) or claim (OIDC) to the one that carries the user's address.
18+
19+
The standard claims: Microsoft Entra ID and AD FS send them by default, and neither sends an `email` attribute, so an Entra ID provider with nothing mapped keyed its users on the NameID, an email-format user principal name when the sign-in started from the sign-in page and an opaque persistent id when it started from the identity provider's app portal. Both entries now resolve to the address in the `emailaddress` claim, so the second entry never creates another account: it finds the account the first one made and is refused `account_not_linked`, creating nothing, until that account is linked to it. A member an administrator mapped is always read as mapped, and a provider that sends `email` and none of these claims signs in exactly as before. A provider that encrypts its assertions reads only what it maps.
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): the `manifest.namespace` paragraph lists `runs` among the namespaces a package may never declare
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`objectstack-platform` named `actions`, `connectors`, `global`, `hooks`, `oauth` and `trigger` as the route literals a package namespace may never spell, but the address grammar's refused set (`NAMESPACE_REFUSED_LITERALS`, derived from `NAMESPACE_POSITION_LITERALS` in `@objectstack/spec/kernel`) also holds `runs`, the literal in the inbound hook's namespace position. An AI author who picked `runs` met the refusal only at `os validate`, build or the install door. The list now names all seven, in the set's sorted order. No schema or runtime change.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/metadata': patch
3+
---
4+
5+
fix(metadata)!: `DatabaseLoader` keys a package-less action row bound to an object per `(object, name)`, as the in-memory store does, so a package-less save is the customization of the one package binding the name to that object, and never a row of a package that binds it elsewhere (#32681)
6+
7+
Clause-②: yes (narrowing) — narrowed: on a host that wires a `DatabaseLoader` (none in the workspace), a package-less `action` save bound to an object that a package binds the name to only elsewhere is stored as the environment's own row, where it was stored as that package's row bound to the object, so an address naming that package reached a binding it never declared. Widened: none.
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 stored row is rewritten: what moves is which existing row a new save writes, and which package a slot read files a stored package-less row under, so there is nothing for `objectstack migrate meta` to rewrite. Rows earlier saves wrote stay as stored. -->
11+
12+
**BREAKING** for one kind of host: a host that wires a `DatabaseLoader`, where package BETA binds an action name to `contact` and nobody binds it to `account`, now stores a package-less save of that name on `account` as the environment's own row. A read naming BETA no longer reaches the `account` binding that save wrote; save it as BETA's (`_packageId`) if it is BETA's.
13+
14+
What moves, for `action` (seat ruling A on #32681, ADR-0150 D4), with ALPHA and BETA two packages:
15+
16+
- `DatabaseLoader.save` of a package-less body bound to an object counts the holders of its `(object, name)`, FROM the holders of its name:
17+
- ALPHA binds the name to `account`, BETA to `contact`: a package-less save on `account` updates ALPHA's `account` row (its customization), FROM a new package-less row beside it.
18+
- BETA binds it to `contact` alone: a package-less save on `account` is a new package-less row, FROM a new BETA row bound to `account`.
19+
- ALPHA binds it to `account` alone: a package-less object-less save is a new package-less row, FROM a new ALPHA object-less row.
20+
- A package-less row on `o1`, then a package's save on `o2`: the package's own new row, and the `o1` row keeps its column, FROM the package's save taking the row over.
21+
- `DatabaseLoader.save` of a package's first body on an object takes over a stored package-less row of that `(object, name)`, as the in-memory store's first package item takes over the bare slot: BETA binds the name to `contact` and a package-less row is on `account`, ALPHA's first `account` save updates that row, FROM a third row beside it.
22+
- `DatabaseLoader.loadManySlots` (and `loadSlots`) hands on a stored package-less row bound to an object that exactly one package binds the name to, under a name two or more packages hold, held for that package, FROM held for none. So with no boot pass, a read naming ALPHA (`MetadataManager.get`) answers the package-less `account` row, and `list('action')` lists it alone in ALPHA's slot, FROM ALPHA's own row (and both rows), as after the pass. The row is not rebound.
23+
24+
Not changed: types other than `action`; how the boot pass files the rows it reads (the unscoped plural read the pass registers still folds a package-less row into the name's one holder by name, so beside BETA's `contact` binding alone a read naming BETA after the pass still answers the package-less `account` row; that half follows #32680's keyed-entry stamping); and stored rows (no migration; rows earlier saves wrote are listed by the ADR-0150 D10 report as before).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/runtime': patch
3+
---
4+
5+
fix(runtime)!: the action activation door answers a name two packages hold with `409` naming both, as the execution door does, instead of `404` "has no declaration"
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: none
9+
10+
BREAKING, for `POST /api/v1/actions/_activation/OBJECT/NAME` (body `{ "enabled": true | false }`) where two packages each declare an action `NAME` on that route's key — both object-less (`OBJECT` = `global`), or both bound to `OBJECT`:
11+
12+
- FROM: `404 RESOURCE_NOT_FOUND`, "Action 'NAME' on 'OBJECT' has no declaration — there is nothing to switch off" (or "on").
13+
- TO: `409 RESOURCE_CONFLICT`, the declaration reading's refusal, naming every holder in the message and in `error.details.candidates` (each with its `packageId`). The execution door `POST /api/v1/actions/OBJECT/NAME` already answers this name with the same refusal.
14+
15+
In both directions nothing is written to the activation ledger, as before. The declaration reading refused the name, and the activation door read that refusal as "no declaration", so it reported an ambiguity as an absence (ADR-0150 D3: ambiguity is reported, never answered as absence).
16+
17+
Unchanged: a name one package declares switches off and on with its ledger row naming that package; a name nothing declares answers `404` "has no declaration"; one package's action bound to two objects answers the activation door's own `409` naming both objects.
18+
19+
The fix for a caller: read the `409` as "two packages hold this name", not as a missing action. The ledger addresses an action by its name, so this door switches the name again once one package holds it; before this change the same request answered `404` and switched nothing either.
20+
21+
<!-- adr-0087: not-required (no-migration-prescription) no key, export, field or stored body changes; the change is the status of a refusal the activation door already made, now answered as the execution door answers the same name; a caller holding two packages' action of one name must choose which package's action to switch, which no conversion can choose for them -->
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 permission set `name` describe says a set is identified by its package and name, one holder of a name per namespace
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `name` describe on `PermissionSetSchema` (`packages/spec/src/security/permission.zod.ts`) read "unique within the security catalog the environment serves", which stopped being true when a permission-set name became one holder per namespace (ADR-0150 D2/D9). It now says a set is identified by its package and name: packages of two namespaces may each hold a set of one name, while two packages of one namespace, a package with no namespace, a platform package (`base`, `system`, `sys`), the environment and the platform-requested `guest_portal` share one set of it. The generated reference page and the permission sets guide say the same; positions and capabilities keep one name per deployment. No schema, rule or runtime behaviour changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/console': patch
5+
---
6+
7+
fix(console, data-objectstack): a report drill that rebuilds its filter reads the dataset as the report's reader (ADR-0150 D3)
8+
9+
Clause-②: yes (widening) — `MetadataGetOptions` (`@object-ui/data-objectstack`) gains an optional `callerPackage`, which `MetadataClient.get` sends as `?callerPackage=`; omitted, every read is sent exactly as before.
10+
Metadata-protocol: none
11+
12+
**The drill.** A report row drills straight to its records when the dataset answer carries the drill metadata. When it does not, the Console reads the dataset definition to rebuild the filter from the clicked group. That is not only an older server's answer: the server names the dataset's object on every answer but sends no drill metadata for a `type: 'date'` dimension with no `dateGranularity`, so a click on a report grouped by one takes this read. The read named no package, so for a report shipped in a package it read the bare name: another package's dataset of that name, or a `409` when two packages hold the name, where the report's own queries read the dataset its package resolves. The read now names the report's package as the reader (`?callerPackage=`), the dataset the report's queries resolve. A report authored in the environment reads the name bare, as before. A refusal opens no drill and is not retried with the bare name.
13+
14+
**The client.** `MetadataClient.get(type, name, { callerPackage })` reads an item as the package that reads it: that package's own item, else the one holder among its declared dependencies plus `sys`, else `409 RESOURCE_CONFLICT` naming the candidates. It is distinct from `packageId` (`?package=`), which names the holder exactly. The server serves the caller arm on the `dataset` read only, and refuses it beside `packageId`.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol)!: the read naming no package withholds a customization pair's row of a name every holder of which is disabled (ADR-0150 D3, #32814)
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
Skills-docs: none — no skill and no doc teaches what the read naming no package answers at a member only a customization pair stores (`skills/**` and `content/docs/**` grepped for disabled packages: the hits are action and component `disabled` predicates, package lifecycle references and a release page); `content/docs/deployment/marketplace-handbook.mdx` already says a disabled module is hidden.
10+
11+
<!-- adr-0087: registered disabled-holder-pair-row-bare-read-withheld -->
12+
13+
**BREAKING** answer narrowing at the `/meta` item read that names no package: at a member only a customization pair (an App's `PACKAGE.custom`) stores, for a name every installed package holding it has disabled, the read answers the holder's withheld item (404 `RESOURCE_NOT_FOUND` on the doors), where it served the pair's row. It is the answer the same read gives with no row stored, and the answer the pair's own address (`?package=PACKAGE.custom`) already gave.
14+
15+
The read judged the name's holders (`disabledOnlyHolderOf`) only when it reached nothing. It now also judges them when it reaches a row stamped with a customization pair (`pairsOf`) of a package that holds the name. A pair row is bound over the holders it is a pair of and is never a holder of its own, so it is withheld with them.
16+
17+
**Every moved answer, before → after.** Both save orders (row before and after the disable), with and without the boot's hydration of the row into the registry, for a module of an App and for the App itself as the holder. First-party count 0: no first-party app disables a package at boot.
18+
19+
- Bare `GET /meta/:type/:name?member=MEMBER`: 200 with the pair's row → 404 `RESOURCE_NOT_FOUND`.
20+
- Bare `GET /meta/:type/:name/layers?member=MEMBER`: 200 with the pair's row as the effective layer → 404 `RESOURCE_NOT_FOUND` (the layered chain asks the plain read whether a disable withheld the item).
21+
- The execution face (`getMetaItemForExecution`) of the same name and member: the pair's row → no item.
22+
23+
**Not moved.** Re-enabling a holder serves the pair's row again. Two modules of the App holding the name with one of them enabled: the pair's row is the enabled module's customization and is served as before, in either registration order. A row stored under a holder of the name, a package-less row, a row of a package that is no holder's pair, and every read naming a package are judged as before. The list reads (`getMetaItems`, `getMetaItemsForExecution`) are not changed here.
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 the bare item read #32814 narrows: a customization pair's row of a name every holder of which is disabled is withheld instead of served
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The semantic entry `disabled-holder-pair-row-bare-read-withheld` (`packages/spec/src/migrations/entries/semantic/18.disabled-holder-pair-row-bare-read-withheld.ts`) registers the narrowing `.changeset/32814-disabled-holder-pair-row-bare-read.md` declares (ADR-0087, `adr-0087: registered`). There is no automatic rewrite, because whether a disabled package should be enabled again is a judgement about the deployment. It adds no key and no export.

0 commit comments

Comments
 (0)