Repository navigation
fix(spec): the retired connector.webhooks refusal prescribes the declared-webhook model - #27499
Conversation
…ared-webhook model A declared top-level webhook is read from the metadata registry and writes no sys_webhook row (ADR-0131 D2). The refusal, the protocol-18 upgrade note for the connector resilience family and the comments that carry the same sentence said it "is materialized into sys_webhook". Prose only: the refusal, its code and the accept set are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgrsarJGTAxa3CuzzA
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 166 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 2fcf10272cbc1ed88b05e7349c06e53819d3b36d && git checkout 2fcf10272cbc1ed88b05e7349c06e53819d3b36d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 57c51aab4d2f63293676e9412daed8a5fc54c1bc 4ec164b9143e7f4f0385ef2c651ed72f22a5ba9b && git checkout -B drift-repro 57c51aab4d2f63293676e9412daed8a5fc54c1bc && git merge --no-ff 4ec164b9143e7f4f0385ef2c651ed72f22a5ba9b
node scripts/docs-audit/affected-docs.mjs --json 57c51aab4d2f63293676e9412daed8a5fc54c1bc |
…the declared-webhook model Its proof already pins ADR-0131 D2: no sys_webhook row is written, the plugin binds the declared-webhook reader over the registry and the dispatcher delivers. The summary still said a stack/connector-authored webhook is materialized into a sys_webhook row on boot. Id, proofId, proofRef and ledger bindings are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgrsarJGTAxa3CuzzA
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: Triage seat, taking Generated by Claude Code |
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: Triage seat, taking Generated by Claude Code |
Contract reviewServed-tier: Re-review on a moved head. Prior record (unposted) on ① Derived judgments
② Semver level
Clause-②: no — holds against the diff (prose only; refusal, code and path identical before and after). ③ Boundary flags
④ Design judgmentJudged against ADR-0131 D2 ("Declared metadata is code and is never materialized as rows"; "No seeder writes them into any table", L291–302 on the head), its first consumer for webhooks (
Delta file, read (lane's ACCEPT, not reviewed): the new No must-fix. Should-fix: the two ragged comment re-wraps (connector.zod.ts L262, retired-keys entry L12), cosmetic. Escalation (own card, not this PR): the Check-runs on the head that carry the derived gates, all success: TypeScript Type Check (check:docs, check:generated, check:api-surface, check:spec-changes, check:upgrade-guide), Test Core and Test Core 1/8–8/8, Spec property liveness, Check Changeset (both), Governed Surface Queue Guard, Lint · PM dispatch-gates, Lint · ESLint, Lint & Repo Gates, PR-body guards (both), Build Core, Build Docs, Dogfood Regression Gate. Nothing pending. Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:spec#3 · os-support-ai · session_01WGufzgbJhFoXYsLSe5WSPP 维护者速读 (席位终稿)
席位意见:接受。分诊契约复核 PASS(6496521580,就在当前 head 上),没有 must-fix;两处注释换行不齐是外观问题,记为偏差。 席位核对 · ACCEPT ·
|
domain:spec#3 · os-support-ai · session_01WGufzgbJhFoXYsLSe5WSPP
Requested by Yibo Wang · project thread
Fixes #27448
Clause-②: no
Metadata-protocol: none
Prose only. The refusal, its code, its path and the accept set do not move. Measured on the compile repro below: before and after,
objectstack compileexits 2 with one issue,code: invalid_type,expected: never,path: ["webhooks"]. Only themessagetext changes.维护者速读
webhooks键被拒收时,处方原说「顶层webhooks:会物化进sys_webhook」,现改为 ADR-0131 D2 的真实模型:平台从元数据注册表读取声明的 webhook 并在记录事件上投递,不写sys_webhook行。sys_webhook行;实测声明的 webhook 写入 0 行。packages/spec/src/integration/connector.zod.ts的WEBHOOKS_RETIRED;packages/spec/src/migrations/entries/semantic/18.connector-resilience-keys-retired.ts的replacement/reason;新 pin 在connector-resilience-keys-retirement.test.ts。pnpm --filter @objectstack/spec exec vitest run src/integration/connector-resilience-keys-retirement.test.ts,预期 22/22 通过,其中一条断言新处方含「reads a declared webhook from the metadata registry」且不含「materialized」。What changes
WEBHOOKS_RETIRED(theconnector.webhookstombstone's prescription) now says the stack's top-levelwebhooks:collection is read from the metadata registry and delivered on record events, writes nosys_webhookrow, and thatsys_webhookholds only the webhooks an organization authors at runtime. It also drops "never materialized intosys_webhook" from the account of why a nested webhook never ran: the dispatcher never read it.connector-resilience-keys-retired:replacementsays the top-level collection is read from the metadata registry and writes nosys_webhookrow;reasonsays a nested webhook was never registered as awebhookitem, read by the webhook dispatcher or delivered (was "registered, materialized or delivered").migrations/registry.ts.template(the upgrade textos migrateand the generated upgrade guide project): the same correction.content/docs/references/integration/connector.mdx, bothwebhooksrows, regenerated bygen:docsfrom the new.describe()(never by hand).webhooksJSDoc onConnectorBaseSchema(ships indist/*.d.ts), two section comments inconnector.zod.ts, the conversion docblock inconversions/registry.ts, and the retired-key and retired-def entry files for this retirement.packages/spec/scripts/liveness/proof-registry.mts, rowwebhook-materialization: the summary said "a stack/connector-authored webhook is materialized into a dispatchable sys_webhook row on boot"; it now states what its proof (packages/qa/dogfood/test/webhook-materialization.dogfood.test.ts) pins: a webhook declared in the top-levelwebhooks:collection is dispatched from the metadata registry and writes no sys_webhook row, through thedeclaredWebhooksreader the plugin binds on the data engine alone, withobject→object_nameapplied, on a boot without realtime. The comment beside its bindings says the same.id,label,proofId,proofRef,boundandledgerBindingsare unchanged.patchchangeset for@objectstack/spec.Not touched: released
CHANGELOG.mdentries andcontent/docs/releases/**(release-owned). No hit inskills/**ordocs/adr/**for the old sentence or its kin.The message, before and after
Before (origin/main 273137d)
After (this branch)
Tests
packages/spec/src/integration/connector-resilience-keys-retirement.test.ts: thewebhooksrefusal containsreads a declared webhook from the metadata registryandit writes no \sys_webhook` row for it, and matches neithermaterialized into `sys_webhook`normateriali[sz]; the D3 entry'sreplacementcontainsreads from the metadata registryandwrites no `sys_webhook` row, and neitherreplacementnorreasonsaysmateriali[sz]. The existing pins (path,invalid_type, the opening sentence,top-level `webhooks:` collection`, the migrate sentence, no tracker number) are unchanged and still green.4ec164b9(liveness summary), underos-verify-lock:pnpm --filter @objectstack/spec check:livenessgreen (✓ … every governed-type property … is classified, state counts current: 1219 classified); the liveness script testsvitest run scripts/liveness/12/12 files, 358/358;pnpm --filter @objectstack/spec test:repo86/86 files, 1420/1420.80e34d7f, all underos-verify-lock(shared-box seconds):pnpm --filter @objectstack/spec test(local project): 750/750 files, 22313 passed, 1 todo.pnpm --filter @objectstack/spec test:repo(the repo project, which holdsconnector-resilience-keys-retirement.test.ts): 86/86 files, 1420/1420 tests.pnpm --filter @objectstack/spec typecheck: exit 0 (check:test-typecheck: OK).connector.zod.tsreset toorigin/main's bytes (old sentence present: 1 hit; new phrase: 0 hits), the retirement test file reads 1 failed | 21 passed (22):AssertionError: expected '\connector.webhooks` was removed in @…' to contain 'reads a declared webhook from the met…'. Restored withgit checkout HEAD -- packages/spec/src/integration/connector.zod.ts;git diff HEAD` empty and the blob hash matches HEAD.Acceptance notes
webhook-materializationproof summary carried the same false sentence; corrected here (see What changes). Its proof already asserted ADR-0131 D2, so only text moved.skills/**ordocs/adr/**, so none is named.CHANGELOG.mdentries (@objectstack/specand five connector/automation packages) still carry the original retirement note's "never materialized intosys_webhook". That clause is about the nested array and was true of the model when it shipped; release-owned text, not edited.Verification
Measure first, on origin/main 273137d
examples/app-showcase(removed afterwards),webhooks: [{url:'http://x/c', events:['create']}] as anyadded toshowcase_status_api,npx objectstack compile: exit 2, one issue{"expected":"never","code":"invalid_type","path":["webhooks"]}with the "Before" message above (quoted verbatim from that run). Same copy against this branch's rebuilt spec: exit 2, the sameexpected,codeandpath, the "After" message.sys_webhookrow, on the code path.packages/plugins/plugin-webhooks/src/declared-webhooks.tsreads declared webhooks fromengine._registry.listItems('webhook')(falling back to the kernelmetadataservice) on every cache refresh; nosys_webhookinsert exists outside tests. Its pindeclared-webhooks.test.ts› "nothing writes a sys_webhook row: the plugin boot binds the reader and seeds zero rows" (engine.writes.filter((w) => w.object === 'sys_webhook')equals[]): 1 passed | 21 skipped,VERDICT command-exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat4ec164b9: 107 derived (round 0's 105 pluscheck:pm-governed-mergesandcheck:pnpm-flag-spellings). Reconciled with--ran: 107 accounted, 105 run, 2 NOT-MEASURED, 0 UNRUN (✓ dispatch-gates --ran). The two exit 3 are prerequisite misses that need a full repo build (spec check:skill-examples,check:dual-build-cjs-loads), not findings; CI's check-runs carry them.107 gate commands and exit codes (head 4ec164b)
Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzgrsarJGTAxa3CuzzA