feat(spec)!: retire vestigial feed contracts + protocol surface (#1959)#3186
Merged
Conversation
ADR-0052 §5 follow-up. `service-feed`'s runtime was deleted in #1955; `sys_comment` / `sys_activity` are the canonical record-collaboration / timeline backend. This removes the dead type surface that still pointed at the deleted runtime — every removed method was already unreachable (feed REST was never mounted → 404; the protocol impl was never wired with a feed service, so requireFeedService() could only throw). No behavior change. Removed: - spec: contracts/feed-service (IFeedService), api/feed-api.zod (FeedApiContracts + request/response types), data/subscription.zod, and the four feed regions of api/protocol.zod (imports, z.function stubs, type re-exports, FeedProtocol interface + mixin) — plus their tests and barrels. - metadata-protocol: the getFeedService ctor param, requireFeedService(), and the 14 feed method implementations. Constructor is now (engine, getServicesRegistry?, environmentId?). - objectql: protocol-feed.test.ts + the positional call-site updates. - client: the feed = {...} SDK accessor and its feed response type imports. Kept: data/feed.zod trimmed to FeedItemType / FeedFilterMode (live UI config for the record activity component). Regenerated api-surface.json, json-schema.manifest.json, and content/docs/references. The residual discovery/dispatcher feed capability surface is tracked as a follow-up (#3180). 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 08:59
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.
背景
ADR-0052 §5 后续、承接 #1959。
sys_comment/sys_activity是记录协作/时间线的唯一后端;@objectstack/service-feed的运行时已在 #1955 删除。本 PR 清掉残留的纯类型面——它仍指向已删除的运行时,但全部是死代码:undefined /* getFeedService */),requireFeedService()只可能抛异常。因此这是 npm 类型面的 breaking 变更,但零行为变化。
变更内容(按包)
@objectstack/speccontracts/feed-service.ts(IFeedService)、api/feed-api.zod.ts(FeedApiContracts+ 全部请求/响应类型)、data/subscription.zod.ts,及各自*.test.ts与 barrel 导出。api/protocol.zod.ts删 4 个 feed 区域:feed-api.zodimport 块、// Feed Operationsz.function()桩、// Feed Types再导出块、FeedProtocol接口及其在ObjectStackProtocol的 mixin。api-surface.json、json-schema.manifest.json、content/docs/references/**(api/feed-api.mdx自动删除,data/feed.mdx收缩)。@objectstack/metadata-protocolgetFeedService构造参数/私有字段、requireFeedService()、14 个 feed 方法实现。构造函数签名(engine, getServicesRegistry?, getFeedService?, environmentId?)→(engine, getServicesRegistry?, environmentId?)。@objectstack/objectqlprotocol-feed.test.ts;同步更新所有位置传参的构造函数调用点(去掉第 3 个undefined)。@objectstack/clientfeed = {…}SDK 访问器及其 feed 响应类型 import/re-export。明确保留(不动)
data/feed.zod.ts修剪保留FeedItemType/FeedFilterMode—— 它们是RecordActivityProps(record 活动时间线 UI 组件,component.zod.ts)的在用配置枚举,与 feed 后端无关。object.zod.ts的feeds:能力开关、realtime 订阅面、task_feed_import命名、system的NotificationChannelSchema—— 均为不同概念。feed: '/api/v1/feed'暂留(仅为满足 discoveryApiRoutes的routes.feed类型,已加注释),随 follow-up 一并清理。版本策略(请维护者确认)
fixed 版本组;
protocol-version.test.ts把PROTOCOL_MAJOR(15)锁定到包 major,而 major 仅为可著写元数据面的破坏保留。本次未删任何可著写 key(feeds:开关、RecordActivity组件配置均保留),故 changeset 用 minor + 醒目的 "Breaking (npm type surface)" + 每个删除项的 FROM→TO 迁移,PROTOCOL_MAJOR保持 15。若倾向严格 semver 升 major(整组升 16.0.0 + 同步PROTOCOL_VERSION+ ADR-0087 迁移链),请告知。Follow-up
残留的 discovery/dispatcher feed 能力面(
routes.feed、WellKnownCapabilities.feed、dispatcher/api/v1/feed条目、getDiscovery()中恒为 false 的feed:产出),以及comments能力也误挂在已删除'feed'服务上(现恒 false)需改挂 —— 已开 #3180 跟踪。验证
pnpm turbo run build --filter=!@objectstack/docs—— 71 个任务全绿(spec → metadata-protocol → objectql → client → rest → examples)。pnpm turbo run test --filter=!@objectstack/docs—— 131 个任务全绿。check:api-surface/check:docs/check:spec-changes/check:skill-refs全部 in-sync。IFeedService/feed-api.zod/getFeedService/FeedProtocol/client.feed.等);FeedItemType/FeedFilterMode仍导出且被component.zod.ts消费。Closes #1959.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HtN5uPoPnFzkSJ2HcwzgtG
Generated by Claude Code