Skip to content

spec 双源清账 C3:通知语汇 Notification(Schema)(./api ≠ ./ui)+ NotificationConfig(Schema)(./system ≠ ./ui)—— 4 条,单 PR #4610

Description

@os-zhuang

#4535 C 组第三簇(C3)。两对同名跨入口分叉,同属通知语汇,同一 PR 处理;合并后 packages/spec/dual-source-exports.baseline.json 恰好 28 → 24(删除下列 4 行,只减不增):

Notification — [./api (type)] ≠ [./ui (type)]
NotificationConfig — [./system (type)] ≠ [./ui (type)]
NotificationConfigSchema — [./system (const)] ≠ [./ui (const)]
NotificationSchema — [./api (const)] ≠ [./ui (const)]

处置手册(#4411 先例;#4535 正文有完整版)

  1. 先判真源:import 语句级扫描三仓(本仓 + cloud + objectui),裸名从哪个入口被真实 import、有没有 runtime 读取(接进 schema / 校验路径 / 事件发布),不要用名字出现次数。./api vs ./ui 与 ./system vs ./ui 要分别判——两对可能不同路线。
  2. 零消费方一侧 ⇒ 死删(v17 rc 是 major 窗口);两侧都活 ⇒ 收敛 + re-export(MetadataManagerConfig 模式);真是两个概念 ⇒ 改名一侧(参考 C1 的 OpenApiWebhookEvent 先例:UI 的「通知横幅/toast 配置」与 system/api 的「通知投递语汇」完全可能是两个概念——如判改名且命名可争议,报 needs_decision,不要自作主张)。
  3. 收敛 ≠ 无行为变化:存活形状比被删侧窄/宽时,changeset 里写清消费方类型如何变。
  4. 导出类型,非可作者化 metadata key,一般不需要 tombstone / ADR-0087。

验收

关联:#4535(主账本)、#4587 → PR #4603(C2 先例)、#4572 → PR #4581(C1 先例)、ADR-0049

Activity

  1. self-assigned this
    on Aug 2, 2026
  2. os-zhuang commented on Aug 2, 2026

    @os-zhuang
    ContributorAuthor

    ACCEPT —— PR #4638(claude/issue-4610-notification-dual-source)。

    派发的 dev agent 完成了判源与实现(commit f8ecd72e)并预合了 main,但在验证阶段静默停摆、未推送;PM 接管跑完全部门禁并推送开 PR。

    PM 独立复核(不依赖 agent 自述):

    • 判源抽查成立:./ui 的 Notification / NotificationConfig 在 framework + cloud + objectui 三仓 零 import 站点;./api 的 Notification 是结构性活合同 —— 嵌在 ListNotificationsResponseSchema,被 api/plugin-rest-api.zod.ts:1055 的 REST 路由、service-messaging 与 contracts/notification-service.ts 引用。
    • 范围干净:仅 spec 源码 + 生成的 content/docs/references/** + api-surface.json / authorable-surface.json / json-schema.manifest.json + 基线 + changeset;content/docs/releases/ 零改动。
    • 基线恰好 −4(28 → 24),4 行 Notification* 全清,只减不增。
    • 手写 docs 未提及这 4 个名字,无需跟改;docs-import-surface.baseline.json 未被本次改动触发。
    • changeset 为 @objectstack/spec major,FROM→TO 迁移写明「api 行是收件箱记录、不是呈现配置」这一形状差异,并给出 NotificationConfig 的替代路径。

    验证(PM 在 worktree 内实跑):spec build ✅ / check:dual-source-exports ✅ / check:generated 8/8 ✅ / spec 单测 290 文件 7261 用例 ✅ / 全仓 typecheck 122/122 ✅。

    已转正并开启 auto-merge(squash),CI 绿后自动进队。


    Generated by Claude Code

  3. added a commit that references this issue on Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions