Skip to content

feat: trigger automations from incoming webhooks - #5617

Open
Ptah-CT wants to merge 1 commit into
stablyai:mainfrom
Ptah-CT:pr/webhooks-automations
Open

Ptah-CT wants to merge 1 commit into
stablyai:mainfrom
Ptah-CT:pr/webhooks-automations

Conversation

@Ptah-CT

@Ptah-CT Ptah-CT commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

What

Lets incoming webhooks trigger automations. Adds an optional local webhook receiver and a per-automation webhook trigger, so external systems (CI, git hosts, monitors, cron-elsewhere) can kick off an Orca automation by POSTing to it.

Why

Automations could previously only run on a schedule. Many real triggers are event-driven (a push, a deploy, an alert). This adds a first-class, secured inbound path.

What's included

  • Webhook server (src/main/webhooks/): local HTTP receiver with bind-address control, a per-automation secret (webhook-secret.ts), and a rate limiter (webhook-rate-limiter.ts). Full unit tests.
  • Automation editor: AutomationWebhookSection to enable a webhook trigger and manage its secret; trigger type surfaced in the prompt/section UI.
  • Settings: WebhookServerSetting pane (enable receiver, port, bind address) under Advanced — with a loud warning when binding to 0.0.0.0.
  • Wiring: persistence, IPC/preload, runtime RPC, dispatch events, shared automation-webhook + automation-run-status models.
  • i18n: en/es/ja/ko/zh.

Security

  • Secrets are required per webhook trigger; receiver defaults to localhost and warns explicitly before exposing to the network.
  • Rate limiting on the inbound endpoint.

Testing

  • pnpm run typecheck ✓
  • Unit tests: webhook server, secret, rate limiter, persistence, automations service ✓

Open in Stage

ELI5

Automations can be started by an incoming HTTP webhook, not only on a schedule. External tools (CI, monitors, other systems) POST to a local webhook receiver to kick off a run.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request adds end-to-end webhook trigger support for automations. New shared types define webhook authentication configuration (AutomationWebhookConfig, AutomationWebhookSecretMode), delivery payloads (AutomationWebhookDelivery), server endpoint state (WebhookServerEndpoint), and server settings (WebhookServerSettings). A new HTTP WebhookServer handles inbound POST /webhook/<automationId> requests with per-IP sliding-window rate limiting, body size enforcement, and HMAC-SHA-256 or token-based secret verification. AutomationService gains a triggerWebhook method that creates a webhook-triggered run and dispatches it. The main process wires the server lifecycle, applies live settings changes, and exposes IPC endpoints for the renderer. Persistence normalizes webhook config on create/update and stores delivery metadata on runs. A new AutomationWebhookSection renderer component enables webhook configuration in the automation editor, and a WebhookServerSetting component is added to the Advanced settings pane.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.04% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description covers the feature and testing, but it misses required template sections like Screenshots, AI Review Report, Security Audit, and Notes. Add the missing headings and fill them per template, including a screenshots note, checklist-style testing, AI review report, security audit, and notes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main feature being added: webhook triggering for automations. It is specific and directly related to the primary change in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/main/persistence.ts (1)

3984-3989: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid trigger-agnostic deduplication for webhook runs.

Line 3984 deduplicates by (automationId, scheduledFor) for all triggers. For webhook traffic, two deliveries with the same timestamp can collapse into one run, dropping executions/payloads.

Suggested fix
-    const existing = (this.state.automationRuns ?? []).find(
-      (run) => run.automationId === automation.id && run.scheduledFor === scheduledFor
-    )
+    const existing =
+      trigger === 'scheduled'
+        ? (this.state.automationRuns ?? []).find(
+            (run) =>
+              run.automationId === automation.id &&
+              (run.trigger ?? 'scheduled') === 'scheduled' &&
+              run.scheduledFor === scheduledFor
+          )
+        : undefined
src/renderer/src/components/automations/AutomationsPage.tsx (1)

1-2: 🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Extract webhook editor logic instead of expanding a max-lines-disabled page.

This page still relies on eslint-disable max-lines, and the new webhook endpoint/secret/save orchestration adds more responsibility here. Please move the webhook editor state and config-building logic into a focused hook/helper and remove the disable instead of growing this file further.

As per coding guidelines, “Never add a max-lines disable comment (eslint-disable max-lines, oxlint-disable max-lines, or line-specific variants). Split the file, extract focused modules, move fixtures/builders into named files, or otherwise reduce the counted lines instead.”

