hermes - ✅(Solved) Fix Bug: cron scheduler accepts webhook delivery targets but later rejects them as unknown [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#13707Fetched 2026-04-22 08:04:34
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

cron.scheduler treats webhook as a valid delivery platform during target resolution, but _deliver_result() later rejects the same target as unknown platform 'webhook'. This means a configured deliver="webhook:..." target can pass earlier validation but can never actually deliver.

Root Cause

cron.scheduler treats webhook as a valid delivery platform during target resolution, but _deliver_result() later rejects the same target as unknown platform 'webhook'. This means a configured deliver="webhook:..." target can pass earlier validation but can never actually deliver.

Fix Action

Fixed

PR fix notes

PR #13730: fix(cron): drop webhook from _KNOWN_DELIVERY_PLATFORMS schema mismatch

Description (problem / solution / changelog)

Summary

Fixes #13707. cron.scheduler._KNOWN_DELIVERY_PLATFORMS advertises webhook as a valid cron delivery target, but the actual _deliver_result() platform_map has no Platform.WEBHOOK entry — so a configured deliver=\"webhook:...\" target passes earlier validation and then fails at delivery time with unknown platform 'webhook'.

Webhook is inbound-only in this codebase (gateway/run.py:742 explicitly filters Platform.WEBHOOK out of messaging platforms), so the correct fix is to stop advertising it as a delivery target rather than wire up a send path that doesn't exist.

Fix

  • Drop \"webhook\" from _KNOWN_DELIVERY_PLATFORMS
  • Add code-comment pinning this set to the platform_map inside _deliver_result
  • Add regression test asserting webhook is not in the allowlist

Test

54 tests in tests/cron/test_scheduler.py pass locally. Regression test fails without the fix (asserts the invariant directly).

Closes #13707.

Changed files

  • cron/scheduler.py (modified, +4/-1)
  • tests/cron/test_scheduler.py (modified, +12/-0)

Code Example

import os
import pathlib
import tempfile
from cron.scheduler import _deliver_result

with tempfile.TemporaryDirectory() as td:
    os.environ["HERMES_HOME"] = td
    pathlib.Path(td, "config.yaml").write_text("platforms:\n  webhook:\n    enabled: true\n")
    job = {"id": "j1", "deliver": "webhook:any-target"}
    print(_deliver_result(job, "hello"))

---

unknown platform 'webhook'
RAW_BUFFERClick to expand / collapse

Summary

cron.scheduler treats webhook as a valid delivery platform during target resolution, but _deliver_result() later rejects the same target as unknown platform 'webhook'. This means a configured deliver="webhook:..." target can pass earlier validation but can never actually deliver.

Affected code

  • cron/scheduler.py:44-48_KNOWN_DELIVERY_PLATFORMS includes "webhook"
  • cron/scheduler.py:148-158 — resolver accepts platform names in that allowlist
  • cron/scheduler.py:240-258platform_map omits webhook
  • cron/scheduler.py:258-262 — returns unknown platform 'webhook'

Why this is a bug

The same module advertises and resolves webhook as a supported delivery platform, but the actual delivery implementation cannot map it to Platform.WEBHOOK. That is an internal schema mismatch, not just a missing optional feature.

Minimal reproduction

import os
import pathlib
import tempfile
from cron.scheduler import _deliver_result

with tempfile.TemporaryDirectory() as td:
    os.environ["HERMES_HOME"] = td
    pathlib.Path(td, "config.yaml").write_text("platforms:\n  webhook:\n    enabled: true\n")
    job = {"id": "j1", "deliver": "webhook:any-target"}
    print(_deliver_result(job, "hello"))

Actual output:

unknown platform 'webhook'

Expected behavior

  • If webhook is in _KNOWN_DELIVERY_PLATFORMS, _deliver_result() should map it and attempt delivery.
  • Otherwise the resolver/allowlist should reject webhook earlier instead of accepting an impossible target.

Actual behavior

  • The job is accepted as a webhook target, then later fails with unknown platform 'webhook'.

Suggested investigation

Add webhook to the platform_map (if delivery is supposed to work) or remove it from _KNOWN_DELIVERY_PLATFORMS / target resolution until a delivery path exists. Add a focused regression test for deliver="webhook:any-target".

extent analysis

TL;DR

The most likely fix is to add webhook to the platform_map in cron/scheduler.py to resolve the internal schema mismatch.

Guidance

  • Review the platform_map in cron/scheduler.py:240-258 and add a mapping for webhook to Platform.WEBHOOK if delivery is intended to work.
  • Verify that the deliver="webhook:any-target" target is correctly resolved and delivered after updating the platform_map.
  • Consider removing webhook from _KNOWN_DELIVERY_PLATFORMS if delivery is not currently supported to prevent false positives during target resolution.
  • Add a regression test for deliver="webhook:any-target" to ensure the fix is stable and catch any future regressions.

Example

# cron/scheduler.py:240-258
platform_map = {
    # ... existing mappings ...
    "webhook": Platform.WEBHOOK  # add this line
}

Notes

The provided minimal reproduction and expected behavior suggest that the issue is due to the missing mapping in platform_map. However, without further context, it's unclear why webhook is included in _KNOWN_DELIVERY_PLATFORMS but not supported in delivery.

Recommendation

Apply the workaround by adding webhook to the platform_map, as this directly addresses the internal schema mismatch and allows for delivery to work as expected.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • If webhook is in _KNOWN_DELIVERY_PLATFORMS, _deliver_result() should map it and attempt delivery.
  • Otherwise the resolver/allowlist should reject webhook earlier instead of accepting an impossible target.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Bug: cron scheduler accepts webhook delivery targets but later rejects them as unknown [1 pull requests, 1 participants]