feat(objectql,webhooks): ADR-0029 K0 single-owner check + K2.a webhooks ownership pilot#1433
Merged
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
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 oneowncontributor. A second cross-package owner is already rejected eagerly inregisterObject(throws); this additionally catches extend-with-no-owner (which would otherwise silently resolve to nothing). Intended to run once kernel bootstrap completes. Covered byregistry-single-owner.test.ts.K2.a — webhooks ownership pilot (
plugin-webhooks←platform-objects)Moves the
sys_webhookobject definition out of theplatform-objectsmonolith into@objectstack/plugin-webhooks, where it joins its siblingsys_webhook_delivery— so the plugin owns its data model + behavior as one unit (the ADR-0029 thesis).platform-objectsno longer defines/exportssys_webhook;/integrationis now an empty barrel (kept to avoid churning theexportsmap / tsup entries mid-decomposition — removed in K4).@objectstack/plugin-webhooks/schemainstead.WebhookOutboxPluginalready registeredsys_webhookat runtime — only the definition's home moved. Setup-app nav (referencessys_webhookby name) and existing i18n bundles (object-name keyed) keep working.Notes on two deliberate scope decisions
platform-objectsis a dependency ofplugin-webhooks, so a facade would cycle) andsys_webhookhad no external importers — so a clean move + importer update is correct. Documented inline.plugin-webhookshas no i18n infrastructure (itssys_webhook_deliveryships inline labels only).sys_webhookis removed from theplatform-objectsextract 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): greenhttps://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
Generated by Claude Code