Repository navigation
feat(webhooks): definition optional, admin-language help, delivery status labels - #39546
Conversation
… labels
sys_webhook.definition_json is no longer required (every reader takes an
absent value as {}); the webhook form's help texts are rewritten in an
administrator's words; sys_http_delivery.status is a select over the same
five stored values so Setup shows labels, and the error column joins the
Recent and Pending lists.
Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE
Co-authored-by: Claude <noreply@anthropic.com>
…elivery status labels Regenerates the translation bundles of both packages and translates the rewritten help texts and the new status labels into every shipped locale. Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 39 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 8 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 7 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 2ffd07f0e06aeb88a1c4d5c62f21a5509bfc5e98 && git checkout 2ffd07f0e06aeb88a1c4d5c62f21a5509bfc5e98
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0f5da90d36580e23dd68fa2025c7b86eb32278f1 f613073abcdab835a84e8ed4594fa8c5f58d1441 && git checkout -B drift-repro 0f5da90d36580e23dd68fa2025c7b86eb32278f1 && git merge --no-ff f613073abcdab835a84e8ed4594fa8c5f58d1441
node scripts/docs-audit/affected-docs.mjs --json 0f5da90d36580e23dd68fa2025c7b86eb32278f1
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibz12BVzo6a9hKybbEd Contract reviewServed-tier: Inputs read: card #39423 body and all four comments (triage 7395576076, claim 7403999138 with its 拆分 Scope-review, split note 7404059728, os-dev report 7404963580); PR #39546 body, its 38-file list and the net diff Gates on ① Derived judgments
② Semver level
③ Boundary flags
No must-fix. Two should-fix: S1 (should-fix) — integration-system.json lines 633/2581 still say definition_json is required and that a create without it is refused 400, both false after this head; fix in this PR or card it. S2 (should-fix) — content/docs/automation/webhooks.mdx:299 lists sys_http_delivery.status as type text, false after this head; fix in this PR or card it. nit — sys_webhook.url help says POST only (pre-existing, not made false here). nit — the changeset does not say that a pre-ADR-0113 NOT NULL column refuses a save without a Definition until relaxed. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibz12BVzo6a9hKybbEd L1 review — REWORK (patch round)L1-b · 2026-12-04T07:48Z · head To fix in this PR (one patch round, original dev, same claim)
Items 1 and 2 are outside the claimed File surface. The seat amends the claim's Checked and fine
|
…the status select; url help names every method Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibz12BVzo6a9hKybbEd Contract reviewServed-tier: This is a delta round over the record on Gates on ① Derived judgments
② Semver level
③ Boundary flags
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibz12BVzo6a9hKybbEd 席位核对L1-b · 2026-12-04T08:47Z · ACCEPT · head
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE Landing · 2026-12-04T08:52Z · head
State: ready + auto-merge through the merge queue; |
repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE
Body refresh · 2026-12-04T08:49Z
Fixes #39423
Clause-②: yes
Metadata-protocol: none
维护者速读
What changes
The minimum the claim's scope review (拆分) kept on this card, on the two objects it names:
sys_webhook.definition_jsondropsrequired: true. Every reader already takes an absent or empty value as{}: the enqueuer's row parser (auto-enqueuer.ts, thedefnparse), the legacy-credential door and boot sweep (findLegacyDefinitionCredentialKeys,readLegacySecret,readLegacyHeaders), and the ownership ceremony (webhookDefinitionin the CLI). No runtime change was needed.name,object_name,triggers,active,definition_json,headers_secret,signing_secret,managed_byandcustomizedno longer namessnake_case, thebulk_update/bulk_deletevalues,sys_secret, the signature header, a spec package path, the retired boot seeder or the ownership ceremony. The technical facts moved into the code comments beside each field. The bundles were regenerated withnode scripts/check-i18n-bundles.mjs --write, and the rewritten leaves were translated by hand in all ten translated locales (the regeneration keeps a translated leaf as it was, so without this zh-CN would have kept the old developer text). The provenance help names each locale's own option labels for admin / package / platform.sys_http_delivery.statusis a select over exactly the five stored values (pending,in_flight,success,failed,dead), labelled Waiting to send / Sending / Delivered / Failed / Given up and translated. The ruling quoted athttp-delivery.object.ts(no new state) holds: no value, writer, filter, index or the redeliver guard changes.maxLength: 16is dropped on purpose (see Acceptance notes). The siblingsys_notification_delivery.statusalready has this shape under the same kind of outbox writer.errorjoins the Recent and Pending delivery list views (Failures already had it).Out of scope, moved to the split Feature card the seat files: a test send, event names as labels, and a recent-deliveries related list on the webhook record. No route, action or error code is added here.
Read first, by risk:
packages/services/service-messaging/src/objects/http-delivery.object.ts: thestatusfield type change (the only change with a DDL consequence; see the drift readings below).packages/plugins/plugin-webhooks/src/sys-webhook.object.ts: thedefinition_jsonrelaxation and its comment.packages/plugins/plugin-webhooks/src/translations/zh-CN.objects.generated.ts: the hand-translated help (one locale as a sample of ten).Tests
webhook-delivery-real-sql-driver.test.ts, new top-level describe: on a realSqlDriver+ObjectQL, asys_webhookrow inserted with nodefinition_jsonpasses the engine's validator, reads back with none, and a record event turns into onependingdelivery with that webhook's id asref_id.http-delivery-display-title.test.ts, new top-level describe:statusis a select whose option values equal theHttpDeliveryStatusvocabulary, each with a label of its own; every list view haserror; a row written with each stored value reads back with that value through the real engine.sys-webhook.description.pin.test.ts, new top-level describe: the description sweep's shapes, plus a header-name shape, a package-path shape and an option-value wildcard shape, run over every field's help in the source and in all eleven bundles; each shape is shown to fire on the old help it exists for.definition_jsonput back torequired: truewithscripts/ablation-replace.mjsturns the new real-driver test red with the card's own refusal (ValidationError: Definition is required, fielddefinition_json, coderequired); restored, blob equal toHEAD,git diff HEADempty.Acceptance notes
definition_json. ADR-0113 binds a column's NOT NULL tostorage.notNull, never torequired, so a column the platform created is nullable (the 18.0 upgrade fixture'ssys_webhookDDL hasdefinition_json text, nullable). Measured withdiffManagedTableon postgres and mysql: a nullable column reports nothing; a column a pre-ADR-0113 driver created NOT NULL now reportsnullability_mismatch/needs_confirm/relax_not_null(before: silent behindrequired: true). The changeset namesos migrate applyfor that case.statuscarries nomaxLength. The SQL emitter sizes a select column itself (varchar(255),varcharColumnCharsanswers 255 for a keyed select). Measured withdiffManagedTableon postgres and mysql: select withoutmaxLengthover an existingvarchar(16)reports nothing, and over a freshvarchar(255)reports nothing; the counterfactual select withmaxLength: 16over a fresh table reportstype_mismatch/destructive/narrow_varchar, which refuses an artifact-pinned boot. So a new table getsvarchar(255), an existing one keepsvarchar(16), and neither reports drift.docs/qa/platform-checklist/areas/integration-system.json): its two fixture recipes no longer calldefinition_jsonrequired. Fixed in this PR (L2 S1, claim amendment 7405175463 on webhooks: a Setup admin must type a raw JSON definition ("{}" passes), there is no test send, and deliveries show raw status and event ids #39423).Verification
Two minutes: Setup → Integrations → Webhooks → New, fill name, object, triggers and URL, leave Definition empty, Save. Expected: saved, no "定义不能为空"; the help under each field reads without code words. Then Setup → HTTP Deliveries: the Status column reads 等待发送 / 已放弃 (zh-CN), and the Recent list shows the Error column.
Local readings, all at head
5944a1b1(worktree basee43597b1), dependency closure built first:Tests and typecheck
pnpm --filter @objectstack/plugin-webhooks --filter @objectstack/service-messaging test: exit 0. service-messaging 83 files / 1113 tests passed; plugin-webhooks 28 files / 338 tests passed.pnpm --filter @objectstack/plugin-webhooks --filter @objectstack/service-messaging typecheck: exit 0 (plugin-webhookscheck:test-typecheck: OK, 0 errors).1 failed | 4 skipped,ValidationError: Definition is required; restoregit diff HEAD empty.Derived gate families (dispatch-gates --ran: 70 derived, 66 run, 4 NOT-MEASURED, 0 UNRUN)
check:i18n(all bundles in sync, no undeclared authoring keys),check:i18n-stale-fill(no new stale fills),check:nul-bytes,check:adr-0087-registration,check:doc-authoring,check:issue-citations,check:platform-object-tenancy-census,check:system-context-census.check-plugin-teardown-shape --self-test(exit 3, shallow clone cannot reach its pinned control commit),check:dual-build-cjs-loads(exit 3, packages outside this diff unbuilt),check:query-options-erasureandcheck:type-check-debt(killed by a local timeout before their verdict).Generated by Claude Code