Commit eaed61f
* feat(spec)!: close ApiEndpointSchema against undeclared keys, and name the author state on the upgrade path (#5384, #5227)
`api` became a registered metadata type at #5312, making `endpoint.zod.ts` an
authoring surface (`defineStack({ apis })`, the Studio form, `PUT /meta/api/:name`)
while it was still an open `z.object`. A `cacheTTL` / `objectParam` /
`outputMappings` typo parsed green, published green, and served without the policy
or projection its author wrote.
The shape is `strictObject` now, with curated wrong-layer prescriptions for
`namespace` (ADR-0121 D2 — derived from `manifest.namespace`, never per-endpoint)
and the six stored-envelope bookkeeping keys.
The ORDER is the record: closing this was measured and refused first, because the
same schema parsed STORED rows carrying `packageId` / `state`. #5309 (PR #6576)
paid that debt at the layer that owned it (`peelStoredEnvelope`), after which the
conversion was an ordinary #4001 one. `ApiEndpointSchema` never learned a
bookkeeping key.
Corpus measured before landing: examples/* = 2 endpoints, cloud = 0 endpoints,
zero undeclared keys either side, so direction A carried and no key had to stay.
`api` leaves STILL_STRIP (closed 24 -> 25 of 26; `view` alone remains) and the CLI
gate row moves NOT_YET_CLOSED -> GATED_AT.
#5227 needed no schema change: ADR-0122 phase 2 (PR #6279) already made
`ApiEndpoint` the author state, so omitting `authRequired` compiles. The
`declarative-apis-endpoints-live` upgrade-guide entry now says so with a usable
annotation. An `ApiEndpointInput` alias is deliberately NOT added — after the flip
it would be a synonym, which ADR-0122 D3 forbids and `check:spec-parsed-alias`
rule 4 rejects.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sGk4SKHqGRgmmqUok1P8M
* fix(spec): `package` was missing from the endpoint stored-bookkeeping guidance
Caught by the drift pin added in the same change, on its first run:
`STORED_ENVELOPE_KEYS` has SEVEN entries and the guidance table listed six.
This is the drift the pin exists for, and it is silent in the direction that
matters — `package` is peeled correctly on the stored paths, so every other test
stays green, while an author who hand-writes it into a declaration gets the
generic "unrecognized key" instead of the wrong-layer prescription. A rejection
arriving without its upgrade is the ledger's finding 7.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sGk4SKHqGRgmmqUok1P8M
* chore(changeset): answer the ADR-0087 disposition question in writing (#6148)
The gate does not decide whether an entry is needed; it requires the question
be answered. Answered `not-required (no-migration-prescription)`: this change
retires no key, only the unknown-key posture moves, and an undeclared key was
never honoured — so no stored shape carries it and nothing that ever worked
becomes invalid. The schema rejection is the upgrade channel and is more
specific than a ledger line could be.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sGk4SKHqGRgmmqUok1P8M
* chore(changeset): state the ADR-0087 disposition without rewrite-arrow syntax
The marker's own category name supplies the word 'migration', and the two
worked examples supplied the arrow — so the disposition line matched the
gate's framed-line rewrite-prescription detector and contradicted itself.
Same reasoning, stated without FROM/TO arrow syntax; the per-key prescriptions
live in the schema's aliases/guidance, which is where an author meets them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sGk4SKHqGRgmmqUok1P8M
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent cd704cc commit eaed61f
11 files changed
Lines changed: 513 additions & 69 deletions
File tree
- .changeset
- docs
- audits
- packages
- cli/test
- metadata/src
- spec
- src
- api
- kernel
- migrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
1264 | | - | |
| 1264 | + | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
| |||
0 commit comments