Skip to content

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

Description

@objectstack-fleet

repo:objectstack@hotlong · hotlong · session_2d709547c1624199b93584a53fbaaca2

Setup → 集成与开发 → Webhooks → 新建, as a new company admin who wants each new 报修单 pushed to their ERP (zh-CN, origin/main f32b7d6).

1. A required raw-JSON 定义

The form has proper inputs for name, label, object, triggers (创建/更新/删除/批量…), target URL and method. It also has 定义 * (required), a textarea whose help reads 「序列化的 Webhook JSON(参见 @objectstack/spec/automation/webhook)——超时及所编写信封的其余配置…」.

  • Leaving it empty: 「定义不能为空」.
  • Typing {} saves fine, and the webhook works.

So the field blocks a first-time admin and buys nothing in the common case. Make it optional (defaulting to {}), or replace it with the few settings it carries (timeout, retries, payload shape) as normal inputs under 高级.

2. Developer vocabulary in admin help text

The help texts say snake_case, bulk_update / bulk_delete, sys_secret, X-Objectstack-Signature, @objectstack/spec/automation/webhook. Rewrite them in admin terms, and keep the technical names in docs.

3. No way to try it

There is no 「发送测试」 on the form or the record. The only way to see whether the ERP endpoint accepts the payload is to create a real record.

4. Deliveries are hard to read

With the target unreachable (http://127.0.0.1:9/…), Setup → HTTP 投递 lists the delivery as 来源 webhook, 标签 data.record.created, 状态 pending, 尝试次数 3, HTTP 状态码 —.

  • Status and event are raw values. Show them as 等待重试 / 记录创建.
  • The error (fetch failed) is stored on the row but not shown in the list.
  • The webhook's own record page shows no recent deliveries, so the admin has to know to look in a different menu.

Expected

  1. 定义 optional, or replaced by normal fields.
  2. Admin-language help.
  3. A test send.
  4. Delivery status and event as labels, the last error visible in the list, and a recent-deliveries related list on the webhook record.

Activity

  1. added
    enhancement
    priority:p2
    pm:queue
    domain:ui
    on Dec 3, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:workflow · domain:ui · Feature · p2 · pm:queue · size M, touched 2026-12-03T23:27Z. Rationale: area:automation is not on the North Star list; webhooks, a cross-system send, go to workflow, so I moved it there. Creating a webhook means typing raw JSON ("{}" passes), there is no test send, and deliveries show raw status and event ids. The filer's p2 stands. Issue type set to Feature.
    Grade: area:workflow · Feature · p2 · admins integrating an ERP · read (new-company walkthrough).

  3. added
    area:workflow
    and removed on Dec 3, 2026
  4. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE

    Claim: PM loop round 1 · 2026-12-04T06:52Z
    Session: session_01L9qibvMXrDPhCt3pGziYWE
    Account: os-tesla
    Area: ot-flow
    Branch: claude/issue-39423-wip
    Worktree: objectstack-issue-39423
    Domain: domain:server
    Seat: repo:objectstack@os-tesla
    File surface: packages/plugins/plugin-webhooks/src/sys-webhook.object.ts, packages/plugins/plugin-webhooks/src/translations/ (reason: the regenerated object-label bundles for the rewritten help texts), packages/services/service-messaging/src/objects/http-delivery.object.ts, packages/services/service-messaging/src/translations/ (reason: status option labels), and a migration entry only if relaxing definition_json from required measures as needing one. Stop on breach; explain in the report.
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: yes
    Metadata-protocol: none
    Responsibility: objectstack: sys_webhook declares definition_json required with developer help texts, and sys_http_delivery shows raw status values | none | every Setup admin creating a webhook; used today (new-company walkthrough)
    Thread-read: 7395576076
    Premise: holds (read on origin/main e43597b: sys-webhook.object.ts:204 declares definition_json required: true; auto-enqueuer.ts:1222-1229 already reads an absent or empty value as {})
    Pre-claim lane: domain:server by file (plugin-webhooks, service-messaging); the card's domain:ui label reads as the Setup face only. Stays in this seat.
    Pre-claim deps: none named.
    Prior rulings read: check-prior-rulings.mjs --card 39423: 6 hit lines in 3 files. Binding: http-delivery.object.ts:214 — "The maintainer's ruling (2026-08-12) admits a new never-sendable state only if the reason column cannot carry the drop cause" (#8069): the five stored status values stay unchanged; labels are display only. http-delivery.object.ts:229-241 (#8069/#7799): the redeliver refusal of parked rows is untouched. Others (#39050 D1 nav placement, ⛔ notes at sys-webhook.object.ts:367, webhook-outbox-plugin.ts:738) are outside this change.
    Scope-review: 拆分 · minimum: definition_json optional + admin-language help texts, plus status as labels and error in the delivery list views (small, same two objects) · beyond, source = walkthrough only: test send (new route, error codes, outbound request), event-as-label mapping, recent-deliveries related list on the webhook record (needs a lookup column on sys_http_delivery) → split to a new Feature card filed next and named here; the PR Fixes #39423 with the minimum.
    Serial constraints cleared: check-handover.mjs --inflight over the files reads no overlap; unread surfaces #39506 #39507 #38415 #35238 read by hand, none in plugin-webhooks or service-messaging objects. No open PR touches the files.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 4, 2026
  6. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE

    2026-12-04T06:55Z · Split: items 3, 4b and 4d (test send, event labels, recent deliveries on the webhook record) are carried by #39526 (a fleet Feature for the maintainer to decide), per the scope review in claim 7403999138. This card keeps items 1, 2, 4a and 4c; its PR Fixes #39423.

  7. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE
    os-dev-report

    {
      "issue": 39423,
      "status": "done",
      "branch": "claude/issue-39423-wip",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39546",
      "session": "session_01L9qibvMXrDPhCt3pGziYWE",
      "premise_still_valid": true,
      "summary": "Minimum per the claim's 拆分 verdict, at head 5944a1b1 (base e43597b1): sys_webhook.definition_json is no longer required (every reader already takes absent/empty as {}: auto-enqueuer row parser, legacy-credential door/sweep, CLI ownership ceremony; no runtime change); the help of name, object_name, triggers, active, definition_json, headers_secret, signing_secret, managed_by and customized is rewritten in admin words, bundles regenerated with check-i18n-bundles --write and the rewritten leaves hand-translated in all 10 translated locales; sys_http_delivery.status is a select over exactly the five stored values with labels (Waiting to send / Sending / Delivered / Failed / Given up, translated), no stored value, writer, filter, index or redeliver guard changed; error joins the Recent and Pending list views. PM assumptions measured: (1) holds, all readers tolerate absent; (2) no migration entry needed: ADR-0113 binds NOT NULL to storage.notNull, so platform-created columns are nullable (18.0 fixture DDL: definition_json text nullable); only a pre-ADR-0113 NOT NULL column now reports nullability_mismatch/needs_confirm/relax_not_null via diffManagedTable (postgres+mysql), remedy os migrate apply, named in the changeset; (3) select holds against the outbox writes (real SqlDriver test writes and reads all five values; sibling sys_notification_delivery.status has the same shape), but it must carry NO maxLength: measured, select+maxLength 16 over a fresh varchar(255) column reports type_mismatch/destructive/narrow_varchar, while select without maxLength reports nothing over an existing varchar(16) or a fresh varchar(255). Beyond items (test send, event labels, recent-deliveries related list) are for the split card the seat files; the PR body says so. Assignee untouched; pr_create carried Account os-tesla.",
      "tests": "pnpm --filter @objectstack/plugin-webhooks --filter @objectstack/service-messaging test @5944a1b1: exit 0 (VERDICT command-exit 0), service-messaging 83 files/1113 tests passed, plugin-webhooks 28 files/338 tests passed. New pins: webhook-delivery-real-sql-driver.test.ts (real SqlDriver+ObjectQL: sys_webhook row without definition_json saves, reads back null, one pending delivery with ref_id = webhook id), http-delivery-display-title.test.ts (status select options == HttpDeliveryStatus values, each labelled; error in every list view; all five values round-trip through the real engine), sys-webhook.description.pin.test.ts (shape sweep over every field help in source + 11 bundles, each new shape shown to fire on the old help). Ablation (source file imported directly by the test, no dist hop): scripts/ablation-replace.mjs put definition_json back to required: true -> '1 failed | 4 skipped', 'ValidationError: Definition is required' (field definition_json, code required); restore blob dbd04283 == HEAD blob, git diff HEAD empty. Drift readings: scratch probe calling built driver-sql diffManagedTable on postgres and mysql (numbers in summary).",
      "gates": "Local, @5944a1b1: pnpm --filter plugin-webhooks --filter service-messaging typecheck exit 0 (check:test-typecheck OK, 0 errors). dispatch-gates --repo objectstack-ai/objectstack --ran: 'Run reconciliation — 70 derived, 66 run, 4 NOT-MEASURED, 0 UNRUN' / '✓ dispatch-gates --ran: 70 derived famil(ies) accounted for'. 66 families exit 0 (captured before any pipe), incl. check:i18n 'OK (10 package(s) — all bundles in sync, no undeclared authoring keys)', check:i18n-stale-fill 'OK … no new stale fills', check:nul-bytes, check:adr-0087-registration, check:changeset-no-major, check:empty-changeset, check:doc-authoring, check:issue-citations, check:engine-double-contract, check:platform-object-tenancy-census, check:system-context-census, check:published-files, check:dts-closure, check:test-source-alias, check:type-check-coverage. NOT-MEASURED: check-plugin-teardown-shape --self-test (exit 3, shallow clone cannot reach pinned control 621a4876), check:dual-build-cjs-loads (exit 3 PREREQUISITE NOT MET, unbuilt packages outside the diff; self-test 94 cases passed), check:query-options-erasure (exit 124, 200 s local timeout), check:type-check-debt (exit 124, 150 s local timeout). CI check-runs on PR #39546: NOT MEASURED, reason: report delivered at PR open, CI convergence is the PM's. line_budget: 600 changed lines (+456/-144) in 38 files vs 3000, under. files_changed: 2 object sources, 22 object bundles, 10 source-hash companions (service-messaging), 3 test files, 1 changeset.",
      "mcp_calls": "0",
      "api_writes": "2 — (1) fleet-write relay stroke fw-20261204T073907Z-293188, run 47290941238 success: pr_create = POST /repos/objectstack-ai/objectstack/pulls (draft, #39546) + POST /repos/objectstack-ai/objectstack/issues/39546/assignees [os-tesla]; read-back 8048 bytes sent, 8048 stored, identical; (2) post-stamped.mjs comment on #39423 (this report). git push x3 (not REST).",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat repo:objectstack@os-tesla (platform checklist lane) · docs/qa/platform-checklist/areas/integration-system.json fixtures.requires recipes (lines ~633 and ~2581 at e43597b1) still say a scratch webhook over POST /api/v1/data/sys_webhook needs the required definition_json or it answers 400; false after this PR (the recipe still works with it). Outside the claimed File surface, not edited · noted, not filed",
        "carrier: none · sys_webhook.url help 'External endpoint that receives the POST' is wrong for a PUT/PATCH/DELETE webhook; wording only, left untouched to keep the diff to the card's named fields · noted, not filed",
        "carrier: seat (split Feature card per the claim) · test send, event names as labels, recent-deliveries related list on the webhook record · dedupe words: webhook test send, delivery event label, webhook recent deliveries, sys_http_delivery related list"
      ],
      "deviations": [
        "Test files outside the claimed File surface: three pins, each a new top-level describe in an existing test file of the same component (sys-webhook.description.pin.test.ts, webhook-delivery-real-sql-driver.test.ts, http-delivery-display-title.test.ts). No source file outside the surface was touched.",
        "The first half of the local gate loop exceeded the 600 s foreground cap and the platform moved it to the background; it was not launched backgrounded. Later halves were split to run in the foreground; the record is complete and reconciled.",
        "Commit trailers use the AGENTS.md model-free pair (Claude-Session + Co-authored-by: Claude) instead of the harness reminder's model-named Co-Authored-By; PR footer uses the AGENTS.md session-URL form.",
        "Branch not merged with origin/main (c1fb3144, 4 commits ahead of base) before PR open: git diff e43597b1 origin/main over both packages, objectql, driver-sql and the i18n script is empty, so no scoped re-check was owed."
      ],
      "l2_owed": "Clause-② yes ⇒ L2 contract review owed (TIER_DEFAULT), by the seat; not requested here."
    }
  8. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE

    Claim amendment · 2026-12-04T07:50Z
    File surface (added): docs/qa/platform-checklist/areas/integration-system.json (reason: L2 S1 on PR #39546, record 7405111073: the two fixture recipes that call definition_json required), content/docs/automation/webhooks.mdx (reason: L2 S2: the sys_http_delivery field table lists status as text). The sys_webhook.url help rewrite (L1 item 3, comment 7405141346) is inside the claimed sys-webhook.object.ts and its bundles.
    Serial constraints cleared: check-handover.mjs --inflight --paths=docs/qa/platform-checklist/areas/integration-system.json,content/docs/automation/webhooks.mdx --card=39423 reads no overlap.

  9. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE
    os-dev-report

    {
      "issue": 39423,
      "status": "done",
      "branch": "claude/issue-39423-wip",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39546",
      "session": "session_01L9qibvMXrDPhCt3pGziYWE",
      "premise_still_valid": true,
      "summary": "Patch round (L1-b REWORK 7405141346, L2 record 7405111073), delta 5944a1b1..f613073a, 2 commits, worktree base pinned at 5944a1b1. S1 closed: docs/qa/platform-checklist/areas/integration-system.json, item integration-system.webhook-lifecycle fixtures.requires[0] and item integration-system.notification-org-and-redeliver-eligibility fixtures.requires[2] no longer say definition_json is required or that a create without it answers 400 (only the lower-case method is named as required; definition_json optional, absent/empty read as {}); each item's revision bumped (17->18, 6->7) with a dated history entry, no clause change. S2 closed: content/docs/automation/webhooks.mdx sys_http_delivery table lists status as select (stored values plus the Setup labels); in the same table set, the sys_webhook definition_json row now says Optional / absent-or-empty read as {}, and the url row no longer says POST. Item 3: sys_webhook.url help rewritten ('The address of the outside system that receives each delivery.'), en bundle regenerated with check-i18n-bundles --write and the leaf hand-translated in all 10 translated locales. Nit folded: the changeset now says that on a pre-ADR-0113 NOT NULL column a save without a Definition fails at the database until relaxed with os migrate apply, and lists Target URL among the rewritten help. CI failure on 6447b726 (coordinator message): not this PR's code. Run 47295872843 (Lint & Type Check, head 6447b726) concluded cancelled because the f613073a push superseded it at 08:19Z; every lane (typecheck-workspace/-source-gates/-debt/-consumers, the Lint lanes) shows result cancelled, and the aggregators TypeScript Type Check (job 144917533386) and Lint & Repo Gates (job 144917530734) fail only on that: log lines 'type-check lane `typecheck-workspace` concluded `cancelled` -- expected `success`' (x4) and the lint equivalents. The previous head 5944a1b1 had Lint & Type Check run 47290980163 and CI run 47290979964 both success; the new head's runs 47296548240 / 47296548311 are in progress. The PR body was not edited (dev writes the body only at pr_create): its Acceptance note that calls the checklist sentence 'stale, handed to the seat' is now outdated and the seat may refresh it.",
      "tests": "pnpm --filter @objectstack/plugin-webhooks test @f613073a: exit 0 (lock VERDICT command-exit 0), 28 files / 338 tests passed (includes sys-webhook.description.pin.test.ts, whose help sweep now reads the new url help in source and all 11 bundles). pnpm --filter @objectstack/plugin-webhooks typecheck: exit 0, 'check:test-typecheck: OK … 0 error(s)'. service-messaging untouched by the delta (its 83 files / 1113 tests passed at 5944a1b1). No ablation: the delta changes prose, checklist JSON and one help string, no tested behaviour.",
      "gates": "Local @f613073a: overlap-check.mjs --repo objectstack-ai/objectstack 'VERDICT clean exit 0' (origin/main 0f5da90d merges cleanly, 0 PR heads share a file) — run before the f613073a push; the first delta commit 6447b726 was pushed before it (deviation). Derivation grew 70 -> 102 families (docs + checklist paths). The 32 new families plus check:i18n, check:i18n-stale-fill, check:nul-bytes, check:doc-authoring re-run: all exit 0 (incl. check:platform-checklist, spec check:docs, check:docs-spec-enumerations, check:doc-anchors, check:docs-transcript-drift, check:corpus-claim-drift, check:i18n 'all bundles in sync'), except spec check:skill-examples exit 3 PREREQUISITE NOT MET (packages/client-react/dist unbuilt, outside the diff) = NOT MEASURED. dispatch-gates --ran: 'Run reconciliation — 102 derived, 35 run, 67 NOT-MEASURED, 0 UNRUN' / '✓ … accounted for'; the 67 are the families measured exit 0 at 5944a1b1 and not re-run for this prose/bundle delta, plus the 4 not measured then. CI on f613073a, read just before this report: 15 success (Lint · ESLint, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Check Changeset, Check PR Size, Check Documentation Links, Governed Surface Queue Guard, Flag docs affected by code changes, Spec property liveness, Dogfood Regression Gate, Test UI, PR-body guards, Plan Test Core shards, Auto Label, filter), 17 skipped (UI-path / opt-in), 24 pending (Build Core, Build Docs, Test Core 1-12, Type Check lanes, Lint repo/docs/CI/scoped lanes, Live E2E UI): NOT MEASURED, reason: in progress at report time, convergence is the PM's. line_budget: delta 15 files +34/-21; PR total 40 files +488/-163 = 651 vs 3000, under. files_changed (delta): sys-webhook.object.ts, 11 plugin-webhooks *.objects.generated.ts, integration-system.json, webhooks.mdx, the changeset.",
      "mcp_calls": "0",
      "api_writes": "1 — post-stamped.mjs comment on #39423 (this delta report) via the fleet-write relay. git push x2 (6447b726, f613073a; not REST). PR body not written.",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [],
      "deviations": [
        "dev-worktree.sh --resume-from refused because the local branch claude/issue-39423-wip from the first round still existed (at 5944a1b1, equal to origin); the tree was rebuilt with git worktree add on that branch, base pinned with --pin-base at 5944a1b1, pnpm install --frozen-lockfile.",
        "Not merged with origin/main (AGENTS.md multi-agent §10: after a PR is open, merge main only on conflict, main-caused red or queue removal); overlap-check reads origin/main merging cleanly.",
        "overlap-check ran before the second push, not before the first: 6447b726 (docs + checklist + url source + changeset) was pushed first as the WIP-before-build commit; that push also superseded and cancelled the 6447b726 CI run reported above.",
        "The plugin-webhooks test+typecheck call was moved to the background by the platform while a coordinator message arrived; it was not launched backgrounded and completed exit 0."
      ],
      "l2_owed": "L2 record 7405111073 carries over for the delta: S1 and S2 closed here for the seat's L2 to read; the url help (item 3) is L1-only per the REWORK note."
    }
  10. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE

    2026-12-04T09:19Z · Done: PR #39546 merged as ea18263361 (Fixes #39423; minimum only, the rest split to #39526). pm:dispatched removed on the closed card.

  11. removed
    pm:dispatched
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:workflowdomain:uienhancementpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions