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)!: retire the orphan notification-template vocabulary from ./system (#4616)
ADR-0049 enforce-or-remove, resolved by REMOVE in the v17 breaking window.
`EmailTemplateSchema`, `SMSTemplateSchema`, `PushNotificationSchema` and
`InAppNotificationSchema` (+ their four type aliases) existed ONLY as the
member shapes of the `NotificationConfigSchema.template` union that #4610
(#4535 C3) deleted. Since then they have been reachable from no parent schema
and from no metadata-type root — declared delivery capability the runtime
never read.
Three-repo consumer review (objectstack, cloud @ 5df2c69, objectui @ 785b8a5),
by bare name rather than by import statement — which is what changed the
answer:
- SMSTemplate / PushNotification / InAppNotification: zero references outside
their own declaration, their own unit tests and the generated artifacts.
- EmailTemplateSchema: NOT consumer-free. objectui's metadata-admin registers
it as the client-side validator for the `email_template` kind through a
DYNAMIC import (app-shell/src/views/metadata-admin/clientValidation.ts:89),
which an import-statement scan cannot see. That registration is itself the
bug: the canonical schema for the kind is `EmailTemplateDefinitionSchema`,
and validating an authored definition against the legacy shape reports its
real keys as missing — the same defect spec 7.1.0 fixed on the framework
side when it demoted `EmailTemplateSchema` to "an inline sub-shape inside
`Notification`". Filed separately; removing the legacy export turns that
silent mis-validation into a compile error at the one site that needs it.
- ui `NotificationSeveritySchema`: REFUTED. The issue proposed retiring it in
the same sweep on the premise that objectui pins only Type/Position/Action.
objectui re-exports the type (packages/types), consumes it in
core/src/protocols/NotificationProtocol.ts, pins the schema name in
packages/types/src/__tests__/spec-ui-schema-reexports.test.ts, and types two
severity->tone maps as Record<NotificationSeverityLevel, ...> precisely so a
new spec severity fails type-check downstream. It is untouched, and the pin
below asserts it stays ./ui-owned so the claim is not re-litigated.
Route: whole-def removal (#4650 route 3), not a `retiredKey()` tombstone — a
tombstone lives on a surviving schema's shape and none survives here.
gen:schema adjudicates the four defs itself ("def no longer emitted by this
build; whole-schema removals are adjudicated by json-schema.manifest.json and
check:api-surface"), which is why the 22 authorable-surface lines and the 4
manifest keys are deleted in this commit. No ADR-0087 D2 conversion,
deliberately: a conversion rewrites authored or stored sources, and no
metadata document was ever parsed against these defs, so `os migrate meta`
would have nothing to match — same disposition as #4610 in this module, and
as #4767/#4783.
Also corrects `kernel/metadata-plugin.zod.ts`'s `email_template` comment,
which named `EmailTemplateSchema` where the registry resolves
`EmailTemplateDefinitionSchema`. That one parenthetical is the documented
source of the confusion, including objectui's.
The pin is a TypeScript compiler-API test over the package.json exports map
(all 16 entries), asserting each removed name has ZERO holders anywhere — not
merely that ./system omits it — with anti-vacuity guards on entry resolution
and surface size. #4642 established that the conditional-type pin #4610 left
here is a no-op (tsconfig excludes **/*.test.ts), so it is folded in rather
than left as a gate that cannot fail.
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments