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 118525b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .changeset/18728-identity-wires-relay-the-spec.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,17 +15,15 @@ Three published schemas could not parse a served response. `OrganizationSchema`
15
15
-**`@objectstack/client` relays the schemas.**`OrganizationWire` is the spec's `Organization`, `OrganizationMemberWire` is `Member`, and `OrganizationInvitationWire` is `Invitation` with `status` narrowed per route plus the three members the platform adds on top (`teamId` and the two ADR-0105 D8 placement fields, which the non-strict schema strips). The three 「not relayed」 notes are gone.
16
16
-**The negative controls are the point.** "The client relays the spec schemas" and "the client stopped validating" look identical from a green positive test, so every accepted body is paired with a refused one — a required field genuinely missing, `metadata` still arriving as the stored JSON TEXT, and a `createdAt` or `updatedAt` present but not a datetime. `.optional()` widened the accept set by absence ONLY; a value that is there is still held to `z.string().datetime()`.
17
17
18
-
⚠️ **BREAKING** for a consumer that reads the organization wire's `metadata`, even though the level ships as `minor`: the repo's launch-window convention refuses `major` (`check-changeset-no-major`) and breaking-ness is carried by this banner plus the ADR-0087 disposition rather than by the level.
18
+
**Not declared breaking, and the reason is the repo's own criterion** rather than the level being convenient. AGENTS.md binds the breaking class to removing or renaming something an author can write, and to the `(narrowing)` arm of the clause-② pair. Neither holds here: nothing is removed, renamed or retired; the one `packages/spec` edit only widens an accept set; and the `metadata` half is a producer brought into line with a contract this package has published all along — `OrganizationSchema.metadata` has declared an object since it was written, and the client's own comment called the served text 「not relayed」 rather than a shape anyone was promised. No ADR-0087 disposition is claimed because no breaking change is declared: no authored metadata moves, so `objectstack migrate meta` has nothing to visit, `spec-changes.json` has nothing to project and the upgrade guide has no row to gain. These three schemas are not metadata types — not in `DEFAULT_METADATA_TYPE_REGISTRY`, no authorable surface. ⚠️ Stated here rather than assumed silently, because it is the one judgement in this diff that the contract review the `Clause-②: yes` declaration commissions should confirm.
19
19
20
-
**FROM → TO**: `organization.metadata` was the stored JSON text and is now the decoded object.
20
+
**What a consumer notices**, and where it is delivered: `organization.metadata` was the stored JSON text and is now the decoded object, so a caller that decoded it itself drops that step.
21
21
22
22
```ts
23
-
// before — the caller decoded it
23
+
// before — the caller decoded what the route sent
24
24
const meta =JSON.parse(org.metadata??'{}');
25
25
// after — the producer decoded it; the key is ABSENT when unset
26
26
const meta =org.metadata?? {};
27
27
```
28
28
29
-
`updatedAt` needs no migration in either direction: it was never on this family's wire, so no caller can have been reading a value, and the declaration now says so.
30
-
31
-
<!-- adr-0087: not-required (no-migration-prescription) Nothing authorable moves. No authored metadata property, object definition or accepted request shape changes its spelling, type or legality in a direction an author must act on: the only `packages/spec` edit makes `updatedAt` OPTIONAL on three identity wire schemas, which is pure widening — every document that parsed before still parses, byte for byte, so `objectstack migrate meta` has nothing to visit, `spec-changes.json` has nothing to project and the upgrade guide has no row to gain. These three schemas are not metadata types either: they are not in `DEFAULT_METADATA_TYPE_REGISTRY`, carry no authorable surface, and had zero in-repo consumers before this change. The other categories are closed on facts: all three packages publish to npm, declare no `private` and ship `dist` in `files[]` (not `unpublished`); no ADR-0087 id is minted in this diff (not `registered`) and none pre-dates the base that would cover it (not `already-registered`); and exported declarations DO change — `OrganizationWire` and `OrganizationMemberWire` become type aliases of the spec declarations and `OrganizationInvitationWire` becomes an intersection over one — so neither `runtime-interface-only` nor `type-surface-only` applies. plugin-auth's new module is package-internal and is NOT re-exported from its entry, so it adds no published declaration. The BREAKING banner above is carried rather than dropped, because the served wire shape of `@objectstack/plugin-auth` changes and `@objectstack/client`'s declaration of it changes with it. -->
29
+
The channel that reaches that caller is the compiler, on the line that used to work: `JSON.parse` no longer accepts the value. `updatedAt` needs nothing in either direction — it was never on this family's wire, so no caller can have been reading a value, and the declaration now says so out loud instead of promising one.
0 commit comments