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
feat(spec): the error-code ledger states its federation contract; makeApiErrorSchema(extraCodes) (#4805) (#7110)
The three objectstack-side items of the federated ERROR_CODE_LEDGER ruling
(#4805, 2026-08-03, re-confirmed 2026-08-09).
1. `error-code-ledger.zod.ts` header: "this ledger registers framework
packages only" becomes a stated RULE — with what a downstream product repo
does instead (its own ledger, composed as `envelopeViolations` for shape +
`code ∈ StandardErrorCode ∪ <its own ledger>` for vocabulary), and why the
ruling went this way (a commercial vocabulary does not belong in an
Apache-2.0 spec; per-code cross-repo friction breeds semantic reuse).
Previously inferable only by scanning the package names.
2. `ApiErrorSchema.code`'s description: `StandardErrorCode ∪ ERROR_CODE_LEDGER`
-> `StandardErrorCode` ∪ the ledger the serving side registers, naming
`ERROR_CODE_LEDGER` as the framework packages' one. Description only.
3. New export `makeApiErrorSchema(extraCodes)`: the same envelope with
`StandardErrorCode ∪ extraCodes` as the code vocabulary, so a downstream
conformance suite gets one parse with a Zod issue path instead of a shape
assertion plus a hand-written membership test. The envelope shape is
`ApiErrorSchema`'s, reused rather than restated. Additive: `ApiErrorSchema`
parses exactly what it parsed before.
Regenerated: api-surface/api.json, export-origins/api.json (the new export),
content/docs/references/api/{contract,error-code-ledger}.mdx (gen:schema &&
gen:docs).
Claude-Session: https://claude.ai/code/session_01GmC5HAjupdHqdB9bzsYzPg
Co-authored-by: os-zhuang <os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
code: ErrorCode.describe('Error code (e.g. VALIDATION_ERROR; StandardErrorCode ∪ the ledger the serving side registers — ERROR_CODE_LEDGER for framework packages)'),
0 commit comments