You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split out from the naming-drift issue #1891 (webhook row) after a current-state investigation. Umbrella #1878.
What the audit called "naming drift" is actually a full disconnect
#1891 listed webhook as object → object_name / isActive → active naming drift (spec key ≠ consumed key). On investigation it is not a live consumer reading a differently-named key — it's that the entire spec WebhookSchema authoring surface is disconnected from the runtime dispatcher:
Spec side — WebhookSchema (packages/spec/src/automation/webhook.zod.ts:81,119) declares object / isActive. It's authored inside a Stack (stack.zod.ts:261 webhooks: z.array(WebhookSchema)) and by connectors (connector.zod.ts:271WebhookConfigSchema). It is not a registered metadata type (absent from kernel/metadata-type-schemas.ts).
Runtime side — the dispatcher runs off the sys_webhookdata object (plugins/plugin-webhooks/src/sys-webhook.object.ts), whose columns are object_name (:112) and active (:53). AutoEnqueuer reads row.object_name (auto-enqueuer.ts:267) and where: { active: true } (:176). These rows are admin-authored via the object's CRUD UI (sys-webhook.object.ts:43-44 — "so admins can at least toggle active and edit simple URL/method fields without round-tripping through code"), and self-healed on sys_webhook:changed.
The gap — there is no ingestion path that turns a stack/connector WebhookSchema (object/isActive) into a sys_webhook row (object_name/active). Connector webhooks are explicitly "not yet enforced — never read at registration" (connector.zod.ts:662, Audit: several event/subscription/connector enums are schema-only (declared, no runtime consumer) #3197). So authoring webhooks: on a stack produces webhook metadata artifacts that nothing materializes into dispatchable rows.
Consequence: a parse-time object → object_name alias on WebhookSchema (the "quick fix") would be inert — there is no consumer of the spec field to bridge to. Shipping it would be a false fix (ADR-0078). That's why this is split out rather than closed under #1891.
Decision needed (pick one)
A — build the bridge. Ingest stack/connector WebhookSchema into sys_webhook rows, mapping object → object_name, isActive → active, triggers/url/method/secret/… at that boundary. Closes the disconnect and the naming drift in one place. Overlaps Audit: several event/subscription/connector enums are schema-only (declared, no runtime consumer) #3197 (connector webhooks never read at registration). Larger; needs a home for the seeder (metadata ingestion or the webhooks plugin).
B — retire the spec authoring surface. Treat sys_webhook (admin-authored rows) as the single source of truth; demote/remove stack.webhooks + WebhookSchema (breaking — public export; needs a major + migration note), or mark it clearly [EXPERIMENTAL — not enforced / author sys_webhook rows instead] in the interim.
Recommendation: A if declarative/stack-authored webhooks are on the roadmap (it's the ADR-0078-correct end state); otherwise B's interim marking so authoring webhooks: isn't a silent no-op.
Split out from the naming-drift issue #1891 (webhook row) after a current-state investigation. Umbrella #1878.
What the audit called "naming drift" is actually a full disconnect
#1891listed webhook asobject → object_name/isActive → activenaming drift (spec key ≠ consumed key). On investigation it is not a live consumer reading a differently-named key — it's that the entire specWebhookSchemaauthoring surface is disconnected from the runtime dispatcher:WebhookSchema(packages/spec/src/automation/webhook.zod.ts:81,119) declaresobject/isActive. It's authored inside a Stack (stack.zod.ts:261 webhooks: z.array(WebhookSchema)) and by connectors (connector.zod.ts:271WebhookConfigSchema). It is not a registered metadata type (absent fromkernel/metadata-type-schemas.ts).sys_webhookdata object (plugins/plugin-webhooks/src/sys-webhook.object.ts), whose columns areobject_name(:112) andactive(:53).AutoEnqueuerreadsrow.object_name(auto-enqueuer.ts:267) andwhere: { active: true }(:176). These rows are admin-authored via the object's CRUD UI (sys-webhook.object.ts:43-44— "so admins can at least toggleactiveand edit simple URL/method fields without round-tripping through code"), and self-healed onsys_webhook:changed.WebhookSchema(object/isActive) into asys_webhookrow (object_name/active). Connectorwebhooksare explicitly "not yet enforced — never read at registration" (connector.zod.ts:662, Audit: several event/subscription/connector enums are schema-only (declared, no runtime consumer) #3197). So authoringwebhooks:on a stack produceswebhookmetadata artifacts that nothing materializes into dispatchable rows.Consequence: a parse-time
object → object_namealias onWebhookSchema(the "quick fix") would be inert — there is no consumer of the spec field to bridge to. Shipping it would be a false fix (ADR-0078). That's why this is split out rather than closed under #1891.Decision needed (pick one)
WebhookSchemaintosys_webhookrows, mappingobject → object_name,isActive → active,triggers/url/method/secret/… at that boundary. Closes the disconnect and the naming drift in one place. Overlaps Audit: several event/subscription/connector enums are schema-only (declared, no runtime consumer) #3197 (connector webhooks never read at registration). Larger; needs a home for the seeder (metadata ingestion or the webhooks plugin).sys_webhook(admin-authored rows) as the single source of truth; demote/removestack.webhooks+WebhookSchema(breaking — public export; needs a major + migration note), or mark it clearly[EXPERIMENTAL — not enforced / author sys_webhook rows instead]in the interim.Recommendation: A if declarative/stack-authored webhooks are on the roadmap (it's the ADR-0078-correct end state); otherwise B's interim marking so authoring
webhooks:isn't a silent no-op.Related
webhookin the livenessGOVERNEDset would have caught this automatically (see the GOVERNED-enrollment follow-up).