Skip to content

refactor(audit): move sys_attachment ownership audit → storage (ADR-0052 P0b) - #1954

Merged
os-zhuang merged 1 commit into
mainfrom
feat/adr-0052-p0b-attachment-ownership
Jun 16, 2026
Merged

refactor(audit): move sys_attachment ownership audit → storage (ADR-0052 P0b)#1954
os-zhuang merged 1 commit into
mainfrom
feat/adr-0052-p0b-attachment-ownership

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

ADR-0052 P0b (partial) — move sys_attachment ownership out of the audit/compliance ledger.

plugin-audit was a dumping ground registering 5 objects across 5 domains. This sheds one: a file↔record link (sys_attachment) belongs with the storage domain. plugin-audit stops registering it; service-storage now contributes it (the definition stays in platform-objects). Both plugins are always-on, so the object stays available — no behavior change.

sys_notification is intentionally not moved: it is mid-migration to an event model (migrate-sys-notification-to-event.ts, ADR-0030); moving it now would collide with that in-flight work. Deferred and documented.

Changes

  • plugin-audit: drop SysAttachment from registered objects + import.
  • service-storage: depend on @objectstack/platform-objects, import + register SysAttachment (no dependency cycle — platform-objects doesn't depend on storage).
  • ADR-0052 §6 P0b updated.

Verification (showcase, browser)

  • meta/object/sys_attachment → 200 (still registered, now via storage); data/sys_attachment → 200; no double-registration / collision at boot.
  • plugin-audit 18/18 + service-storage 48/48 tests pass; both build clean.

Builds on

#1948 (trackHistory §5b.1) + #1952 (milestones §5b.2). Remaining: sys_notification (after its event migration), P1 split-brain convergence, P2 event bus, objectui feed surfacing.

🤖 Generated with Claude Code

…052 P0b)
A file↔record link belongs with the storage domain, not the compliance ledger.
`plugin-audit` stops registering `sys_attachment`; `service-storage` now
contributes it (definition stays in platform-objects). Both plugins are
always-on, so the object stays available — no behavior change. Audit sheds one
of its dumping-ground objects, moving toward a pure append-only ledger.
`sys_notification` is intentionally NOT moved: it is mid-migration to an event
model (migrate-sys-notification-to-event.ts, ADR-0030) and touching it now would
collide with that in-flight work.
- plugin-audit: drop SysAttachment from registered objects + import
- service-storage: depend on platform-objects, import + register SysAttachment
- ADR-0052 §6 P0b updated (sys_attachment done; sys_notification deferred)
Verified in the showcase: sys_attachment still resolves (meta + data 200), no
double-registration; plugin-audit 18/18 + service-storage 48/48 tests pass.
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)
specReadyReadyPreview, CommentJun 16, 2026 8:27am

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file labels Jun 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

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

  • content/docs/concepts/implementation-status.mdx(via @objectstack/plugin-audit)
  • content/docs/concepts/packages.mdx(via @objectstack/plugin-audit)
  • content/docs/getting-started/cli.mdx(via @objectstack/plugin-audit)
  • content/docs/guides/packages.mdx(via @objectstack/plugin-audit, packages/services)
  • content/docs/guides/production-readiness.mdx(via @objectstack/plugin-audit)
  • content/docs/guides/runtime-services/audit-service.mdx(via packages/services)
  • content/docs/guides/runtime-services/index.mdx(via packages/services)
  • content/docs/guides/runtime-services/settings-service.mdx(via packages/services)
  • content/docs/protocol/objectos/i18n-standard.mdx(via packages/services)

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
os-zhuang merged commit bb66231 into mainJun 16, 2026
12 of 14 checks passed
@os-zhuang
os-zhuang deleted the feat/adr-0052-p0b-attachment-ownership branch June 16, 2026 08:19
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/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@os-zhuang