feat(spec)!: retire residual feed discovery/dispatcher surface (#3180)#3204
Merged
Conversation
Follow-up to #1959 / ADR-0052 §5. The feed backend was retired long ago; this removes the last discovery/dispatcher references to it and fixes a real bug in the comments capability. - spec: remove WellKnownCapabilitiesSchema.feed and ApiRoutesSchema.feed (routes.feed); drop the /api/v1/feed entry from DEFAULT_DISPATCHER_ROUTES. - metadata-protocol: getDiscovery() no longer emits the always-false feed service/capability. Bug fix — the `comments` capability keyed off the deleted 'feed' service (permanently false since #1955); it now tracks the sys_comment object (always-on audit slate), so declared === enforced. - client: drop the internal feed route constant (only existed to satisfy the now-removed ApiRoutes.feed type; unused). - tests: update discovery/dispatcher/client capability tests; add positive coverage that comments=true when sys_comment is registered. Comments/activity are served by the generic data API on sys_comment / sys_activity. Regenerated content/docs/references/api/discovery.mdx. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HtN5uPoPnFzkSJ2HcwzgtG
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 4 package(s): 110 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 18, 2026 11:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
承接 #1959(已合并)/ ADR-0052 §5 的收尾。feed 后端早已退役,#1959 删掉了 feed 契约 + SDK。本 PR 清掉 discovery/dispatcher 层最后残留的 feed 引用,并修掉一个真 bug:
comments能力因误挂在已删除的'feed'服务上,自 #1955 起一直恒为false。变更内容
@objectstack/specdiscovery.zod.ts:删除WellKnownCapabilitiesSchema.feed与ApiRoutesSchema.feed(routes.feed)。dispatcher.zod.ts:从DEFAULT_DISPATCHER_ROUTES删掉/api/v1/feed条目。discovery.test.ts/dispatcher.test.ts;再生成content/docs/references/api/discovery.mdx。@objectstack/metadata-protocolgetDiscovery():删掉恒false的 feed service 状态块与feed能力。comments能力此前= registeredServices.has('feed'),而service-feed已在 refactor(audit): retire service-feed; sys_comment canonical (ADR-0052 §5) #1955 删除 → 恒false。现改为跟踪sys_comment对象是否加载(由常驻的 audit slate 提供),做到 declared === enforced(Prime Directive chore: version packages #10)。@objectstack/clientfeed: '/api/v1/feed'路由常量(它只为满足已删除的ApiRoutes.feed类型而暂留,无任何消费者)。测试
sys_comment对象后comments能力为true。迁移(FROM → TO)
discovery.capabilities.feed/discovery.routes.feed的客户端 → 改用discovery.capabilities.comments;评论/活动经通用数据 API 操作sys_comment/sys_activity(/api/v1/data/sys_comment/…)。PROTOCOL_MAJOR保持 15)。设计决策(请维护者复核)
comments的判定我选择「跟踪sys_comment对象存在性」而非硬编码true——理由:sys_comment由 audit slate(ADR-0052 default-loaded)提供,object-existence 判定最诚实、避免 declared≠enforced。若倾向永远true或其它信号,请告知。验证
pnpm turbo run build --filter=!@objectstack/docs—— 71 任务全绿。check:api-surface/check:docs/check:spec-changes/check:skill-refs全部 in-sync。capabilities.feeds复数为对象级开关,不同概念,保留)。Closes #3180.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HtN5uPoPnFzkSJ2HcwzgtG
Generated by Claude Code