Skip to content

feat(objectql,webhooks): ADR-0029 K0 single-owner check + K2.a webhooks ownership pilot#1433

Merged
os-zhuang merged 1 commit into
mainfrom
claude/adr-0029-k0-webhooks-pilot
Jun 1, 2026
Merged

feat(objectql,webhooks): ADR-0029 K0 single-owner check + K2.a webhooks ownership pilot#1433
os-zhuang merged 1 commit into
mainfrom
claude/adr-0029-k0-webhooks-pilot

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

First implementation increment for ADR-0029: the K0 single-owner backstop and the K2.a webhooks ownership pilot.

K0 — single-owner-per-object backstop (@objectstack/objectql)

SchemaRegistry.assertSingleOwnerPerObject() — the install-time check for the kernel-decomposition invariant: every registered object must resolve to exactly one own contributor. A second cross-package owner is already rejected eagerly in registerObject (throws); this additionally catches extend-with-no-owner (which would otherwise silently resolve to nothing). Intended to run once kernel bootstrap completes. Covered by registry-single-owner.test.ts.

K2.a — webhooks ownership pilot (plugin-webhooksplatform-objects)

Moves the sys_webhook object definition out of the platform-objects monolith into @objectstack/plugin-webhooks, where it joins its sibling sys_webhook_delivery — so the plugin owns its data model + behavior as one unit (the ADR-0029 thesis).

  • platform-objects no longer defines/exports sys_webhook; /integration is now an empty barrel (kept to avoid churning the exports map / tsup entries mid-decomposition — removed in K4).
  • Import from @objectstack/plugin-webhooks/schema instead.
  • Runtime is unchanged: WebhookOutboxPlugin already registered sys_webhook at runtime — only the definition's home moved. Setup-app nav (references sys_webhook by name) and existing i18n bundles (object-name keyed) keep working.

Notes on two deliberate scope decisions

  • Clean move, not a re-export facade. ADR-0029 prefers a facade, but here the dependency direction forbids it (platform-objects is a dependency of plugin-webhooks, so a facade would cycle) and sys_webhook had no external importers — so a clean move + importer update is correct. Documented inline.
  • i18n migration deferred + recorded. plugin-webhooks has no i18n infrastructure (its sys_webhook_delivery ships inline labels only). sys_webhook is removed from the platform-objects extract config; existing generated bundles keep working (object-name keyed). Building plugin-side i18n extraction is the tracked next sub-task — this PR adds ADR-0029 D8 recording that object migration must carry its i18n resources, per reviewer feedback.

Verification

  • turbo build (objectql + platform-objects + plugin-webhooks + full dependency graph, incl. DTS type-check): green
  • Tests: objectql 55, platform-objects 75, plugin-webhooks 45 — all green

https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4


Generated by Claude Code

…ks ownership pilot

K0 (@objectstack/objectql):
- Add SchemaRegistry.assertSingleOwnerPerObject() — install-time backstop
  for the kernel-decomposition invariant (exactly one owner per object;
  also catches extend-with-no-owner). Unit-tested in
  registry-single-owner.test.ts.

K2.a (webhooks pilot, @objectstack/plugin-webhooks <- @objectstack/platform-objects):
- Move the sys_webhook object definition into plugin-webhooks alongside its
  sibling sys_webhook_delivery, so the plugin owns both data + behavior.
- platform-objects no longer defines/exports sys_webhook; /integration is now
  an empty barrel (retained to avoid churning exports/tsup during decomposition).
- Import from @objectstack/plugin-webhooks/schema instead.
- Runtime unchanged (the plugin already registered sys_webhook); setup nav
  (name-keyed) and existing i18n bundles still work. Plugin-side i18n
  extraction is a tracked follow-up (ADR-0029 D8).

Records the i18n-resource-migration requirement in ADR-0029 (D8 + K2 template).

Tests: objectql 55, platform-objects 75, plugin-webhooks 45 — all green;
turbo build (incl. dep graph + DTS type-check) green.

https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

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 3:24am

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 03:39
@os-zhuang os-zhuang merged commit eea3f1b 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