Skip to content

feat(plugin-approvals,platform-objects): ADR-0029 K2.b approvals domain ownership + D7 nav#1440

Merged
os-zhuang merged 3 commits into
mainfrom
claude/adr-0029-k2b-approvals-ownership
Jun 1, 2026
Merged

feat(plugin-approvals,platform-objects): ADR-0029 K2.b approvals domain ownership + D7 nav#1440
os-zhuang merged 3 commits into
mainfrom
claude/adr-0029-k2b-approvals-ownership

Conversation

@os-zhuang
Copy link
Copy Markdown
Contributor

Implements ADR-0029 K2.b — moves the approvals domain out of the platform-objects monolith into its capability plugin, and is the first domain move done with the D7 nav-contribution mechanism in place (so the menu moves with the objects).

What moves

sys_approval_request / sys_approval_action@objectstack/plugin-approvals, which already registers and operates them (the durable approval state behind ADR-0019 approval-as-flow-node). The plugin now owns its data model + behavior + admin menu as one unit.

  • Object definitions moved (git mv, preserving history) into plugin-approvals; platform-objects no longer exports them from /audit. Runtime is unchanged — the plugin already registered these objects at runtime; only the definition's home moved. (No re-export facade: the dependency direction would cycle, and there are no external importers — same as K2.a webhooks.)
  • D7 navigation — the Setup app's group_approvals entries (Requests, Action History) move from platform-objects' SETUP_NAV_CONTRIBUTIONS into plugin-approvals' navigationContributions. The owner ships the menu for the slot it owns; an absent plugin leaves the slot empty (plus the existing requiresObject gating).
  • i18n (D8) — removed from the platform-objects i18n extract config; the existing generated translation bundles keep working at runtime (object-name keyed). Migrating the i18n extraction/bundles into the plugin remains the tracked cross-cutting follow-up — best done with the os i18n extract tooling rather than hand-editing the ~13k-line generated files.

Verification

  • turbo build (platform-objects + plugin-approvals + dep graph, incl. DTS type-check): green
  • Tests: plugin-approvals 30 (incl. a new nav-contribution test asserting the plugin owns both objects and contributes the group_approvals slot), platform-objects 78 — green
  • Repo-wide: no remaining references to the approval objects outside their new home.

Notes

  • plugin-approvals no longer imports from platform-objects in code; the package.json dependency is left in place to avoid lockfile churn (consistent with K2.a) and can be dropped in a cleanup pass.
  • This establishes the repeatable pattern for the remaining K2 domains (security/RBAC, etc.). The messaging-adjacent domains (jobs/email/audit/notifications) are intentionally not touched here to avoid colliding with concurrent message-engine work.

https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4


Generated by Claude Code

…in ownership + D7 nav

Move sys_approval_request / sys_approval_action out of the platform-objects
monolith into @objectstack/plugin-approvals, which already registers and
operates them — the plugin now owns its data model, behavior, and admin menu
as one unit.

- Object definitions moved (git mv) to plugin-approvals; platform-objects no
  longer exports them from /audit. Runtime unchanged.
- D7: group_approvals Setup nav entries move from platform-objects'
  SETUP_NAV_CONTRIBUTIONS into plugin-approvals' navigationContributions — the
  owner ships the menu for its slot; absent plugin → empty slot.
- D8: removed from the platform-objects i18n extract config; existing generated
  bundles keep working (object-name keyed). Plugin-side i18n extraction remains
  the tracked follow-up.

Tests: plugin-approvals 30 (incl. new nav-contribution test), platform-objects
78 — green; turbo build (incl. DTS type-check) green.

https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 1, 2026 5:17am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/m labels Jun 1, 2026
@os-zhuang os-zhuang marked this pull request as ready for review June 1, 2026 04:51
Previous Test Core failed only in @objectstack/driver-mongodb, where
mongodb-memory-server could not download the MongoDB binary from
fastdl.mongodb.org (network/infra flake) — unrelated to this PR (approvals
domain move). Verified: no file outside plugin-approvals imports the moved
objects, and local full `turbo run test` is green except that same download error.

https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
@os-zhuang os-zhuang merged commit 4cc2ced into main Jun 1, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants