Skip to content

webhooks: a test send from Setup, delivery events as labels, and recent deliveries on the webhook record #39526

Backlog

Description

@objectstack-fleet

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

Filing gate: ② (a fleet Feature: a capability only the maintainer can decide to build) · Source: fleet · carries items 3, 4b and 4d of #39423; #39423 keeps items 1, 2, 4a and 4c (the minimum, claim 7403999138).

维护者速读

  • 要做什么:Webhook 设置页加「发送测试」,投递列表把事件显示成中文名,Webhook 记录页加「最近投递」相关列表。
  • 为什么:新公司管理员接 ERP 时只能建一条真记录才知道对方收不收得到;投递事件是 data.record.created 这样的原值;投递要到另一个菜单去找。
  • 不做会怎样: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 的最小改动(定义改非必填、帮助文案改管理员用语、状态显示中文、列表显示错误)照常落地,管理员能建 Webhook、能看懂失败原因,只是试发和就近查看缺着。
  • 要你做什么:定要不要做、做哪几项。来源只有一次新公司走查,没有客户原话或专题卡。

What the split carries (scope review on #39423, read on origin/main e43597b)

  1. Test send (item 3): a 「发送测试」 action on the webhook form or record. About 300–600 lines across plugin-webhooks, service-messaging, the error-code ledger and a console button. New public surface (a route or action, new error codes). Security-relevant: an admin-triggered outbound request must pass the egress guard, resolve the signing secret, and carry the same auth, tenant-scope and entitlement gates as POST /api/v1/webhooks/redeliver (redeliver-guard.ts, [security] The webhook signing secret is stored in cleartext in sys_webhook.definition_json #7799).
  2. Event as label (item 4b): sys_http_delivery.label is free text shared by webhook and flow rows, so it cannot become a select; it needs a display mapping, about 50–150 lines, possibly in the console.
  3. Recent deliveries on the webhook record (item 4d): ref_id is polymorphic text (a webhook row id, a flow id, or declared:<pkg>/<name>), so a related list needs a new lookup column on sys_http_delivery, an outbox write-path change and probably a backfill: about 100–250 lines across two packages; it changes the schema the redeliver guard reads.

Four facets

  • Real business need: one fleet walkthrough (admin wiring 报修单 to an ERP). No customer quote, ruling or topic card asks for these; the North Star line on webhooks (docs/NORTH-STAR.md:115) does not name a test send.
  • Long-term fit: a test send is a standard webhook affordance; done through the existing outbox and egress path it adds no second send path. The related list needs a real lookup column instead of the polymorphic ref_id.
  • Keeping AI from writing it wrong: no metadata an author writes changes; a test send that skipped signing or the redeliver gates would reopen [security] The webhook signing secret is stored in cleartext in sys_webhook.definition_json #7799, so it must reuse them.
  • Startup focus: each item is new surface with walkthrough-only pull. Recommendation: build 2 (event labels, small, no new surface) when an admin card next touches the delivery list; hold 1 and 3 until a customer asks.

Dedupe: webhook test send (226 hits; open ones #39423 parent, #32692 #27314 #35669 #35668 unrelated), webhook deliveries related list (17 hits; open #39423, #12708 unrelated), webhook ping (44 hits, all closed and unrelated). No card covers these.

Reader: the maintainer decides; on a go, seat repo:objectstack@os-tesla zone ot-flow builds it.

Grading: area:workflow · Feature · p3 · admins integrating an external system by webhook · read (new-company walkthrough on #39423) · Suggested-grade: p3.

Activity

  1. added
    enhancement
    area:workflow
    on Dec 4, 2026
  2. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:workflow · Feature · p3 · needs-user-decision · size M, touched 2026-12-04T07:14Z. Rationale: the card had area:workflow but no pm state. The filer marks it as a capability only the maintainer can decide to build: a test send from Setup, delivery events shown as labels, and recent deliveries on the webhook record. It carries items 3, 4b and 4d split from #39423, while #39423 keeps the minimum. So it goes to the maintainer, not pm:queue. The filer's p3 stands. Issue type set to Feature.
    Grade: area:workflow · Feature · p3 · admins integrating webhooks · read (split of #39423, claim 7403999138).

  3. added
    needs-user-decision
    on Dec 4, 2026
  4. objectstack-fleet commented on Dec 5, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Decision analysis at tier, re-run before presenting · 2026-12-05T22:35Z

    维护者速读

    • 问题:管理员在设置里接外部系统(如 ERP)时,没有「发送测试」,只能建一条真记录才知道对方收不收得到;投递列表里的事件是英文原值;想看某个 Webhook 的投递要去另一个菜单找。每个第一次配 Webhook 的管理员都会碰到,但目前只有一次内部走查提出,没有客户来要。
    • 选项:全不做,管理员照旧用真记录试(0 个 PR);只在下次动投递列表时顺手把事件显示成中文名、原值仍可见(约 1 个 PR),其余两项等客户提;现在加做「发送测试」(再加约 1 个 PR,要过安全评审);三项全做(约 3 个 PR,其中「最近投递」要给投递表加一列并改写入路径)。
    • 推荐:方向上三项都该有(主流平台的 Webhook 页都带试发和就近投递记录),但现在只顺手做事件中文名,试发和就近投递等第一位客户提出再做,届时先做试发。理由:失败原因已经能在投递列表里直接看到,用真记录试一次只多花一分钟,而试发是一个新的对外发送入口,没有客户拉动时不值得现在背上。
    • 不定会怎样:什么都不会坏。管理员能建 Webhook、能看懂失败原因,只是试发和就近查看继续缺着,这张卡一直挂在待裁列表里。

    Analysis

    Served-tier: CONTRACT_REVIEW_TIER
    Analysed-by: subagent of session_01Q4EjjMnyLqJdzuktEmRPXH

    Read at: objectstack origin/main e37358096d (2026-12-05). Cloud not read: the decision touches no cloud code.

    Background

    #39423 was a new-company walkthrough (Setup → Webhooks, zh-CN, an admin pushing each new 报修单 to an ERP). Its claim split the card: the minimum (definition optional, admin-language help, status as labels, error in the delivery lists) shipped in PR #39546, merged 2026-12-04 as ea18263361 (+488/−163, 40 files), and #39423 is closed. This card carries the three items held back: (1) a test send, (2) the delivery event shown as a label, (3) recent deliveries on the webhook record. The only source is that one walkthrough.

    Governing text

    • docs/NORTH-STAR.md:115: "② · Send out, take in: webhooks, scheduled jobs, email templates, inbox delivery and subscription preferences, the bell's read state · integration-system + platform-core · webhook-lifecycle, …". It names no test send and no per-webhook delivery list. (git grep -n -i webhook origin/main -- docs/NORTH-STAR.md → this one line.)
    • North Star, area:ux core feature ⑤: "a Chinese interface shows no stray English". This is the only North Star hook any of the three items has, and it is item 2's.
    • North Star rows next to it show the "try it on the spot" family already exists for siblings: flow-runs-page-test-trigger (flows), api-console-discovery-execute (declared endpoints); Setup has Send test email and Send test SMS (mail.manifest.ts:132, sms.manifest.ts:79). Webhooks are the member of that family without one.
    • content/docs/automation/webhooks.mdx:739: "There are no /webhooks/:id/test, /rotate, /deliveries, or per-delivery redeliver routes." This documents the present state; it is not a ruling against building them.
    • content/docs/automation/webhooks.mdx:69-70 (P5): "Every delivery attempt is visible to the owner of the webhook: status, response code, retry schedule, manual redelivery."
    • redeliver-entitlement.ts:4-17: the redeliver door is "a webhook-administration act … gated on … an object-level update admission on the webhook configuration object". Any second admin-triggered send inherits this rule.
    • redeliver-guard.ts:8-9: "service-messaging owns the replay mechanics and deliberately knows nothing about sys_webhook." This bears on item 3 (a lookup from the delivery table to the webhook table runs against it).
    • ADRs: no ADR decides a webhook test send or a per-webhook delivery list. Search: git grep -l -i webhook origin/main -- docs/adr (30 files) and check-prior-rulings.mjs --card 39526 (228 hits; the named decisions ADR-0030 §2/§9, ADR-0041 §5, ADR-0077 §1, ADR-0138 D7, ADR-0057 D9, ADR-0096 D4, ADR-0124 D2, ADR-0130 D8, ADR-0131 D3 are term matches on a broad set and none answers this question). ADR-0124 D1 (the entitlement is decided server-side) and ADR-0018 M3 (one shared HTTP outbox) constrain how item 1 would be built, not whether.

    Protocol statement

    None of the three changes what an author writes in metadata. Item 1 adds public surface outside the authoring protocol: one route or action, entries in the route ledger and the error-code ledger, one console button. Item 2 changes nothing if it is display only; it would grow the protocol only if a new field-level "label for a free-text value" key were invented for it, which this analysis does not recommend. Item 3 adds one column to a platform object and a write-path change in two packages.

    Premises, re-checked on e37358096d

    Premise on the card Now Re-check
    No test send exists Holds git grep -n -i -E "/webhooks/(test|ping)" origin/main -- packages → none; webhooks.mdx:739 says so
    The event is a raw value in the list Holds http-delivery.object.ts:147-152 label: Field.text, "Diagnostic label / event type — surfaced on X-Objectstack-Event"
    label is free text shared by webhook and flow rows, so it cannot be a select Holds auto-enqueuer.ts:1355,1512 write label: event.type; http-nodes.ts:409 writes label: `flow:${node.id}`
    ref_id is polymorphic text, so a related list needs a lookup column Holds http-delivery.object.ts:133-138; object.zod.ts:5110: a related-list name "whose child … has no inbound lookup / master_detail field to this object is refused everywhere". referenceVia (ADR-0052 §5) does not fit: its sibling must hold an object name, and source holds webhook / flow
    Status and error are unreadable in the list (parent card) Moved: fixed by #39546 http-delivery.object.ts:234-240 (select with five labels), :68,:77,:87 (error in every list)
    "the same … gates as POST /api/v1/webhooks/redeliver (redeliver-guard.ts, #7799)" Citation imprecise #7799 (closed) is the signing-secret-at-rest card; the redeliver veto is #8069 (redeliver-guard.ts:4), the entitlement is redeliver-entitlement.ts. The rule the card draws from them is right
    Read at e43597b1 Moved to e37358096d; the two object files changed only by #39546 git log origin/main --oneline -3 -- <the two object files>

    Three facts the card does not state, found on this read:

    1. The event value is also the wire value. It is sent as the X-Objectstack-Event header (auto-enqueuer.ts:1350), so the admin configuring the receiving system needs the literal data.record.created. A label must sit beside the raw value, not replace it.
    2. The spec has no mechanism for labelling a free-text column (git grep -n -i -E "valueLabels|displayMap|valueMap" origin/main -- packages/spec/src/data/field.zod.ts → only an unrelated location option). So item 2 is either a new stored select column written by the webhook producer, or a mapping in the console renderer keyed on one object, which is a special case. And flow rows carry flow:<node id>, an internal id no label map covers. Item 2 is smaller than the other two but is not "no new surface" for free.
    3. The redeliver door has no console caller that I can find (git grep -n -i -E "webhooks/redeliver|redeliverHttp" origin/main -- ui/packages apps → none outside changelogs), although the route ledger and the docs call it "the operator button". If that reading is right, the cheapest step toward "try it again after I fixed the ERP side" is a button on a failed delivery row, which needs no new server door, gate or error code. It is outside this card's three items; noted for triage, not filed.

    The concrete problem

    An admin who has just created a webhook cannot tell whether the other system accepts it without causing a real business event. Today's loop is: create a real record, open Setup → HTTP 投递, read the status and (since #39546) the error. That loop works and costs about a minute, but it writes a real record and sends real data. The delivery list shows the event as data.record.created, and the webhook's own page shows nothing about its deliveries.

    Options

    Option What is done What the customer sees Effort
    A. Build none Close or park the card Unchanged: try with a real record; raw event id; deliveries in another menu 0 PRs
    B. Item 2 when the delivery list is next touched; hold 1 and 3 until a customer asks (the card's recommendation) A translated event name beside the raw value on webhook rows The list reads 记录创建; test send and per-webhook list still missing domain:server (+ console if the mapping lives there) · 1 PR · precedent PR #39546 (+488/−163, 40 files, mostly generated bundles) for labels on this object; no precedent for labelling a free-text column
    C. B plus item 1 now A 「发送测试」 through the existing outbox, egress guard, signing and entitlement The admin presses one button and reads the receiver's answer domain:server + console · 1 more PR, contract review and a security read · precedents PR #22797 (+631/−81, 6 files; the redeliver door served from a Request) and PR #24848 (+641/−20, 8 files; Send test email / SMS)
    D. All three now C plus a lookup column on the delivery table, an outbox write-path change, probably a backfill Also a 最近投递 tab on the webhook page 3 PRs · item 3: no precedent found (shallow clone; PR search for a lookup added to a sys_ telemetry object returned nothing usable)

    In business terms: A is "the kettle has no test button; boil water to find out". B is relabelling one dial. C adds the test button, and with it a second way to make the platform call an outside address on an admin's say-so. D also moves the delivery history onto the webhook's own page, the way GitHub's webhook settings show Recent Deliveries.

    Four axes

    os-decision-facets

    • ① Long-term soundness: the end state has all three. Two years out a webhook page on this platform should look like the mainstream ones: GitHub's webhook settings (a ping on creation, a Recent Deliveries tab with Redeliver) and Stripe's (send a test event, per-endpoint attempt log). Item 1 shrinks a special case: webhooks are the one "send out" feature without the try-it affordance that mail, SMS, flows and declared endpoints already have, provided it rides the one outbox and the existing gates. Item 3 is sound only with a real lookup, and that lookup points from the generic outbox at one producer's table, against the stated separation; it is a permanent column. Item 2 is sound as a display projection that keeps the raw value; as a per-object mapping in the renderer it adds a special case.
    • ② Real business pull: one internal walkthrough; no customer quote, ruling or topic card. By construction every first-time webhook admin meets item 1, but each has a one-minute workaround, and after feat(webhooks): definition optional, admin-language help, delivery status labels #39546 a failure states its reason in the list. Items 2 and 3 are readability and convenience with substitutes. External pull is zero today, which defaults to defer.
    • ③ Preventing AI mistakes: no authored metadata changes, so there is nothing new for an AI author to get wrong. The risk is in the builder of item 1: a test send that builds its own request instead of enqueueing would skip signing, the egress guard or the organization scope, and the receiver would see an unsigned or misdirected call with nobody told. The existing doors refuse loudly (typed 401/403/404/409); a new door must reuse them, and this is the human-floor part of the card (a security and permission boundary).
    • ④ Startup focus: each item is surface that must be maintained forever (a route and its error codes; a column and its write path; a mapping to keep in step with the event enum). With zero customer pull, the rule is not to spread.

    Prior rulings read: webhooks,test,send,setup,delivery,events,labels,recent,deliveries,webhook,record → 228 hits; none (no named decision answers this question; ADR-0124 D1 and ADR-0018 M3 constrain the build); thread: none

    Recommendation

    B, with two conditions on item 2. Direction: all three belong in the end state. Timing: build item 2 the next time a card touches the delivery list; hold items 1 and 3 until a customer or partner asks, and when that happens build item 1 first.

    Conditions on item 2: the raw event value stays visible beside the label (the admin has to match it on the receiving side), and the mapping is not a per-object special case in the renderer. If the only way to ship it is such a special case, hold it too.

    Why not the others:

    • A: it leaves stray English in a Chinese admin list, the one item with a North Star hook, for no saving worth naming.
    • C: item 1 is the most valuable of the three and the first to build on pull, but it opens a second admin-triggered outbound door (a security review, new error codes, a route) while the one-minute workaround exists and nobody outside the fleet has asked.
    • D: item 3 adds a permanent column that couples the generic outbox to one producer, for a list that is one menu away.

    Self-check: only on ①, the answer is D (all three are the end state). Do ②③④ flip it: no. They move timing only: item 2 opportunistically, items 1 and 3 on first external pull. No new gate is introduced by ④.

    Effort note: ① reads close between C and D on direction, and the effort differs by about 3× between B (1 PR) and D (3 PRs); the recommendation takes the smaller now on timing grounds only.

    Confidence gaps:

    • Pull is one walkthrough. One customer or partner asking for a test send settles item 1 toward building now.
    • "No console caller of the redeliver door" rests on a grep of ui/packages and apps at this sha; a caller built from metadata at runtime would not show. A dogfood look at a failed delivery row settles it.
    • The design of a test payload is open: a synthetic body may be rejected by a receiver that validates fields, and a real-looking one is a real call to the customer's ERP. Whoever builds item 1 must rule on this first; it is part of why the item is not small.
    • Effort for item 3 has no precedent; the card's 100–250 lines is an estimate, and the backfill is unmeasured.

    After the ruling:

    • B: the card leaves the decision box. Item 2 goes to pm:queue at p3 with the two conditions written into it; items 1 and 3 stay on this card (or a parked successor) with the trigger "first customer or partner ask" recorded. No further question to the maintainer.
    • C or D: the seat (repo:objectstack@os-tesla, zone ot-flow) builds item 1 through the outbox and the existing entitlement and veto, with contract review at the review tier and a security read before merge; item 3, if ruled in, gets its own card because of the schema change.
    • A: close as not planned, with the walkthrough cited.

    Related cards and PRs

    Delta from the card's existing analysis:

  5. objectstack-fleet commented on Dec 5, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Ruling: letter D · maintainer 「39526 三个都做。其他都接受你的建议」 · 2026-12-05T23:02Z

    Maintainer ruling recorded: build all three now: a test send from Setup, delivery events shown as labels, and recent deliveries on the webhook record. D is not the analysis's recommendation (B); the maintainer chose it over B explicitly.

    Provenance

    • Who: the maintainer (hotlong). Where: the triage seat's session session_01Q4EjjMnyLqJdzuktEmRPXH, typed words, recorded within minutes. Words, verbatim: 「39526 三个都做。其他都接受你的建议」
    • What he answered: triage's Chinese walk-through of the nine open decisions, which put this card's recommendation to him as: 「现在只做第 2 项(事件显示中文名、原值并列),第 1、3 项等客户提再做」 — he answered 「三个都做」
    • The at-tier analysis behind it: 7446913703.

    Next (from the analysis, carried, not typed by him)

    • Order: item 2 (labels), then item 1 (test send), then item 3 (recent deliveries). Three PRs.
    • Item 2: the raw event value stays visible beside the label (the receiving side matches on it); the mapping is not a per-object special case in the renderer.
    • Item 1: goes through the existing outbox, egress guard, signing and entitlement — never a hand-built request. Contract review and a security read are owed. The test-payload design (synthetic vs real-looking body) is ruled by the builder first and stated in the PR.
    • Item 3: a real lookup column on the delivery table (ref_id is polymorphic), the outbox write-path change and any backfill; no effort precedent.
    • Triage splits items 1 and 3 into their own cards under this one; this card carries item 2.

    needs-user-decision off, pm:queue on: this card is now the build card for item 2.

  6. added
    pm:queue
    and removed
    needs-user-decision
    on Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowenhancementpm:queuepriority:p3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions