Skip to content

Commit bf94c93

Browse files
committed
liveness(webhook): carry the label/description re-grade to the lint pin and prose
The CLI advisory lint test reads the real webhook.json, so it now pins a declared webhook authoring every prop, label and description included, as silent. The showcase webhook comment and the platform checklist source line state the new grading. Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude <noreply@anthropic.com>
1 parent b9a2bcf commit bf94c93

3 files changed

Lines changed: 12 additions & 16 deletions

File tree

‎docs/qa/platform-checklist/areas/integration-system.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@
642642
],
643643
"source": [
644644
"packages/spec/src/automation/webhook.zod.ts#WebhookTriggerType (WebhookTriggerType enum + why undelete/api are absent; materialization contract; strict shape #4001)",
645-
"packages/spec/liveness/webhook.json (9 props live on the registry read; label/description dead since the boot seeder retired)",
645+
"packages/spec/liveness/webhook.json (9 props live on the registry read; label/description live on the Studio metadata list and quick-find, which read the declared item over GET /api/v1/meta/webhook)",
646646
"packages/plugins/plugin-webhooks/src/declared-webhooks.ts + auto-enqueuer.ts (the registry read and its remaps; trigger→event mapping incl. the #4639 bulk pair; #3196 unknown-trigger warn; the activation-ledger switch; an 18.0 database's seeded rows read beside the declaration)",
647647
"packages/services/service-messaging/src/http-outbox.ts#HttpRedeliverError (delivery statuses, attempts; HttpRedeliverError + assertHttpRedeliverable/assertRedeliverAllowed — terminal-only, the attempts===0 parked-row refusal, the fail-closed guard) + packages/services/service-messaging/src/http-signature-at-rest.integration.test.ts (redelivery replays the stored signature byte-for-byte)",
648648
"packages/plugins/plugin-webhooks/src/webhook-outbox-plugin.ts#session (POST /api/v1/webhooks/redeliver — session auth with NO capability gate by design ('every authenticated user counts'), #10740 activeOrganizationId threading, the 401/400/404/409/500 arms) + (the #8069 redeliver-guard install; its ABSENCE is an error-level log, not a silent pass)",

‎examples/app-showcase/src/automation/webhooks/index.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import { defineWebhook } from '@objectstack/spec/automation';
44

55
/**
66
* Outbound webhook — fans out task lifecycle events (create/update/delete)
7-
* to an external endpoint. No `label` / `description`: a declared webhook has
8-
* no Setup row to show them on, and the liveness ledger marks both dead.
7+
* to an external endpoint. A declared webhook has no Setup row, but a `label` /
8+
* `description` authored here is not inert: the liveness ledger grades both
9+
* `live`, because the Studio metadata list and quick-find show them, read off
10+
* `GET /api/v1/meta/webhook`.
911
* Authored via `defineStack({ webhooks })`; the webhooks plugin's dispatcher
1012
* reads this declaration from the registry (ADR-0131 D2) — no `sys_webhook`
1113
* row is written for it.

‎packages/lint/src/lint-liveness-properties.test.ts‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,13 @@ describe('lintLivenessProperties', () => {
251251
// #3494 PRUNED the aspirational dead props from the schema and the #3489
252252
// materializer bridge made every remaining prop live. ADR-0131 D2 then
253253
// retired that bridge: a declared webhook is read from the registry and has
254-
// no Setup row, so the two display-only props, `label` and `description`,
255-
// lost their only reader and the ledger marks them dead. Every delivery-
256-
// bearing prop stays silent. Runs against the REAL webhook.json, so a ledger
257-
// flip that is not carried to authors fails here.
254+
// no Setup row. The two display-only props, `label` and `description`, stay
255+
// live all the same: the Studio metadata list and quick-find draw them off
256+
// `GET /api/v1/meta/webhook`, so the ledger grades them live and nothing
257+
// warns. Runs against the REAL webhook.json, so a ledger flip that is not
258+
// carried to authors fails here.
258259

259-
it('warns on a declared webhook\'s label and description only — every delivery-bearing prop is live', () => {
260+
it('stays silent on a declared webhook that authors every prop, label and description included', () => {
260261
const findings = lintLivenessProperties({
261262
webhooks: [{
262263
name: 'showcase_task_changed',
@@ -272,14 +273,7 @@ describe('lintLivenessProperties', () => {
272273
description: 'Sends task lifecycle events to an external system.',
273274
}],
274275
});
275-
expect(findings.map((f) => [f.rule, f.message.match(/`(\w+)`/)?.[1]])).toEqual([
276-
['liveness-dead-property', 'label'],
277-
['liveness-dead-property', 'description'],
278-
]);
279-
for (const f of findings) {
280-
expect(f.where).toBe("webhook 'showcase_task_changed'");
281-
expect(f.hint).toContain('no Setup row');
282-
}
276+
expect(findings).toEqual([]);
283277
});
284278

285279
it('stays silent on a declared webhook that authors only what is delivered on', () => {

0 commit comments

Comments
 (0)