feat(spec): retire the six branded identifier schemas and EventNameSchema (ADR-0049 enforce-or-remove) - #14158
Conversation
…ed-types.zod.ts ADR-0049 enforce-or-remove, maintainer ruling 2026-09-01 (director batch C, verbatim approval: retire; binding weighed and not adopted). No schema in either repo ever composed a brand, so the promised compile-time safety was unobtainable, while the surfaces the brands were named for are validated by inline regexes or bare SnakeCaseIdentifierSchema — those five real validators are the contract of record and are untouched here. Removes the module whole (6 schemas + 12 type exports), registers the six shared/* defs under RETIRED_DEFS_BY_MAJOR 18 plus the D3 semantic entry branded-identifier-schemas-retired, deletes the six manifest keys behind the #4725 gate, and regenerates api-surface / declaration-map / export-origins / reference docs. SnakeCaseIdentifierSchema and SystemIdentifierSchema stay published and unchanged. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mciyv38maJ6HYVMiaM26T1
…nly event-name contract ADR-0049 enforce-or-remove, maintainer ruling 2026-09-01 (director batch C, verbatim approval: retire). EventNameSchema presented itself as the platform's event-name grammar while nothing that runs consumed its three binding schemas (EventTypeDefinitionSchema.name, EventSchema.name, EventMessageSchema.eventName); the vocabulary the platform actually checks is the closed literal enums DataEventType / BulkDataEventType, which never referenced it. Removes the schema and its EventName type, widens the three binding fields to plain z.string() with describes that point at the enums, registers shared/EventName under RETIRED_DEFS_BY_MAJOR 18 plus the D3 semantic entry event-name-schema-retired, deletes the manifest key behind the #4725 gate, drops the Iso499 isomorphism pin with the schema (836 -> 835, ledgered in the pin file), and regenerates baselines, reference docs and skill refs. The kernel events fixture that pinned the retired grammar's reject branch is repinned to the widening (the refused spellings now parse). WebSocketEventSchema.channel stays a deliberate z.string(); the enums are byte-for-byte untouched. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mciyv38maJ6HYVMiaM26T1
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mciyv38maJ6HYVMiaM26T1
…l moves llms.txt counts *.zod.ts modules per domain (shared 13 -> 12, total 207 -> 206) and quick-reference.mdx declares how many reference pages content/docs/references/shared/ publishes (8 -> 7); both moved when shared/branded-types.zod.ts left with its six schemas. Caught by check:llms-txt and check:quick-reference-counts. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mciyv38maJ6HYVMiaM26T1
…entifier-retirements
📓 Docs Drift CheckThis PR changes 1 package(s): 42 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 3 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 128 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a93c6b6cfb591281c9facde378000de34a53a41a && git checkout a93c6b6cfb591281c9facde378000de34a53a41a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2bff79ae381d72c38c30ac9695eed429f1b61761 881b685f5c753767701032bcc12a488b575b9c5e && git checkout -B drift-repro 2bff79ae381d72c38c30ac9695eed429f1b61761 && git merge --no-ff 881b685f5c753767701032bcc12a488b575b9c5e
node scripts/docs-audit/affected-docs.mjs --json 2bff79ae381d72c38c30ac9695eed429f1b61761
|
The ObjectName-to-SystemIdentifier rename in the :565 comment was decorative (zero behavior, forced by no gate) and its only measured effect was to co-edit the generator that the #11705 pure-regeneration exception trusts, which kept the eight regenerated skills/*/references/_index.md files GOVERNED. The retired name stays in the comment as a tolerable historical example; check:skill-refs, check:docs and check:generated pass unchanged against the unmodified generator. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mciyv38maJ6HYVMiaM26T1
|
Micro-patch (commit 881b685): reverted the decorative comment-example rename in packages/spec/scripts/lib/schema-section.ts (line 565, ObjectName back as the historical worked example, byte-identical to origin/main). Why: the rename was zero-behavior prose forced by no gate, but it co-edited the generator that the #11705 pure-regeneration exception trusts, so the exception refused to lift the eight regenerated skills/*/references/_index.md paths and check-governed-merges read the PR as GOVERNED — one line of decoration was buying a maintainer manual merge. The retired name staying in that comment is tolerable prose debt; this PR body's "Small in-scope cleanups" line about schema-section.ts is superseded by this revert. Gate re-readings at 881b685, unmodified generator + new sources, zero regeneration deltas: check:skill-refs PASS, check:docs PASS, check:generated PASS (no gate named the comment line — confirming the rename was never gate-forced). New governed reading, verbatim from All eight skills hits now carry the #11705 note: "PURE REGENERATION — byte-equal to Generated by Claude Code |
Fixes #13612
Fixes #13613
Clause-②: yes
Family-folded dispatch (both cards RULED retire on 2026-09-01, director decision batch C, verbatim approval — comments 5486945231 and 5486945957): two ADR-0049 enforce-or-remove retirements of declared-but-unenforced identifier schemas, executed per the spec-property-retirement playbook with the ADR-0087 conversion for published-export removals. Each card's increment is independently verifiable: its own export-set delta, its own retired-defs rows and D3 semantic entry, and its own section of the shared changeset.
Card 1 — #13612: the six branded identifier schemas (commit a406443)
shared/branded-types.zod.tsremoved whole — the file held exactly the six brands and their type exports (18 export statements: ObjectNameSchema, FieldNameSchema, ViewNameSchema, AppNameSchema, FlowNameSchema, RoleNameSchema, plus ObjectName/ObjectNameParsed through RoleName/RoleNameParsed). No schema in either repo ever composed a brand, so the promised compile-time safety was unobtainable.branded-identifier-schemas-retired; six keys deliberately deleted from json-schema.manifest/shared.json behind the json-schema.manifest.json 的「deliberate removal」删行仍是纪律而非门禁 —— #4650 的同类洞,上移一层(整 schema 级) #4725 gate.Card 2 — #13613: EventNameSchema and its three bindings (commit 928a373)
EventNameSchemaand itsEventNametype removed from shared/identifiers.zod.ts. Its only three binding fields — EventTypeDefinitionSchema.name (kernel/events/core.zod.ts), EventSchema.name (same file), EventMessageSchema.eventName (api/websocket.zod.ts) — had zero runtime consumers; the platform-checked vocabulary is the closed literal enums DataEventType / BulkDataEventType (api/events.zod.ts), which never referenced it.event-name-schema-retired; manifest key deleted behind the json-schema.manifest.json 的「deliberate removal」删行仍是纪律而非门禁 —— #4650 的同类洞,上移一层(整 schema 级) #4725 gate.Derived judgments (contract-review items, declared per the dispatch)
Accept/reject behavior changes, one by one:
ApiKeyreference table documents better-auth's apiKey-plugin schema — a plugin this platform does not load and a shapesys_api_keydoes not have #8715 route-3 shape: no authored document ever embedded a branded value, and the event-field change is a widening, so there is no source rewrite for os migrate meta to carry. The retired-defs table plus the two semantic entries are the declaration.Small in-scope cleanups, declared: the ZOD_SCHEMA_AUDIT_REPORT.md line naming EventNameSchema as part of the identifiers module was corrected (the file is hand-maintained — last touched by #13895); a generator comment in packages/spec/scripts/lib/schema-section.ts that used ObjectName as its worked example now uses SystemIdentifier (a surviving bare-scalar def); llms.txt's hand-kept module counts (shared 13 to 12, total 207 to 206) and quick-reference.mdx's page count (8 to 7) corrected — both gate-caught, both are counts the file removal genuinely moves.
Out of scope, untouched, per the ruling: BucketConfigSchema / ObjectStorageConfigSchema / LifecyclePolicyRuleSchema (issue comment 5473339621 — not covered by the ruling, still awaiting one) and #13621 (SystemIdentifierSchema prose correction — separate card; the "Event keys" line in SystemIdentifierSchema's docblock is that card's surface, not this one's).
Semver
@objectstack/specminor with BREAKING banner — the launch-window grade both rulings name explicitly, matching the #14128 / scim-provider precedents; check-changeset-no-major green. ADR-0087 disposition marker: registered branded-identifier-schemas-retired, event-name-schema-retired (both ids new in this diff; check-adr-0087-registration green).Verification (all readings at merged head a46ef31 unless noted)
skills/** readings (dispatch DoD)
All eight touched files are the auto-generated references/_index.md (regenerated by gen:skill-refs; header says do not edit): per file before to after — objectstack-ai 45 to 45, objectstack-api 49 to 49, objectstack-automation 44 to 44, objectstack-data 65 to 65, objectstack-i18n 35 to 35, objectstack-platform 61 to 61, objectstack-query 35 to 35, objectstack-ui 56 to 56 (one line shortened in place: the identifiers.zod.ts export list drops EventNameSchema). Whole bundle: SKILL.md sum 10537 to 10537 (zero SKILL.md touched); all skills files sum 17863 to 17863. Net zero growth.
Open questions
None blocking. One observation recorded on the cards' comment trail rather than acted on: the three object-storage schemas from comment 5473339621 remain declared-but-unread and still await a ruling.
Generated by Claude Code