Also applies to: 454-490, 1385-1418

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c8bcb10f-e0e9-4cff-b0e9-512e7cc7ea2f

📥 Commits

Reviewing files that changed from the base of the PR and between 12d78b5 and fe33002.

📒 Files selected for processing (35)
  • src/main/automations/service.test.ts
  • src/main/automations/service.ts
  • src/main/index.ts
  • src/main/persistence.test.ts
  • src/main/persistence.ts
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/rpc/methods/automations.ts
  • src/main/webhooks/webhook-rate-limiter.test.ts
  • src/main/webhooks/webhook-rate-limiter.ts
  • src/main/webhooks/webhook-secret.test.ts
  • src/main/webhooks/webhook-secret.ts
  • src/main/webhooks/webhook-server.test.ts
  • src/main/webhooks/webhook-server.ts
  • src/preload/api-types.ts
  • src/preload/index.ts
  • src/renderer/src/components/automations/AutomationEditorDialog.tsx
  • src/renderer/src/components/automations/AutomationEditorPromptSection.tsx
  • src/renderer/src/components/automations/AutomationSchedulePicker.test.ts
  • src/renderer/src/components/automations/AutomationWebhookSection.tsx
  • src/renderer/src/components/automations/AutomationsPage.tsx
  • src/renderer/src/components/settings/AdvancedPane.tsx
  • src/renderer/src/components/settings/WebhookServerSetting.tsx
  • src/renderer/src/hooks/useAutomationDispatchEvents.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/automation-run-status.ts
  • src/shared/automation-webhook.test.ts
  • src/shared/automation-webhook.ts
  • src/shared/automations-types.ts
  • src/shared/constants.test.ts
  • src/shared/constants.ts
  • src/shared/types.ts

Comment thread src/main/index.ts
Comment on lines +1451 to +1459
void webhookServer.apply(store!.getSettings().webhookServer ?? getDefaultWebhookServerSettings())
unsubscribeWebhookSettings?.()
unsubscribeWebhookSettings = store!.onSettingsChanged((updates) => {
if ('webhookServer' in updates) {
void webhookServer?.apply(
store!.getSettings().webhookServer ?? getDefaultWebhookServerSettings()
)
}
})

@coderabbitai coderabbitai Bot Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Start the webhook listener after dispatch is ready.

Line 1451 can bind and accept POSTs before desktop dispatch is attached in openMainWindow() and before serve-mode headless PTY dispatch is registered. A startup webhook can reach triggerWebhook before there is a ready dispatcher, causing a lost or failed run. Defer the initial apply() and settings subscription until after those readiness points, or gate webhook dispatch until the automation dispatcher is ready.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Race is real in desktop mode, but deferring apply() misses the window-closed case, and skipped runs still return 202 Accepted. Better: report dispatch availability in the response instead:

// webhook-server.ts, handleRequest — with deps.triggerWebhook typed as Promise<AutomationRun>
const run = await this.deps.triggerWebhook(automationId, delivery)
if (run.status === 'skipped_unavailable' || run.status === 'dispatch_failed') {
  res.writeHead(503)
  res.end()
  return
}
res.writeHead(202)
res.end()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
cd /repo 2>/dev/null || true
fd -type f service.ts src/main/automations 2>/dev/null
ast-grep run --pattern 'triggerWebhook($$$) {
  $$$
}' --lang typescript src/main/automations/service.ts
echo "---dispatch---"
rg -n "dispatch\(" src/main/automations/service.ts | head -30
echo "---status type---"
rg -n "AutomationRunStatus" src/shared/automations-types.ts
echo "---skipped_unavailable---"
rg -n "skipped_unavailable|dispatch_failed" src/shared/automations-types.ts src/main/automations/service.ts
</function_calls>
</invoke>

Length of output: 5651


@Viperwow, that's a cleaner fix — it addresses the actual failure mode (nothing ever consumed the delivery) rather than just narrowing the startup window, and it doesn't create the window-closed gap that deferring apply() would.

One thing to line up for this to type-check: WebhookServerDeps.triggerWebhook is currently typed as Promise<unknown> | unknown in src/main/webhooks/webhook-server.ts; it'll need to be narrowed to Promise<AutomationRun> to match AutomationService.triggerWebhook's actual signature so run.status is accessible without a cast.

export type WebhookServerDeps = {
  getAutomation(automationId: string): Automation | undefined
  triggerWebhook(automationId: string, delivery: AutomationWebhookDelivery): Promise<AutomationRun>
}

And in handleRequest, per your snippet:

const run = await this.deps.triggerWebhook(automationId, delivery)
if (run.status === 'skipped_unavailable' || run.status === 'dispatch_failed') {
  res.writeHead(503)
  res.end()
  return
}
res.writeHead(202)
res.end()

Worth also handling the case where triggerWebhook throws (e.g., automation not found, webhook not enabled) — that path already falls into the existing catch block and returns 500, but you may want a distinct 404/403 there too if callers need to tell "unknown automation" apart from "server error." Let me know if you'd like me to flag that as a separate follow-up.


🧬 Code Graph Analysis Results

Relevant snippets

src/main/webhooks/webhook-server.ts (lines 87-242)

export class WebhookServer {
  // ...

  private async handleRequest(req: IncomingMessage, res: ServerResponse): Promise<void> {
    try {
      if (req.method !== 'POST') {
        res.writeHead(405)
        res.end()
        return
      }
      const automationId = parseAutomationId(req.url)
      if (!automationId) {
        res.writeHead(404)
        res.end()
        return
      }
      // ...
      const automation = this.deps.getAutomation(automationId)
      // ...
      req.setTimeout(REQUEST_SLOWLORIS_MS, () => req.destroy())
      const { body, tooLarge } = await readBodyWithLimit(req)
      if (tooLarge) {
        res.writeHead(413)
        res.end()
        return
      }

      const verification = verifyWebhookSecret({
        config: automation.webhook,
        headers: req.headers,
        rawBody: body
      })
      if (!verification.ok) {
        res.writeHead(401)
        res.end()
        return
      }

      const contentType =
        typeof req.headers['content-type'] === 'string' ? req.headers['content-type'] : null
      const delivery = captureWebhookDelivery({ body, contentType, receivedAt: Date.now() })
      await this.deps.triggerWebhook(automationId, delivery)

      res.writeHead(202)
      res.end()
    } catch (err) {
      console.error('[webhooks] request handling failed', err)
      if (!res.headersSent) {
        res.writeHead(500)
      }
      res.end()
    }
  }
}

Docstring-style summary:

  • Function: handleRequest(req: IncomingMessage, res: ServerResponse): Promise<void>
  • Behavior: Handles POST webhook requests; validates automation id, webhook enabled/config, rate limits, body size, and webhook secret; captures and forwards the request body as delivery.
  • Dispatch call: await this.deps.triggerWebhook(automationId, delivery)
  • Response (current behavior in snippet): Always returns 202 Accepted after triggerWebhook resolves, without checking any returned AutomationRun status.
  • Error handling: On exceptions, logs [webhooks] request handling failed ...; if headers aren’t already sent, responds with 500, then res.end().

src/main/automations/service.ts (lines 26-185)

export class AutomationService {
  // ...

  async triggerWebhook(
    automationId: string,
    delivery: AutomationWebhookDelivery
  ): Promise<AutomationRun> {
    const automation = this.store.listAutomations().find((entry) => entry.id === automationId)
    if (!automation) {
      throw new Error('Automation not found.')
    }
    if (!isWebhookTriggerEnabled(automation)) {
      throw new Error('Webhook trigger is not enabled for this automation.')
    }
    const run = this.store.createAutomationRun(automation, Date.now(), 'webhook', delivery)
    return await this.requestDispatch(automation, run)
  }

  async markDispatchResult(result: AutomationDispatchResult): Promise<AutomationRun> {
    const run = this.store.updateAutomationRun(result)
    if (!isFinalAutomationRunStatus(run.status)) {
      return run
    }
    // ...
  }

  // ...
}

Docstring-style summary:

  • Method: triggerWebhook(automationId: string, delivery: AutomationWebhookDelivery): Promise<AutomationRun>
  • Validation: Throws if automation id is unknown or webhook trigger is disabled.
  • Run creation: Creates an automation run with trigger type 'webhook' and the captured delivery.
  • Dispatch: Returns await this.requestDispatch(automation, run) (the returned AutomationRun is what webhook-server.ts’s handleRequest awaits).

✏️ Learnings added
Learnt from: Viperwow
Repo: stablyai/orca PR: 5617
File: src/main/index.ts:1451-1459
Timestamp: 2026-07-03T10:51:47.843Z
Learning: In `src/main/webhooks/webhook-server.ts`, `WebhookServer.handleRequest` should check the `AutomationRun.status` returned by `deps.triggerWebhook(automationId, delivery)` and return HTTP 503 when the status is `'skipped_unavailable'` or `'dispatch_failed'` (rather than unconditionally returning 202), since `AutomationService.triggerWebhook` (in `src/main/automations/service.ts`) already resolves these statuses synchronously via `requestDispatch` when no dispatcher is ready. Deferring `WebhookServer.apply()` until dispatch is ready was rejected as a fix because it misses the window-closed case in desktop mode. `WebhookServerDeps.triggerWebhook` return type should be `Promise<AutomationRun>`, not `Promise<unknown>`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Comment on lines +38 to +44
return { url: null, hint: 'Save the automation to get its webhook URL.' }
}
if (!endpoint || !endpoint.running) {
return {
url: null,
hint: 'Enable the webhook receiver in Settings → Automations to get a URL.'
}

@coderabbitai coderabbitai Bot Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Localize resolveWebhookUrl hint strings.

Lines 38-44 and 53-54 use hard-coded English while the rest of the component uses translate(...), so these hints won’t be localized.

Also applies to: 53-54

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid — covered by the suggestion in the IPv6 thread above (translate calls with catalog-scheme keys). en.json additions under auto.components.automations.AutomationWebhookSection:

"f817663ae9": "Save the automation to get its webhook URL.",
"3a6c802f95": "Enable the webhook receiver in Settings → Automations to get a URL.",
"6078b095d2": "Replace YOUR-HOST with this machine’s address reachable by the sender.",
"bfbf9f15c9": "Point your provider’s webhook at this URL (POST)."

Then pnpm bootstrap:locale-catalog for es/ja/ko/zh.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Viperwow, thanks — that approach looks solid. Using catalog-scheme keys (f817663ae9, 3a6c802f95, 6078b095d2, bfbf9f15c9) under auto.components.automations.AutomationWebhookSection in en.json, then running pnpm bootstrap:locale-catalog to propagate to es/ja/ko/zh, will correctly localize the resolveWebhookUrl hints and the YOUR-HOST guidance text. Let me know once it's applied.


✏️ Learnings added
Learnt from: Viperwow
Repo: stablyai/orca PR: 5617
File: src/renderer/src/components/automations/AutomationWebhookSection.tsx:38-44
Timestamp: 2026-07-03T10:49:38.642Z
Learning: In the stablyai/orca repo, English UI strings added to `src/renderer/src/i18n/locales/en.json` follow a catalog-scheme convention: keys are short hashes (e.g., `f817663ae9`) nested under a path mirroring the component's location, such as `auto.components.automations.AutomationWebhookSection`. After adding new English strings, run `pnpm bootstrap:locale-catalog` to propagate/generate corresponding entries for other locales (es/ja/ko/zh).

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: gsxdsm
Repo: stablyai/orca PR: 5501
File: src/renderer/src/components/right-sidebar/checks-panel-content.tsx:1504-1504
Timestamp: 2026-06-16T15:35:16.815Z
Learning: In the stablyai/orca renderer codebase, Tailwind classes using the custom variant `can-hover` (e.g., `can-hover:opacity-0`) are intentionally treated as self-documenting, with the hover/pointer-only rationale defined once at `src/renderer/src/assets/main.css` via `custom-variant can-hover (media (hover: hover))`. When reviewing `.ts/.tsx` files, do not flag usage sites for missing inline “why” comments or duplicated rationale—assume the variant name and its central definition provide sufficient context.

Comment on lines +47 to +48
const title = 'Webhooks'
const description = 'Receive inbound webhooks that trigger automations.'

@coderabbitai coderabbitai Bot Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Localize section title/description strings.

Lines 47-48 are user-facing hard-coded strings; they should go through translate(...) like the rest of this settings panel.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid (the keywords array stays English — search keywords, consistent with other panes):

Suggested change
const title = 'Webhooks'
const description = 'Receive inbound webhooks that trigger automations.'
const title = translate('auto.components.settings.WebhookServerSetting.eac8168131', 'Webhooks')
const description = translate(
'auto.components.settings.WebhookServerSetting.7e6bdce4df',
'Receive inbound webhooks that trigger automations.'
)

en.json under auto.components.settings.WebhookServerSetting:

"eac8168131": "Webhooks",
"7e6bdce4df": "Receive inbound webhooks that trigger automations."

Then pnpm bootstrap:locale-catalog for es/ja/ko/zh.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Viperwow, thanks for confirming the exact keys and the localization workflow — that looks correct. Once pnpm bootstrap:locale-catalog propagates the eac8168131/7e6bdce4df keys to es/ja/ko/zh, this should be fully localized while keeping the keywords array as plain English search terms.


✏️ Learnings added
Learnt from: Viperwow
Repo: stablyai/orca PR: 5617
File: src/renderer/src/components/settings/WebhookServerSetting.tsx:47-48
Timestamp: 2026-07-03T10:49:36.146Z
Learning: In the stablyai/orca renderer codebase, when localizing user-facing strings in settings components (e.g., `src/renderer/src/components/settings/*.tsx`), use `translate('auto.components.<Dir>.<ComponentFile>.<10-char-hash>', 'Default English text')` with pre-generated hash-based keys added to `en.json` under the `auto.components.<Dir>.<ComponentFile>` namespace, then run `pnpm bootstrap:locale-catalog` to propagate translations to es/ja/ko/zh. Note that `keywords` arrays used for settings search (as in `SearchableSetting`) intentionally remain untranslated/English for consistency with other panes.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: gsxdsm
Repo: stablyai/orca PR: 5501
File: src/renderer/src/components/right-sidebar/checks-panel-content.tsx:1504-1504
Timestamp: 2026-06-16T15:35:16.815Z
Learning: In the stablyai/orca renderer codebase, Tailwind classes using the custom variant `can-hover` (e.g., `can-hover:opacity-0`) are intentionally treated as self-documenting, with the hover/pointer-only rationale defined once at `src/renderer/src/assets/main.css` via `custom-variant can-hover (media (hover: hover))`. When reviewing `.ts/.tsx` files, do not flag usage sites for missing inline “why” comments or duplicated rationale—assume the variant name and its central definition provide sufficient context.

@brennanb2025 brennanb2025 self-assigned this Jun 18, 2026
@Viperwow

Viperwow commented Jul 2, 2026

Copy link
Copy Markdown

Waiting for it for 2 weeks :) Please, @Ptah-CT, check PR comments.

@Viperwow

Viperwow commented Jul 6, 2026

Copy link
Copy Markdown

@brennanb2025 Please check. It unblocks the good pile of functionality for automation.

@oliver-mee

Copy link
Copy Markdown
Contributor

This receiver would unblock my exact setup, so some real-world demand to report.

I run a small agent fleet with a Notion database as the shared task board (Status and Agent properties, connection webhooks on row changes). Today the chain is Notion webhook, a hand-rolled router daemon, then orca orchestration worker-start per assignment. I rebuilt the last two hops by hand only because automations cannot be woken by an event yet. With a webhook trigger per automation, the Notion event could POST straight to the run and the precheck query picks up the row. The localhost default plus per-trigger secrets works fine for me, I front it with a tunnel.

@Ptah-CT the branch is conflicting with main right now, and the last activity was in July. Happy to help rebase and test the receiver on a Linux/systemd runtime as a second pair of hands if you want it moved along, just say the word.

@oliver-mee

oliver-mee commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

I checked the receiver-to-dispatch boundary at fe3300214df. There is a case worth covering before rebasing: AutomationService.requestDispatch() can return a run with status: 'skipped_unavailable' when no live renderer or headless dispatcher can launch it. WebhookServer.handleRequest() discards that returned run and responds with HTTP 202 anyway. Closing the desktop window after listener startup can therefore leave a sender seeing acceptance while the run was already skipped.

Deferring listener startup until initial renderer readiness would not cover that later window-closed state. The admission result needs to cross the service/HTTP boundary: return a retryable non-success response when dispatch was refused, reserving 202 for an admitted run. A receiver regression should return skipped_unavailable from the dispatch dependency and verify the response is not 202; separately cover an admitted run and a closed-window transition.

I also ran the exact fe3300214df receiver source and its helper modules in isolation with a real loopback HTTP request. With the dispatch dependency returning { status: 'skipped_unavailable' }, the observed response was HTTP 202. This verifies the HTTP/service-result boundary with an injected service result, not the full desktop window-closed flow. I would still prefer to help refresh and test this existing PR rather than publish a competing receiver.

@oliver-mee

Copy link
Copy Markdown
Contributor

I carried this implementation onto current main in draft #31121, keeping Ptah-CT's original commit in the history. The refresh uses main's durable run writer and current dispatch lanes, and fixes the 202-on-refused-dispatch case discussed above.

391 focused tests, Node/renderer typechecks and scoped lint pass. Rebuilt Electron acceptance also verifies enabling, rebinding and disabling the real receiver through settings. The draft still needs UI proof and does not claim the broader HTTPS/idempotency requirements in #12400. Happy to fold the refresh back here if that is preferable.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants