Skip to content

fix(spec,plugin-webhooks)!: retire the GET webhook method and park stored GET subscriptions with a visible reason - #34239

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/area-A5b-34098
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/area-A5b-34098

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #34098

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — git grep of skills/ finds no webhook method value taught anywhere, so no page names GET as a webhook method.

BREAKING — a webhook can no longer be authored with method: 'GET', on either surface: WebhookSchema.method (@objectstack/spec/automation) and the sys_webhook method select (@objectstack/plugin-webhooks). A row already stored with get is parked with a visible reason, never converted. Migration: set the method to POST, PUT, PATCH or DELETE. ADR-0087 D3 entry webhook-method-get-retired; no D2 conversion exists.

Maintainer ruling (6902187601), quoted as tapped: 「A 从契约中移除 GET」 — spec 枚举和 sys_webhook 下拉都去掉 GET,属破坏性变更;已存的 GET 行停用并写明原因,不自动改成 POST。

维护者速读

  • 改了什么:Webhook 的请求方法去掉 GET(spec 枚举和 Setup 下拉两处);已经存成 GET 的 Webhook 不再投递,每个事件记一条带原因的 dead 投递记录。
  • 为什么改:每次投递都把事件放在请求正文里,GET 请求没有正文,所以 GET Webhook 从来没有成功送达过一次。
  • 风险与回滚:破坏性变更,只影响写了 GET 的 Webhook(仓库内没有);已存的 GET 行不会被改成别的方法。回滚即还原本 PR。
  • 先看:packages/plugins/plugin-webhooks/src/auto-enqueuer.ts(parseRow 里的停用分支与刷新循环跳过凭据),packages/spec/src/automation/webhook.zod.ts(枚举与提示文案),.changeset/34098-webhook-method-get-retired.md。
  • 两分钟验证:pnpm --filter @objectstack/plugin-webhooks exec vitest run --maxWorkers=2 src/webhook-get-retired-34098.test.ts,预期 7 个测试全部通过。
  • 需要你做的:无,席位落地(需一次 spec 契约面的 CONTRACT_REVIEW_TIER 复核)。

What changes

  • Spec (packages/spec/src/automation/webhook.zod.ts): method is enumWithRetiredValues(['POST','PUT','PATCH','DELETE'], { GET: … }), default POST unchanged. method: 'GET' fails parse with a prescription naming the four methods; any other unknown value keeps zod's own message. HEAD was never in the enum and is not mentioned.
  • D3 entry (packages/spec/src/migrations/entries/semantic/18.webhook-method-get-retired.ts): the upgrade-guide entry. No D2 conversion: converting GET would start sending another method to an endpoint configured for GET.
  • Select (packages/plugins/plugin-webhooks/src/sys-webhook.object.ts): four options. The record validator now refuses an insert or update with method: 'get' (VALIDATION_FAILED, a field error invalid_option on method). The options.get leaf and its source hash leave all eleven locale bundles (regenerated with node scripts/check-i18n-bundles.mjs --write --filter=webhooks; the diff is 21 deletions only).
  • Park (packages/plugins/plugin-webhooks/src/auto-enqueuer.ts): parseRow sets parkedReason when the stored method is retired. The refresh loop then skips credential resolution for that row (a parked subscription carries no secret and no header map), and projectDeclared does the same for a declared webhook handed in by a reader that skipped the schema. Each matched event goes through the existing [security] a dropped webhook subscription leaves no durable record — and the naive fix hands an operator a redeliver button that sends UNSIGNED #8069 path to recordUndeliverable(): one dead row, 0 attempts, no signature, reason [VALIDATION_ERROR/400] webhook 'NAME' is stored with HTTP method GET … Fix: edit the webhook and set its method to POST, PUT, PATCH or DELETE …. Said once at error. Parked events never call enqueue, so the outbox's bodyless-GET refusal from fix(service-messaging): a GET or HEAD delivery through the HTTP outbox sends no body and is signed over what it sends #34067 is not reached. The stored method is never rewritten.
  • Declared webhooks: DeclaredWebhookSource.parseItem parses through WebhookSchema, so a declared GET is now refused there with the existing "declared webhook failed validation — not dispatched" warning and never reaches the dispatcher. declared-webhooks.ts is unchanged.
  • Docs: content/docs/automation/webhooks.mdx method row without GET, plus a "Stored GET webhooks are parked" note; content/docs/references/automation/webhook.mdx regenerated by gen:docs.

Sequencing: built after PR #34067 (#33895) merged (0d1443d0 on main, merged into this branch). Reviewer note N5 on #34067: until this PR lands, a GET webhook on main leaves only a lost-event log line and no delivery row, so this PR should ship in the same release as #34067.

Tests

New file packages/plugins/plugin-webhooks/src/webhook-get-retired-34098.test.ts, on a real SqlDriver (SQLite) under a real ObjectQL, with SqlHttpOutbox, MessagingService and HttpDispatcher:

  • save door: insert with get refused VALIDATION_FAILED (the engine's ValidationError; REST maps it to 400) with invalid_option on method, nothing stored; update to get refused, stored method still post; the four methods save; the select offers exactly four.
  • stored GET row (H1, H3): one dead row per event with 0 attempts, no signature, method: GET and the reason; a dispatcher tick sends nothing; redeliverHttp refused DELIVERY_NEVER_SENT; the park is reported once at error with code/status/method in meta; the stored method reads get through the driver and the engine.
  • CONTROL (H2): a POST row delivers one POST carrying the envelope.
  • declared GET: refused at parse by DeclaredWebhookSource; one handed in past the schema is parked with no credentials on the row.

Spec side, in the existing packages/spec/src/automation/webhook.test.ts: the four methods parse; GET is refused with invalid_value at ['method'] and the prescription's first sentence; TRACE keeps zod's message.

Acceptance notes

  • PM hypotheses: H1 holds (one dead row per event, reason present, no signature, fetch not called). H2 holds (the POST control delivers; healthy rows take the unchanged path). H3 holds (the method reads get after the park).
  • The park reason carries the standard-catalog pair [VALIDATION_ERROR/400], the pair webhook-legacy-cleartext.ts carries on its own delivery door; the save door's VALIDATION_FAILED is the engine record validator's own answer. A first cut stamped VALIDATION_FAILED in plugin-webhooks and check:error-code-provenance refused it (a registered code with no provenance row under the plugin's owner key); the standard-catalog member needs no ledger row, so no new error code and no ledger edit.
  • The spec's generated ratchets moved nothing: check:generated reports all 14 up to date and the diff touches nothing under api-surface/, authorable-surface/ or json-schema.manifest/, as an enum-value narrowing is expected to (the def, its exports and its key are unchanged); only the generated reference page shows the four values.

Verification

Final head b61479ce (main merged at 8ab601e3, #34067 included). Each reading names its head. At open, git merge-tree --write-tree against origin/main 7be32d39 is clean and none of the 27 newer main commits touches a file in this diff; main was not merged again so the battery stays on the final head.

Ablations at `4ff9df50` (each restored through a trap, git diff HEAD empty, HEAD blob hashes matched)
  • Park removed (retiredMethodParkReason returns undefined): 2 failed / 5 passed — expected 'pending' to be 'dead' for the stored GET row and for the declared GET past the schema.
  • GET put back in the select: 3 failed / 4 passed — expected undefined to be defined (insert admitted), expected undefined to match object { code: 'VALIDATION_FAILED' } (update admitted), the options list.
  • Spec enum back to z.enum(['GET', …]): 1 failed / 24 passed — expected true to be false (GET parsed).
Suites and gates
  • b61479ce: pnpm --filter @objectstack/plugin-webhooks test 26 files, 314 tests passed; typecheck exit 0.
  • 8ab601e3: pnpm --filter @objectstack/spec test 843 files, 26983 passed, 1 todo; typecheck exit 0. Spec test:repo is left to CI's Test Core.
  • 8ab601e3: pnpm --filter @objectstack/spec check:generated all 14 artifacts up to date.
  • 8ab601e3, direct dependents of plugin-webhooks: @objectstack/verify test 52 files, 439 passed; http-conformance's two webhook files 13 passed; cli --project unit on its webhook-touching files 4 files, 176 passed (narrowed to the files that name webhooks; the full cli suites are CI's). Spec's dependents are CI's.
  • Dogfood battery (pnpm --filter @objectstack/dogfood test under the verify lock, closure built), final head b61479ce: VERDICT command-exit 0, Test Files 469 passed / 3 skipped (472), Tests 3974 passed / 42 skipped (4016), no failure. The same counts at 69f9d19c.
  • Derived gates (dispatch-gates.mjs --commands, 118 families) at 69f9d19c / cf97ed4d, the first 48 re-run at b61479ce: 116 exit 0. check:error-code-provenance and check:query-options-erasure were red on the first cut (a stamped VALIDATION_FAILED, three as any query-option casts in the new test) and are exit 0 after the fix. NOT MEASURED (exit 3, prerequisite not met, CI runs them): check:skill-examples (needs @objectstack/client-react built), check:dual-build-cjs-loads (needs every package built). --ran reconciliation: 118 derived, 116 run, 2 NOT-MEASURED, 0 UNRUN. pnpm lint exit 0. check-changeset-no-major, check-adr-0087-registration (registered webhook-method-get-retired, new here), check-closing-keyword-parity, check-partof-closing-keyword, check:nul-bytes, check:error-code-casing: exit 0 on this body and changeset.

Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3

🤖 Generated with Claude Code

…ored GET subscriptions (WIP)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
… the sys_webhook translation bundles

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…he sender now declares it

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…andard-catalog VALIDATION_ERROR pair

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/plugin-webhooks, @objectstack/spec, touching 27 documentable anchor(s).

29 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3.

⛔ 9 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 5ec6b175ef94fcefd74cf37ba1a3a22faf80ee99 — the merge of head b61479cef2fd9c792411795db9f3a9e83a542565 into base 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 5ec6b175ef94fcefd74cf37ba1a3a22faf80ee99 && git checkout 5ec6b175ef94fcefd74cf37ba1a3a22faf80ee99
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3 b61479cef2fd9c792411795db9f3a9e83a542565 && git checkout -B drift-repro 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3 && git merge --no-ff b61479cef2fd9c792411795db9f3a9e83a542565

node scripts/docs-audit/affected-docs.mjs --json 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review claim · head b61479c · 2026-11-16T03:05Z (review-c, S6; L1 ACCEPT read + L2 CONTRACT_REVIEW_TIER record, spec schema + narrowing faces)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

Request: review · PR #34239 · area S6 · Fixes #34098 · head b61479cef2fd9c792411795db9f3a9e83a542565 (declared final; CI green after one re-run of an unrelated Test UI shard: AppContent.disabledPackageDeepLink-13052.test.tsx CONTROL waitFor, a file this diff does not touch) · 2026-11-16T03:04Z


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b61479cef2fd9c792411795db9f3a9e83a542565
Local-runs: none
Scope: packages/spec/src/automation/webhook.zod.ts, packages/spec/src/migrations/entries/semantic/18.webhook-method-get-retired.ts + packages/plugins/plugin-webhooks/src/auto-enqueuer.ts, packages/plugins/plugin-webhooks/src/sys-webhook.object.ts

PR #34239 (Fixes #34098), spec schema face plus the declared narrowing. Inputs read: card #34098 body and all five comments (triage 6899464029, ruling 6902187601, claims 6902286425 / 6902292087, dev report 6905346098); the PR body, file list (30 files) and net diff against main; the check-runs on this head. Cited code was read at the head with git show: shared/retired-key.ts, migrations/types.ts, migrations/entries/README.md, declared-webhooks.ts, and service-messaging's messaging-service.ts, sql-http-outbox.ts, http-sender.ts, http-outbox.ts. Nothing was built or run.

Remainder, the lane seat's ACCEPT at TIER_DEFAULT and not judged in ④: the two test files, the 21 generated translation files, the two docs pages and the changeset body's prose. They were read only where a ① or ② judgment needed them.

Check-runs on the head: 68 runs, every conclusion success or skipped, none failed or pending. Passing runs include Test Core 1/8 to 8/8, Test UI 1/16 to 16/16, Dogfood Regression Gate, Spec property liveness, Check Changeset, Governed Surface Queue Guard, PR-body guards, Lint & Repo Gates, TypeScript Type Check, Type Check UI and Build Docs. The skipped runs are opt-in or conditional: 18.x upgrade harness, Packed-tarball smoke, Temporal Conformance, Lint UI, Dogfood Verify CLI, UI Published Artifacts, Queue verdict and Borrowed queue verdict, the schedule gate, and the unexpanded Dogfood Regression Gate matrix job. The request states one Test UI shard was re-run; the check-runs as they stand show it green.

① Derived judgments

  • WebhookSchema.method accept-set goes from GET / POST / PUT / PATCH / DELETE to POST / PUT / PATCH / DELETE, default POST unchanged. Right, and declared (Clause-②: no (narrowing), Metadata-protocol: narrowed). enumWithRetiredValues returns the prescription only for an own-property string hit, so GET gets the prescription and every other unknown value (TRACE, lower-case get, which the spec never admitted) keeps zod's own message.
  • Every holder of WebhookSchema inherits the narrowing: StackSchema.webhooks (defineStack), defineWebhook, the webhook metadata type (kernel/metadata-type-schemas.ts, so the meta save door refuses GET too) and DeclaredWebhookSource.parseItem. Right: this is the intended break, and the PR body and changeset name the declared surface.
  • The published type Webhook['method'] loses 'GET', so a TypeScript consumer holding that literal stops compiling. Right, and covered by the BREAKING banner. No export is added or removed: WEBHOOK_METHOD_GET_RETIRED is module-private, which matches the unchanged api-surface/, authorable-surface/ and json-schema.manifest/ baselines (the authorable row automation/Webhook:method stands).
  • The D3 registry gains one entry, webhook-method-get-retired, in MIGRATIONS_BY_MAJOR[18].semantic. Right: the file name follows the README rule (protocol major, then the id), the shape is the sibling shape (id, surface, replacement, reason, acceptanceCriteria), and no index is edited because the registry is generated from the directory. relevantWhen is correctly omitted, since the surface also lives in sys_webhook rows outside the stack, so the entry is always listed. conversionIds is correctly omitted, since there is no D2 conversion.
  • The sys_webhook method select goes from five options to four. Right, and it is ruling A's second surface (Fable E3). Reads are unaffected: the SQL drivers build no enum or CHECK constraint from select options, and the new test reads a stored get back through both driver and engine.
  • Translations: 21 deletions, 0 additions (11 get: "GET" leaves and 10 source hashes; en has no hash file). Right: deletions only, as stated.
  • Dispatcher: a stored row whose method upper-cases to GET now produces one dead sys_http_delivery row per matched event and one error log per subscription. Right; see ④ for the path.
  • No new error code. The park carries the standard-catalog pair VALIDATION_ERROR/400 (spec/api/errors.zod.ts), the same pair webhook-legacy-cleartext.ts carries on its delivery door. Right.
  • The prescription names @objectstack/spec 18.6.0. Right: spec is 18.5.0 on main and on the head, eight pending changesets on main already grade spec minor, and this one does too, so the next release is 18.6.0.

② Semver level

.changeset/34098-webhook-method-get-retired.md grades @objectstack/spec and @objectstack/plugin-webhooks minor. That is correct under AGENTS.md Post-Task step 3: the level follows the Metadata-protocol kind alone, narrowed takes at least minor on a package the diff moves, and both packages are moved. major is not available: check-changeset-no-major refuses it in the launch window, and the fixed group would apply it to every package. The claim's phrase "a major-marked changeset" was the wrong instruction and the dev's deviation (2) is the right reading. The break is carried where step 3 puts it: the ! title, the BREAKING banner, the FROM/TO lines with the one-line fix, and exactly one ADR-0087 marker (registered webhook-method-get-retired) whose id matches the new entry. Both declaration lines appear line-initial in the PR body and the changeset body and agree. The Check Changeset and PR-body guards check-runs concluded success.

Clause-②: no (narrowing). Correct: a value an author could write is now refused, and nothing is widened.

③ Boundary flags

④ Design judgment

packages/spec/src/automation/webhook.zod.ts (schema face), against ruling 6902187601 and its first consumer. Holds. The ruling orders GET out of the spec enum, leaves HEAD alone, and orders a D3 note because no lossless conversion exists. The code does exactly that with the repo's value-level retirement kit rather than a bare enum, so the refusal carries the prescription (step 3's tombstone requirement, applied to a value). The prescription follows the kit's convention: the value, the release, the reason, the one-line fix. Every sentence of the jsdoc checks against the tree: "every delivery sends the event envelope as the request body" is both enqueue sites in auto-enqueuer.ts; "a stored GET subscription is parked by the dispatcher with the reason on a dead delivery row; its method is never rewritten" is parseRow plus recordUndeliverable, and nothing in the diff writes sys_webhook.method. The first consumer, DeclaredWebhookSource.parseItem, wraps WebhookSchema.parse in a catch that warns once per name with the zod message (which now includes the prescription) and skips the item, so a GET declaration cannot crash a refresh. Attempt to break it: .default('POST') still applies on the wrapped enum, and the pin reads WebhookSchema.shape.method.unwrap().options and the default (Test Core green). The guard typeof issue.input === 'string' plus hasOwnProperty means a non-string or prototype-named input cannot pick up the retirement text.

packages/spec/src/migrations/entries/semantic/18.webhook-method-get-retired.ts, against its siblings and the registry. Holds. Shape, file name and scaffolding match the README, and the comment block sits directly above export const entry so it reaches the generated table. Read sentence by sentence against the tree: both surfaces are named; "refused 400 VALIDATION_FAILED by the select" is the engine validator's code with its standard status; "keeps loading and is parked ... dead row with 0 attempts ... nothing is sent" is the measured path; "never converted, at load, at save or by a migration" is true, since there is no conversion entry and no write. The acceptance criteria are checkable by the owner (os validate, the data list, the delivery row).

The narrowing, against the published spec on main and ruling A. It makes the spec's own refusal real and takes no working capability away. On main the spec advertises GET while every delivery carries a body, so no GET webhook ever delivered (card evidence; http-sender.ts). ADR-0049 and ADR-0078 point the same way, and the maintainer chose A. The build is ruling A as written, with Fable E2 (HEAD untouched), E3 (both surfaces, every locale's options.get, the docs row) and E4 (park through parkedReason, never convert) applied.

packages/plugins/plugin-webhooks/src/auto-enqueuer.ts, every producer path.

  • Stored rows: parseRow computes String(row.method ?? defn.method ?? 'POST').toUpperCase() and parks when the result is GET. get, GET and Get all park, and so does a row whose method lives only in definition_json. The method is carried through unchanged.
  • Refresh loop: a parked row is reported, cached and skipped before attachCredentials, so it holds no secret and no header map (the [security] a dropped webhook subscription leaves no durable record — and the naive fix hands an operator a redeliver button that sends UNSIGNED #8069 park rule) and no later credential park can overwrite its reason. A healthy row clears the say-once entry, so a row that is fixed and broken again is reported again.
  • Declared webhooks: projectDeclared goes through the same parseRow and returns before splitWebhookSecret / splitWebhookHeaders, so a declaration handed in past the schema is parked with no credentials.
  • Both enqueue sites, per-record and bulk, pass undeliverableReason: sub.parkedReason (unchanged lines). The organization filter runs before them, so a dead row never records another organization's event.
  • The seam: MessagingService.enqueueHttp routes any input carrying a reason to recordUndeliverable, which goes straight to insert with status: 'dead', attempts: 0 and no signature. The fix(service-messaging): a GET or HEAD delivery through the HTTP outbox sends no body and is signed over what it sends #34067 refusal assertBodylessPayloadAdmitted lives only in enqueue() (memory and SQL outboxes), so a parked GET never meets it. The product wiring (webhook-outbox-plugin.ts) binds the messaging service, not the raw outbox.
  • After the write: the dispatcher claims only pending rows, so nothing is fetched; assertHttpRedeliverable refuses a terminal row with 0 attempts; dedup on (source, dedup_key) gives one row per event per subscription.
  • Log level: error, said once per subscription and pruned with the other two ledgers. This matches the [security] a dropped webhook subscription leaves no durable record — and the naive fix hands an operator a redeliver button that sends UNSIGNED #8069 precedent and the AGENTS.md question (the row keeps reading active: true while nothing is delivered), and the message carries the consequence and the fix.

Attempts to break it, all negative: a GET row with no triggers is refused earlier by the existing no-triggers path and matches no event; the record validator's option check runs over the values a write supplies (record-validator.ts), so a partial update that leaves method out, such as deactivating the row, is not blocked by the narrowed select; removing a select option creates no schema-sync hazard for stored get rows; the GET method recorded on the dead row is plain data on a system-context insert.

packages/plugins/plugin-webhooks/src/sys-webhook.object.ts. Holds. Four options, defaultValue: 'post' unchanged, and the comment's claims (the select is what refuses at save; a stored get is parked by retiredMethodParkReason; never rewritten) agree with the code.

One boundary of the park, stated so nobody over-reads it. The park reaches sys_webhook rows, which is what the ruling orders ("Stored GET rows"). A GET webhook held as a registry item (declared in code, or saved earlier through the meta save door) is refused at parse and skipped with one warn carrying the prescription; it gets no dead row. Fable §4 predicted exactly this consequence before the maintainer ruled, the changeset says it, and warn is the AGENTS.md level for a trigger that is not armed. Because the only in-repo reader parses through WebhookSchema, the projectDeclared park branch is defensive: it is reachable only by a reader that skips the schema, which is how the test reaches it.

No must-fix, no should-fix.

N1 (nit) — Three sentences in auto-enqueuer.ts, outside this diff's hunks, now describe only one kind of park: the CachedSubscription.parkedReason jsdoc ("Set when a credential ... could not be recovered"), and reportWriteFailure's parked branch, whose error text says the subscription "is parked for an unresolvable credential". For a method-parked row whose dead-row write fails, that clause is false. This is the same class as #34243. Leave it on this head and add the two sentences to #34243; fixing them here would move the head.

N2 (nit) — The retiredMethodReported comment says "again after its method is fixed and it breaks again". That holds for rows (the refresh loop deletes the id on a healthy parse). The declared path never deletes it, so it does not hold there. No product path reaches that case, because a declared GET cannot pass the schema. Accepted deviation.

N3 (nit) — content/docs/automation/webhooks.mdx, "Stored GET webhooks are parked", covers the row and a declared webhook failing parse, but does not say that a webhook already held as a registry item (for example one saved through the meta save door before the upgrade) is skipped with a warning and gets no dead row. The changeset does say it. One sentence on the docs page would close it; this is a prose face and optional.

Implemented-by: claude/area-A5b-34098
Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review — PASS

Head-sha: b61479cef2fd9c792411795db9f3a9e83a542565
Reviewer: review-c · read 2026-11-16T03:13Z · first round; claim 6906132891
Implemented-by: claude/area-A5b-34098 · Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x
Contract-review record at this head: 6906245691 (CONTRACT_REVIEW_TIER from an isolated sub-agent, adopted). VERDICT PASS, no must-fix, no should-fix.

What I checked:

  • Ruling A, as written. GET leaves WebhookSchema.method through enumWithRetiredValues, so the refusal carries the prescription, and it leaves the sys_webhook select with every locale's options.get leaf. HEAD is untouched. Stored get rows are parked through parkedReason and never rewritten.
  • The park path. A parked row is skipped before credential resolution. Each matched event becomes one dead row with 0 attempts and no signature, through recordUndeliverable, so it never reaches the fix(service-messaging): a GET or HEAD delivery through the HTTP outbox sends no body and is signed over what it sends #34067 enqueue refusal. The dispatcher claims nothing, and redelivery is refused.
  • Declarations. Clause-②: no (narrowing) and Metadata-protocol: narrowed are line-initial and agree in the body and the changeset.
    • The ! title, the BREAKING banner with FROM/TO and the fix, and one ADR-0087 marker are all present. The marker is registered webhook-method-get-retired and matches the new D3 entry.
    • The Skills-docs line is present.
    • minor on both moved packages is the right level under AGENTS.md step 3, because major is barred in the launch window. The release the prescription names, 18.6.0, is correct.
  • Checks: all 68 check-runs passed or were skipped, none red or pending; mergeable_state: clean.

Accepted nits (prose face or carried elsewhere):

Sequencing: ship in the same release as #34067, as the body says.

Not governed: the area lands this PR per landing-operations.md.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

席位核对

ACCEPT · area S6 lands PR #34239 at head b61479cef2fd9c792411795db9f3a9e83a542565 · 2026-11-16T03:14Z

reading result
check-governed-merges.mjs --pr 34239 (full output read) NOT governed, 0 of 30 paths; +584 / -34 ≤ 3000
check-runs on this head green; Test UI (5/16) failed once on AppContent.disabledPackageDeepLink-13052 (file not in this diff) and passed on attempt 2

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 16, 2026 03:15
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43797161496 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (3/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/package-commit-revert-path-package.dogfood.test.ts > dogfood: package commit revert and rollback act only on a commit of the path's package (ADR-0067)
      ↳ 失败原因: @objectstack/dogfood:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 22 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

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/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin-webhooks: a webhook subscription with method GET is admitted at save but can never deliver (every delivery carries the event body)

1 participant