Skip to content

refactor(audit): retire service-feed; sys_comment canonical (ADR-0052 §5) - #1955

Merged
os-zhuang merged 1 commit into
mainfrom
feat/adr-0052-p1-retire-service-feed
Jun 16, 2026
Merged

refactor(audit): retire service-feed; sys_comment canonical (ADR-0052 §5)#1955
os-zhuang merged 1 commit into
mainfrom
feat/adr-0052-p1-retire-service-feed

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

ADR-0052 §5 decision: sys_comment / sys_activity is the canonical record-collaboration + timeline backend; @objectstack/service-feed is retired. Ends the split-brain.

There were two parallel implementations of "comments + reactions + timeline + subscriptions on a record":

sys_comment/sys_activity (kept)service-feed (retired)
Durability✅ DB-backed❌ in-memory only (data lost on restart)
Default-loaded❌ opt-in
UI consumes it✅ ChatterPanel❌ never (enabling feed was a verified no-op)
Nested REST✅ generic data API/data/{obj}/{id}/feed unmounted (404)

Picking the durable, default, UI-wired system reaches "one backend" now at near-zero risk; service-feed's only edge (a unified typed stream) is obtained on sys_activity (its type enum already carries event kinds). Investing in service-feed would mean weeks of cross-repo work (DB adapter + REST + ChatterPanel + migration) to duplicate a working system.

Changes

  • Delete the @objectstack/service-feed package.
  • Remove the feed capability from the CLI CAPABILITY_PROVIDERS + the cli→service-feed dep + the changeset package list.
  • ADR-0052 §5 records the decision + rationale.

No app depended on it (CLI was the only referencer; HotCRM had it transitively but never required it; objectui doesn't consume it). The vestigial spec contracts (feed.zod/feed-api.zod/IFeedService) are woven into component.zod/protocol.zod/objectql — a separate type-surface cleanup, tracked as follow-up.

⚠️ CI note

The CLI build is already red on main from a pre-existing CEL drift in validate-expressions.ts (ExprSchemaHint/ExprValidationResult, #1933 area — in-flight in another worktree). This PR touches none of those files (only serve.ts/package.json/changeset + the deleted package); serve.ts compiles cleanly. The red is not introduced here and clears when the CEL fix lands.

🤖 Generated with Claude Code

…ckend (ADR-0052 §5)
Ends the split-brain. There were two parallel record-collaboration/timeline
implementations: sys_comment/sys_activity (DB-backed, default-loaded, the
ChatterPanel's actual source of truth) and @objectstack/service-feed (an
in-memory, non-durable, UI-unconsumed parallel feed whose nested REST route was
never even mounted). Decision (ADR-0052 §5): keep sys_comment as canonical and
retire service-feed.
- Delete the @objectstack/service-feed package (in-memory adapter, feed_item/
feed_reaction/record_subscription objects, FeedServicePlugin).
- Remove the `feed` capability from the CLI CAPABILITY_PROVIDERS resolver and
the cli → service-feed dependency; drop it from the changeset package list.
- Fix a stale comment in system-file.object.ts.
- ADR-0052 §5 records the decision + rationale (durable/UI-wired wins over an
unshippable better-model); the unified typed timeline lives on sys_activity.
No app depended on service-feed (CLI was the only referencer). The vestigial
spec contracts (feed.zod/feed-api.zod/IFeedService) are woven into component.zod/
protocol.zod/objectql and are a separate type-surface cleanup (follow-up).
NOTE: the CLI build is red on main from a pre-existing CEL drift in
validate-expressions.ts (#1933 area, in-flight in another worktree), unrelated
to this change — this commit touches none of those files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specBuildingBuildingPreview, CommentJun 16, 2026 8:35am

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file tests tooling labels Jun 16, 2026
@os-zhuang
os-zhuang merged commit 2daa8e2 into mainJun 16, 2026
12 of 14 checks passed
@os-zhuang
os-zhuang deleted the feat/adr-0052-p1-retire-service-feed branch June 16, 2026 08:35
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/cli, packages/services.

18 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/cloud-artifact-api.mdx(via packages/cli)
  • content/docs/concepts/implementation-status.mdx(via @objectstack/cli)
  • content/docs/concepts/packages.mdx(via @objectstack/cli)
  • content/docs/getting-started/cli.mdx(via @objectstack/cli)
  • content/docs/getting-started/quick-start.mdx(via @objectstack/cli)
  • content/docs/guides/authentication.mdx(via @objectstack/cli)
  • content/docs/guides/client-sdk.mdx(via @objectstack/cli)
  • content/docs/guides/hook-bodies.mdx(via packages/cli)
  • content/docs/guides/packages.mdx(via @objectstack/cli, packages/services)
  • content/docs/guides/project-scoping.mdx(via @objectstack/cli)
  • content/docs/guides/runtime-services/audit-service.mdx(via packages/services)
  • content/docs/guides/runtime-services/data-service.mdx(via packages/cli)
  • content/docs/guides/runtime-services/index.mdx(via packages/cli, packages/services)
  • content/docs/guides/runtime-services/settings-service.mdx(via packages/services)
  • content/docs/guides/skills.mdx(via packages/cli)
  • content/docs/protocol/objectos/i18n-standard.mdx(via packages/services)
  • content/docs/protocol/objectos/plugin-spec.mdx(via @objectstack/cli)
  • content/docs/protocol/objectos/realtime-protocol.mdx(via @objectstack/cli)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

os-zhuang added a commit that referenced this pull request Jul 18, 2026
… (#3186)
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).
Claude-Session: https://claude.ai/code/session_01HtN5uPoPnFzkSJ2HcwzgtG
Co-authored-by: Claude <noreply@anthropic.com>
os-zhuang added a commit that referenced this pull request Jul 18, 2026
#3204)
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.
Claude-Session: https://claude.ai/code/session_01HtN5uPoPnFzkSJ2HcwzgtG
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filedocumentationImprovements or additions to documentationsize/xlteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@os-zhuang