Skip to content

[3553 by Claude Opus 5.5] Official plugin: Outbound webhooks - #3584

Merged
propr-dev[bot] merged 3 commits into
3542-epic-plugin-system-xu8from
3553/claude-opus-5-5-official-plugin-outbound--20261116-1202-yqx
Nov 16, 2026
Merged

propr-dev[bot] merged 3 commits into
3542-epic-plugin-system-xu8from
3553/claude-opus-5-5-official-plugin-outbound--20261116-1202-yqx

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3553

Branch: 3553/claude-opus-5-5-official-plugin-outbound--20261116-1202-yqx
Commits: ✅ Changes committed (3c8d960)


AI Processing Completed

Execution Details:

  • Issue: Official plugin: Outbound webhooks #3553
  • Repository: integry/propr
  • Status: Success
  • Execution Time: 25m 13s
  • Tokens used: 29.64M tokens [29.53M input + 114.24K output]
  • API cost: $9.73
  • Timestamp: Nov 16, 2026, 12:27 PM UTC
  • LLM Model: Claude Opus 5.5

Summary:
I've built the outbound webhooks plugin and added three things the plugin interface lacked: request signing, retry hints and hosts taken from settings. All the related suites pass, including the full core, API, shared and plugins plugin suites, the Plugins page UI tests and the docs build. I did not run the full repository suite or the existing Playwright Plugins specs.

The plugin (packages/plugins/webhooks/)

  • It subscribes to the 12 events listed in the issue and sends each one to every target whose event list and repository filter match.
  • Settings have three fixed target slots, each with a URL, an event list (all events by default) and a repository filter. Each target has its own signing secret connection. The settings format can't hold a variable-length list of targets, which is why it's three slots and not "any number".
  • Each request is a POST of a versioned JSON envelope with event, delivery id, timestamp and signature headers. The envelope is built from an allowlist of identifiers, links, states and scores. Free-text fields are dropped (the Ultrafix reason, the epic queue's blocked reason, and any value with spaces).
  • Rate limits and server errors are retried, using the target's Retry-After when it gives one. Other 4xx answers and configuration errors fail the delivery at once with a message such as "Target 1 (hooks.example.com) refused the delivery with HTTP 410; it is not retried". When only some targets fail, the retry goes only to the targets that don't have the event yet.
  • The event-selection helper is in packages/plugins/_shared/, which plugins:check now skips as a non-plugin folder.

Platform changes the plugin needed

  • Signing: ctx.http can now use a signing_secret connection. ProPR computes the HMAC-SHA256 itself, so the handler never sees the secret.
  • Hosts from settings: the manifest has a new outboundHostsFromSettings field, which names URL settings. A new format: "https-url" string setting refuses plain HTTP, IP addresses, local names and credentials in the URL. When settings are saved, a new or changed URL's host must also resolve to public addresses only. That check runs only for administrators and doesn't look up URLs that weren't changed. ctx.http allows only those hosts, as saved.
  • Retry hints: a handler can throw a new PluginDeliveryError with a retry delay or as permanent. Event, webhook and command deliveries all honour it.
  • Settings form: lists with fixed choices now show as checkboxes, URL settings as URL fields, and the install step names the URL settings whose hosts the plugin may call.

Behaviour change: before this, ctx.http refused every signing_secret connection. Now an unsigned request with one is refused as invalid_input, and I updated the one existing test that expected the old refusal. webhooks is also the first plugin in the catalog that isn't development-only, so it now appears on every instance.

I captured previews of the settings form at desktop and phone widths, the refused http:// URL and the install step.

Acceptance criteria

  • AC1: met — npm run plugins:check passes ("2 plugins checked"); packages/plugins/webhooks/README.md has setup steps and a manual smoke-test checklist.
  • AC2: met — packages/plugins/test/webhooks.test.ts (one POST per matching target for every selected event, none for unselected events or filtered repositories, 429 with Retry-After retried after the delay, permanent 410 with a readable message); packages/core/test/pluginWebhooksPlugin.test.ts shows the real dispatcher scheduling the retry at exactly the Retry-After delay and failing a 410 at once.
  • AC3: met — docs/docs/plugins/webhooks.md has a test vector, checked by a test in packages/plugins/test/webhooks.test.ts; pluginWebhooksPlugin.test.ts verifies the real ctx.http signature with the documented algorithm.
  • AC4: met — save time: packages/core/test/pluginWebhooksPlugin.test.ts (plain HTTP, an IP address, localhost, a host that resolves to a private address) and packages/shared/test/plugins.test.ts; call time: the same core test (a host not derived from settings, plain HTTP, a host that later resolves privately).
  • AC5: met — the sentinel test in packages/plugins/test/webhooks.test.ts sends all 12 events with code, logs, prompt, tool output, prose and token sentinels in the event data, and with the secret as a sentinel; none appear in any URL, header, body or log line. The core test also checks the secret never appears in the sent request.
  • AC6: met — docs/docs/plugins/webhooks.md (envelope reference), linked from the new "Official plugins" table in docs/docs/features/plugins.md, plus a "Plugins" sidebar category in docs/sidebars.ts.

Review digest

Acceptance criteria (6 of 6 met, as stated by the agent)

  • ✅ AC1 (met): The plugin passes `plugins:check` and has a README with setup steps and a manual smoke-test checklist. — `npm run plugins:check` passes ("2 plugins checked"); `packages/plugins/webhooks/README.md` has setup steps and a manual smoke-test checklist.
  • ✅ AC2 (met): Handler tests with the plugin test kit: every selected event produces one POST to each matching target; unselected events and filtered repositories produce none; a 429 with `Retry-After` is retried after the delay; a permanent error marks the delivery failed with a readable message. — `packages/plugins/test/webhooks.test.ts` (one POST per matching target for every selected event, none for unselected events or filtered repositories, 429 with `Retry-After` retried after the delay, permanent 410 with a readable message); `packages/core/test/pluginWebhooksPlugin.test.ts` shows the r…
  • ✅ AC3 (met): The signature is verifiable with the documented algorithm (test vector in the docs). — `docs/docs/plugins/webhooks.md` has a test vector, checked by a test in `packages/plugins/test/webhooks.test.ts`; `pluginWebhooksPlugin.test.ts` verifies the real `ctx.http` signature with the documented algorithm.
  • ✅ AC4 (met): A target URL to a private address or plain HTTP is refused at save time; a host not derived from the settings is refused at call time. — save time: `packages/core/test/pluginWebhooksPlugin.test.ts` (plain HTTP, an IP address, localhost, a host that resolves to a private address) and `packages/shared/test/plugins.test.ts`; call time: the same core test (a host not derived from settings, plain HTTP, a host that later resolves privatel…
  • ✅ AC5 (met): No payload contains code, logs, prompt text, tool output or credentials (sentinel test). — the sentinel test in `packages/plugins/test/webhooks.test.ts` sends all 12 events with code, logs, prompt, tool output, prose and token sentinels in the event data, and with the secret as a sentinel; none appear in any URL, header, body or log line. The core test also checks the secret never appear…
  • ✅ AC6 (met): Docs: `docs/docs/plugins/webhooks.md` with the envelope reference, linked from `docs/docs/features/plugins.md`. — `docs/docs/plugins/webhooks.md` (envelope reference), linked from the new "Official plugins" table in `docs/docs/features/plugins.md`, plus a "Plugins" sidebar category in `docs/sidebars.ts`.

Risk-tiered paths

  • High risk: none
  • Normal risk (25 files)
    • packages/api/openapi/schemasPlugins.ts (+2/−1)
    • packages/client/src/generated/apiTypes.ts (+6/−2)
    • packages/core/src/plugins/pluginCommandDeliveries.ts (+3/−4)
    • packages/core/src/plugins/pluginContext.ts (+9/−4)
    • packages/core/src/plugins/pluginDeliveries.ts (+15/−1)
    • packages/core/src/plugins/pluginDispatcher.ts (+7/−6)
    • packages/core/src/plugins/pluginHandlerRunner.ts (+16/−2)
    • packages/core/src/plugins/pluginHttp.ts (+58/−6)
    • packages/core/src/plugins/pluginSettingHosts.ts (added, +50/−0)
    • packages/core/src/plugins/pluginStore.ts (+20/−0)
    • packages/core/src/plugins/pluginWebhookRunner.ts (+2/−3)
    • packages/plugins/_shared/eventSelection.ts (added, +53/−0)
    • packages/plugins/registry.json (+1/−0)
    • packages/plugins/testing/index.ts (+38/−7)
    • packages/plugins/webhooks/envelope.ts (added, +134/−0)
    • packages/plugins/webhooks/handlers.ts (added, +113/−0)
    • packages/plugins/webhooks/icon.svg (added, +1/−0)
    • packages/plugins/webhooks/manifest.json (added, +260/−0)
    • packages/shared/src/pluginInstallations.ts (+10/−2)
    • packages/shared/src/pluginSdk.ts (+61/−2)
    • packages/shared/src/plugins.ts (+87/−4)
    • propr-ui/src/pages/PluginsPage/PluginSettingFields.tsx (+38/−2)
    • propr-ui/src/pages/PluginsPage/pluginFixtures.testUtils.tsx (+1/−1)
    • propr-ui/src/pages/PluginsPage/pluginUi.ts (+8/−0)
    • scripts/check-plugins.mjs (+4/−3)
  • Low risk (16 files)
    • docs/docs/architecture/plugin-runtime.md (+37/−8)
    • docs/docs/features/plugins.md (+51/−8)
    • docs/docs/plugins/webhooks.md (added, +243/−0)
    • docs/sidebars.ts (+8/−0)
    • docs/static/openapi/propr-api.yaml (+14/−2)
    • packages/core/test/pluginHandlerRunner.test.ts (+25/−2)
    • packages/core/test/pluginWebhooksPlugin.test.ts (added, +193/−0)
    • packages/plugins/test/registry.test.ts (+14/−5)
    • packages/plugins/test/testing.test.ts (+19/−0)
    • packages/plugins/test/webhooks.test.ts (added, +251/−0)
    • packages/plugins/webhooks/README.md (added, +77/−0)
    • packages/shared/test/plugins.test.ts (+42/−1)
    • propr-ui/e2e/plugins.fixture.ts (+1/−1)
    • propr-ui/src/pages/PluginsPage/PluginSettingsForm.test.tsx (+26/−0)
    • propr-ui/src/pages/PluginsPage/pluginUi.test.ts (+12/−0)
    • test/checkPlugins.test.mjs (+7/−1)

Validation evidence

  • No repository validation commands ran.

Diff size: 41 files changed, +2,017/−78 lines

Detailed Logs:

  • Conversation: 71 messages
  • Session: f7e41a91-f50a-46d3-9374-d9cbf1bcf1dd

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3553-2026-11-16T12-27-39-271Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3553-2026-11-16T12-27-39-271Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: I've built the outbound webhooks plugin and added three things the plugin interface lacked: request signing, retry hints and hosts taken from settings. All the related suites pass, including the full ...


This PR was created automatically by ProPR after processing issue #3553.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

Install step: what the plugin adds

Install step: what the plugin adds

The catalog install step lists the subscribed events and that the plugin sends requests only to the hosts of the target URL settings.

Full-size original

Outbound webhooks settings (desktop)

Outbound webhooks settings (desktop)

The Configure step generated from the webhooks manifest: Target 1 URL as a URL field, Target 1 events as checkboxes (multiple choice), the repository filter, and the next target slot.

Full-size original

Outbound webhooks settings (phone)

Outbound webhooks settings (phone)

The same settings form at 390 px width.

Full-size original

Plain HTTP target refused (phone)

Plain HTTP target refused (phone)

Saving http:// as Target 1 URL is refused on the field with 'target1Url must be an https:// URL, not http'; event checkboxes in one column at 390 px.

Full-size original

…ugin interface lacked: request signing, retry hints and hosts taken from settings. All the related suites pass, including the full core, API, shared and plugins plugin suites, the Plugins page UI tests and the docs build. I did not run the full repository suite or the existing Playwright Plugins specs.

The plugin (`packages/plugins/webhooks/`)
- It subscribes to the 12 events listed in the issue and sends each one to every target whose event list and repository filter match.
- Settings have three fixed target slots, each with a URL, an event list (all events by default) and a repository filter. Each target has its own signing secret connection. The settings format can't hold a variable-length list of targets, which is why it's three slots and not "any number".
- Each request is a POST of a versioned JSON envelope with event, delivery id, timestamp and signature headers. The envelope is built from an allowlist of identifiers, links, states and scores. Free-text fields are dropped (the Ultrafix reason, the epic queue's blocked reason, and any value with spaces).
- Rate limits and server errors are retried, using the target's `Retry-After` when it gives one. Other 4xx answers and configuration errors fail the delivery at once with a message such as "Target 1 (hooks.example.com) refused the delivery with HTTP 410; it is not retried". When only some targets fail, the retry goes only to the targets that don't have the event yet.
- The event-selection helper is in `packages/plugins/_shared/`, which `plugins:check` now skips as a non-plugin folder.

Platform changes the plugin needed
- Signing: `ctx.http` can now use a `signing_secret` connection. ProPR computes the HMAC-SHA256 itself, so the handler never sees the secret.
- Hosts from settings: the manifest has a new `outboundHostsFromSettings` field, which names URL settings. A new `format: "https-url"` string setting refuses plain HTTP, IP addresses, local names and credentials in the URL. When settings are saved, a new or changed URL's host must also resolve to public addresses only. That check runs only for administrators and doesn't look up URLs that weren't changed. `ctx.http` allows only those hosts, as saved.
- Retry hints: a handler can throw a new `PluginDeliveryError` with a retry delay or as permanent. Event, webhook and command deliveries all honour it.
- Settings form: lists with fixed choices now show as checkboxes, URL settings as URL fields, and the install step names the URL settings whose hosts the plugin may call.

Behaviour change: before this, `ctx.http` refused every `signing_secret` connection. Now an unsigned request with one is refused as `invalid_input`, and I updated the one existing test that expected the old refusal. `webhooks` is also the first plugin in the catalog that isn't development-only, so it now appears on every instance.

I captured previews of the settings form at desktop and phone widths, the refused `http://` URL and the install step.

Acceptance criteria
- AC1: met — `npm run plugins:check` passes ("2 plugins checked"); `packages/plugins/webhooks/README.md` has setup steps and a manual smoke-test checklist.
- AC2: met — `packages/plugins/test/webhooks.test.ts` (one POST per matching target for every selected event, none for unselected events or filtered repositories, 429 with `Retry-After` retried after the delay, permanent 410 with a readable message); `packages/core/test/pluginWebhooksPlugin.test.ts` shows the real dispatcher scheduling the retry at exactly the `Retry-After` delay and failing a 410 at once.
- AC3: met — `docs/docs/plugins/webhooks.md` has a test vector, checked by a test in `packages/plugins/test/webhooks.test.ts`; `pluginWebhooksPlugin.test.ts` verifies the real `ctx.http` signature with the documented algorithm.
- AC4: met — save time: `packages/core/test/pluginWebhooksPlugin.test.ts` (plain HTTP, an IP address, localhost, a host that resolves to a private address) and `packages/shared/test/plugins.test.ts`; call time: the same core test (a host not derived from settings, plain HTTP, a host that later resolves privately).
- AC5: met — the sentinel test in `packages/plugins/test/webhooks.test.ts` sends all 12 events with code, logs, prompt, tool output, prose and token sentinels in the event data, and with the secret as a sentinel; none appear in any URL, header, body or log line. The core test also checks the secret never appears in the sent request.
- AC6: met — `docs/docs/plugins/webhooks.md` (envelope reference), linked from the new "Official plugins" table in `docs/docs/features/plugins.md`, plus a "Plugins" sidebar category in `docs/sidebars.ts`.
@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=10
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 16, 2026
@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements signed outbound webhooks with substantial integration coverage, but needs changes to preserve correct per-target behavior during manual retries.

✅ Signing boundary — HMAC signing happens in core without exposing the signing secret to the handler.

✅ Endpoint restrictions — Settings validation and request-time public-address checks cover complementary parts of the outbound network boundary.

✅ Dispatcher coverage — Added integration tests exercise actual signing, delayed retries, and permanent failures through the dispatcher.

This review is based on static inspection of the supplied code; no commands were run. The authoritative checks show no failures and two pending checks.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Preserve target progress for manual retries

  • Category: correctness

  • Required behavior: Retrying a partially failed delivery must send only to targets still owed, and an administrator must be able to retry a previously refused target after correcting its configuration.

  • Evidence: packages/plugins/webhooks/handlers.ts:94–111 — target skipping, progress persistence, and cleanup.

    1. Target 1 accepts an event; target 2 returns HTTP 410. The handler records both outcomes only in memory.
    2. Because there are no transient failures, it never saves progress and throws a permanent delivery error.
    3. An administrator fixes target 2 and selects Retry. The dispatcher invokes the same delivery with an incremented attempt.
    4. No saved progress exists, so target 1 receives the event again, despite already having succeeded. This contradicts the documented manual-retry behavior.

    The opposite failure occurs when target 1 permanently refuses and target 2 remains transiently unavailable through retry exhaustion: progress remains saved with target 1 in refused. After the administrator fixes both targets and retries, line 95 skips target 1 unconditionally. Target 2 succeeds, but the delivery fails using target 1’s stale refusal without contacting it.

    static trace: Both sequences follow the changed handler and the supplied dispatcher manual-retry contract. Stable delivery IDs permit receiver deduplication but do not preserve sender-side progress or retry a skipped destination. Existing tests cover automatic mixed-outcome retries, not manual recovery.

  • Minimum fix: Retain successful-target progress for failed deliveries and distinguish automatic retries from explicit manual retries so manual recovery retries refused targets while skipping successful ones. Add regression coverage for both sequences.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Harden the verification example

In docs/docs/plugins/webhooks.md, the JavaScript example compares string lengths before passing UTF-8 buffers to timingSafeEqual. A malformed non-ASCII signature can have the expected string length but a different byte length, causing an exception. Consider validating the signature’s ASCII hex format or comparing buffer lengths first. This is optional hardening of receiver example code; it does not affect the plugin’s generated signatures.

Score

The implementation has strong endpoint controls and useful integration tests, but manual recovery mishandles partial-delivery progress. The pending checks alone do not lower the score.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 15s
  • Tokens: 95,988 (94,594 in / 1,394 out)
  • Cost: $0.91

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit c9dcb66

Addressed 1 AI review comment (IDs: 6916944569)

Addressed finding F1

Summary of Changes

I fixed F1. The webhooks plugin now remembers which targets already have an event, so a manual Retry skips those and sends to every other target. That includes a target that refused the event, so an administrator can retry after fixing it. Automatic retries still don't ask a refusing target again.

How a manual Retry is recognised

  • The handler couldn't tell a manual Retry from an automatic retry: both only show an attempt number. The event input now has an optional manual: true on the attempt a manual Retry gives. It is added in packages/shared/src/pluginSdk.ts, and packages/core/src/plugins/pluginDispatcher.ts sets it from the delivery record's existing manual flag.

Handler changes (packages/plugins/webhooks/handlers.ts)

  • Progress is kept when a delivery fails. A delivery that ends with some targets still owed now saves which targets already have it. Before, it saved nothing when only refusals were left, so target 1 got the event again. Progress is deleted only once every target has it.
  • A manual Retry clears old refusals. It drops the saved refusals but keeps the list of targets that have the event. The second sequence in the finding (one target refused, the other busy until retries ran out) now contacts target 1 again rather than failing on its old refusal.
  • Progress is kept for 14 days, not 2. That matches how long Activity keeps deliveries and offers Retry. An old record wouldn't otherwise be dropped before a Retry can use it.
  • Full plugin state no longer fails a delivery. Keeping records longer makes the 256-key state limit easier to reach. When it is full, the oldest other progress record is dropped to make room. If that still fails, a warning is logged and the delivery's own result stands. The cost is that a later retry may resend to a target that has the event, with the same delivery id.

Docs: docs/docs/plugins/webhooks.md, docs/docs/features/plugins.md and docs/docs/architecture/plugin-runtime.md now describe the manual Retry behaviour and the new manual field.

Regression tests

  • In packages/plugins/test/webhooks.test.ts: both sequences from the finding; a target that refuses again on a manual Retry; and the full-state case.
  • In packages/core/test/pluginWebhooksPlugin.test.ts: the first sequence through the real dispatcher with Activity Retry, checking that target 1 isn't contacted again.
  • I ran the new tests against the original handler, and they fail there as expected.

Verification: these all pass:

  • the plugins package tests (22 of 22)
  • the core webhooks, dispatcher and dispatcher-ownership suites (16 of 16)
  • the plugins package typecheck and the core typecheck
  • plugins:check

Lint reports no errors in the changed plugin files. Its only warnings are "file ignored" for two files outside its configuration. I did not run the docs build or the full repository suite. Nothing visible changed, so there are no previews.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (3 files)
    • packages/core/src/plugins/pluginDispatcher.ts (+1/−1)
    • packages/plugins/webhooks/handlers.ts (+54/−12)
    • packages/shared/src/pluginSdk.ts (+4/−2)
  • Low risk (5 files)
    • docs/docs/architecture/plugin-runtime.md (+2/−1)
    • docs/docs/features/plugins.md (+6/−3)
    • docs/docs/plugins/webhooks.md (+5/−2)
    • packages/core/test/pluginWebhooksPlugin.test.ts (+29/−3)
    • packages/plugins/test/webhooks.test.ts (+53/−0)

Validation evidence

  • No repository validation commands ran.

Diff size: 8 files changed, +154/−24 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 6m 13s
  • Tokens: 2,218,437 (2,203,388 in / 15,049 out)
  • Cost: $1.12

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

… already have an event, so a manual **Retry** skips those and sends to every other target. That includes a target that refused the event, so an administrator can retry after fixing it. Automatic retries still don't ask a refusing target again.

I fixed F1. The webhooks plugin now remembers which targets already have an event, so a manual **Retry** skips those and sends to every other target. That includes a target that refused the event, so an administrator can retry after fixing it. Automatic retries still don't ask a refusing target again.

**How a manual Retry is recognised**
- The handler couldn't tell a manual Retry from an automatic retry: both only show an attempt number. The event input now has an optional `manual: true` on the attempt a manual Retry gives. It is added in `packages/shared/src/pluginSdk.ts`, and `packages/core/src/plugins/pluginDispatcher.ts` sets it from the delivery record's existing `manual` flag.

**Handler changes (`packages/plugins/webhooks/handlers.ts`)**
- **Progress is kept when a delivery fails.** A delivery that ends with some targets still owed now saves which targets already have it. Before, it saved nothing when only refusals were left, so target 1 got the event again. Progress is deleted only once every target has it.
- **A manual Retry clears old refusals.** It drops the saved refusals but keeps the list of targets that have the event. The second sequence in the finding (one target refused, the other busy until retries ran out) now contacts target 1 again rather than failing on its old refusal.
- **Progress is kept for 14 days, not 2.** That matches how long Activity keeps deliveries and offers Retry. An old record wouldn't otherwise be dropped before a Retry can use it.
- **Full plugin state no longer fails a delivery.** Keeping records longer makes the 256-key state limit easier to reach. When it is full, the oldest other progress record is dropped to make room. If that still fails, a warning is logged and the delivery's own result stands. The cost is that a later retry may resend to a target that has the event, with the same delivery id.

**Docs:** `docs/docs/plugins/webhooks.md`, `docs/docs/features/plugins.md` and `docs/docs/architecture/plugin-runtime.md` now describe the manual Retry behaviour and the new `manual` field.

**Regression tests**
- In `packages/plugins/test/webhooks.test.ts`: both sequences from the finding; a target that refuses again on a manual Retry; and the full-state case.
- In `packages/core/test/pluginWebhooksPlugin.test.ts`: the first sequence through the real dispatcher with Activity Retry, checking that target 1 isn't contacted again.
- I ran the new tests against the original handler, and they fail there as expected.

**Verification:** these all pass:
- the plugins package tests (22 of 22)
- the core webhooks, dispatcher and dispatcher-ownership suites (16 of 16)
- the plugins package typecheck and the core typecheck
- `plugins:check`

Lint reports no errors in the changed plugin files. Its only warnings are "file ignored" for two files outside its configuration. I did not run the docs build or the full repository suite. Nothing visible changed, so there are no previews.

PR: #3584
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds signed outbound webhooks with event filtering, configurable destinations, and retry handling. The implementation is well documented, but needs a localized correction to delivery progress handling before merge.

✅ Signing boundary — HMAC generation stays inside ctx.http; handlers receive neither the signing secret nor a bearer credential.

✅ Endpoint checks — Saved target URLs undergo public-address validation, and requests resolve and validate addresses again before transport.

✅ Retry coverage — Added tests cover rate limits, permanent failures, mixed target outcomes, and manual retries.

This review is based on static analysis of the supplied code; no commands were run. The authoritative checks report 29 passed, five pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F2: 🔴 Persist progress before subsequent sends

  • Category: correctness

  • Required behavior: Partial delivery retries must skip successful targets and allow outstanding targets to receive the event within the handler’s execution limit.

  • Evidence: packages/plugins/webhooks/handlers.ts:132–149 — sequential sends and deferred progress persistence.

    1. Configure three matching targets. Each endpoint successfully responds in 9.8 seconds, within the documented 10-second request limit. Let the initial state read and other preparation consume one second, a permitted latency for the database-backed state operations.
    2. The handler awaits the targets sequentially. Targets 1 and 2 accept their deliveries, but their successes exist only in the local progress.sent array.
    3. The 30-second handler deadline expires while target 3 is still responding. The runner aborts the request and ends the context before saveProgress can commit anything.
    4. With the same timings on subsequent attempts, each retry sends again to targets 1 and 2 and aborts target 3. The delivery eventually fails despite all three endpoints responding within the individual request limit.

    The state-store lifetime guard correctly prevents writes after timeout, so a late continuation cannot recover the lost progress. Stable delivery IDs help receivers deduplicate, but do not let target 3 finish. Existing tests use immediate responses and do not exercise the aggregate deadline. static trace: the supplied sequential loop, deferred persistence, documented runner timeout, and state-store cancellation guard establish this sequence; it was not executed.

  • Minimum fix: Persist each successful target’s progress before awaiting the next target, so subsequent attempts can skip completed sends after a timeout. Add a regression test covering cumulative request duration exceeding the handler deadline.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Document progress eviction

docs/docs/plugins/webhooks.md promises that successful-target progress is kept for 14 days, but saveProgress can evict the oldest record when the installation’s 256-key state limit is reached. Document that capacity eviction can cause repeat deliveries and that receivers must deduplicate. This is an optional documentation clarification because the broader delivery contract already specifies at-least-once delivery.

Score

The signing, endpoint validation, and focused tests are strong. Deferred progress persistence leaves a reproducible timeout failure in the new multi-target delivery path; the remaining checks are pending.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 25s
  • Tokens: 101,288 (99,708 in / 1,580 out)
  • Cost: $0.95

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F2 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit e4c9f8f

Addressed 1 AI review comment (IDs: 6917524515)

Addressed finding F2

Summary of Changes

I fixed F2. The webhooks handler now saves which targets have the event as soon as each one answers, before it sends to the next one. If a run hits the handler's time limit partway through, the next attempt skips the targets that already accepted and sends only to the ones still owed.

Fix (packages/plugins/webhooks/handlers.ts)

  • After each success or permanent refusal, the progress record is saved before the next send. The last target's outcome is still saved by the existing code at the end, so a delivery that succeeds everywhere on the first try writes nothing extra.
  • I added a stored flag that also counts these mid-run saves. Without it, a delivery that ended up succeeding on every target, or that ended with only refusals, could leave a progress record behind.
  • Transient failures are still not saved mid-run; they are retried as before.
  • The incremental save uses the existing saveProgress, which makes room when state is full. The state store's guard after a timeout is unchanged: anything that finishes after the run is cut off cannot be saved, and that part can't be avoided. What this fixes is that finished targets used to be held only in memory until the very end.

Regression test (packages/core/test/pluginWebhooksPlugin.test.ts)

  • The new test uses the real handler runner, ctx.http and SQLite state. There are three targets, each answering in 150 ms, under a 400 ms handler time limit.
  • The first run times out while target 3 is still answering. The second attempt sends only to target 3, succeeds with all three delivered, and leaves no progress record.
  • I ran the new test against the previous handler and it fails: the second attempt sends to all three again and times out. To support the test, the fixture can now delay a host's answer and gained a third public test host.

Docs: docs/docs/plugins/webhooks.md now says progress is kept as each target answers, so an attempt cut off by the time limit is not sent again to targets that already accepted.

Checks: the core webhooks test file passes (5 of 5), as do the plugin webhooks tests (11 of 11), plugins:check and the handler typecheck. ESLint skips all three changed files (the repo's lint config doesn't cover them), so they weren't linted. I did not run the full core or repository suites.

I found nothing else outside F2 that needs reporting. There's no visual change, so I made no previews.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/plugins/webhooks/handlers.ts (+9/−5)
  • Low risk (2 files)
    • docs/docs/plugins/webhooks.md (+4/−2)
    • packages/core/test/pluginWebhooksPlugin.test.ts (+28/−3)

Validation evidence

  • No repository validation commands ran.

Diff size: 3 files changed, +41/−10 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 4m 50s
  • Tokens: 1,266,566 (1,258,075 in / 8,491 out)
  • Cost: $0.77

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…ve the event as soon as each one answers, before it sends to the next one. If a run hits the handler's time limit partway through, the next attempt skips the targets that already accepted and sends only to the ones still owed.

I fixed F2. The webhooks handler now saves which targets have the event as soon as each one answers, before it sends to the next one. If a run hits the handler's time limit partway through, the next attempt skips the targets that already accepted and sends only to the ones still owed.

**Fix (`packages/plugins/webhooks/handlers.ts`)**
- After each success or permanent refusal, the progress record is saved before the next send. The last target's outcome is still saved by the existing code at the end, so a delivery that succeeds everywhere on the first try writes nothing extra.
- I added a `stored` flag that also counts these mid-run saves. Without it, a delivery that ended up succeeding on every target, or that ended with only refusals, could leave a progress record behind.
- Transient failures are still not saved mid-run; they are retried as before.
- The incremental save uses the existing `saveProgress`, which makes room when state is full. The state store's guard after a timeout is unchanged: anything that finishes after the run is cut off cannot be saved, and that part can't be avoided. What this fixes is that finished targets used to be held only in memory until the very end.

**Regression test (`packages/core/test/pluginWebhooksPlugin.test.ts`)**
- The new test uses the real handler runner, `ctx.http` and SQLite state. There are three targets, each answering in 150 ms, under a 400 ms handler time limit.
- The first run times out while target 3 is still answering. The second attempt sends only to target 3, succeeds with all three delivered, and leaves no progress record.
- I ran the new test against the previous handler and it fails: the second attempt sends to all three again and times out. To support the test, the fixture can now delay a host's answer and gained a third public test host.

**Docs:** `docs/docs/plugins/webhooks.md` now says progress is kept as each target answers, so an attempt cut off by the time limit is not sent again to targets that already accepted.

**Checks:** the core webhooks test file passes (5 of 5), as do the plugin webhooks tests (11 of 11), `plugins:check` and the handler typecheck. ESLint skips all three changed files (the repo's lint config doesn't cover them), so they weren't linted. I did not run the full core or repository suites.

I found nothing else outside F2 that needs reporting. There's no visual change, so I made no previews.

PR: #3584
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds signed outbound webhooks with event filtering, configurable destinations, and retry handling. The supplied code supports the core acceptance criteria, and I found no verified merge blocker. It is merge-ready within the reviewed scope, conditional on the three pending checks completing successfully.

✅ Signing stays inside the runtime — pluginHttp.ts computes HMAC signatures without exposing signing secrets to handlers; integration tests verify the transmitted signature.

✅ Destination checks cover both boundaries — Settings saves check public DNS addresses, and requests independently validate destinations and dial the vetted address.

✅ Partial retries preserve progress — Target outcomes are persisted between sends, with tests covering mixed failures, manual retries, and handler timeouts.

This was a static review of the supplied diff and context; no commands or tests were run. The authoritative check summary reports 31 passed, three pending, and no failures.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Document progress eviction

packages/plugins/webhooks/handlers.ts, in saveProgress, explicitly permits evicting older progress records when state fills. However, docs/docs/plugins/webhooks.md says progress is retained for 14 days and retries skip successful targets without mentioning this exception. Document that capacity pressure can cause repeat deliveries with the same delivery ID. This is optional clarification because the transport already promises at-least-once delivery and instructs receivers to deduplicate.

S4: 🟢 Harden verification examples

The JavaScript verifier in docs/docs/plugins/webhooks.md compares string lengths before calling timingSafeEqual on UTF-8 buffers. Equal character counts can produce different byte lengths, causing malformed signatures to throw. The Python example also throws for missing or malformed timestamps. Consider validating header syntax and returning false for malformed input, with small example tests. This improves the sample receivers’ robustness without changing the plugin’s signing correctness.

Score

The implementation has substantial coverage of signing, endpoint restrictions, and delivery recovery, with no verified blocker in the supplied code. Remaining checks are pending; runtime validation was not independently executed during this review.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 6s
  • Tokens: 99,928 (98,815 in / 1,113 out)
  • Cost: $0.94

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S3 S4

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 16, 2026
@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

ℹ️ GitHub auto-merge is turned off for this repository, so ProPR merges this PR itself once it is ready (checks passed or no CI configured, and the review goal met).

To let GitHub merge it the moment required checks pass, enable Settings → General → Pull Requests → Allow auto-merge.

@propr-dev
propr-dev Bot merged commit 1f5f82d into 3542-epic-plugin-system-xu8 Nov 16, 2026
50 checks passed
@propr-dev
propr-dev Bot deleted the 3553/claude-opus-5-5-official-plugin-outbound--20261116-1202-yqx branch November 16, 2026 13:45
@propr-dev propr-dev Bot changed the title 🔨 [3553 by Claude Opus 5.5] Official plugin: Outbound webhooks [3553 by Claude Opus 5.5] Official plugin: Outbound webhooks Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants