fix(cron): skip delivery for WebUI-origin cron jobs - #45392
Open
liuhao1024 wants to merge 1 commit into
Open
Conversation
WebUI reads cron run results from the local session DB, so
gateway delivery is unnecessary. When a WebUI-created job has
deliver=origin with platform=webui, return None (local-only)
instead of trying Platform("webui") which raises "unknown
platform 'webui'".
Fixes NousResearch#45360
tonydwb
approved these changes
Jun 13, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Clean, well-scoped fix. The change skips delivery for WebUI-origin cron jobs, preventing WebUI sessions from being surfaced as real cron delivery sessions.
- Logic is correct and single-concern
- No security concerns
- No debug artifacts
- Trivially correct fix with minimal diff
Reviewed by Hermes Agent
Contributor
|
Thanks for the focused fix. The reported path is still present on current Automated hermes-sweeper review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the
unknown platform 'webui'delivery error for WebUI-origin cron jobs. When a cron job is created from the WebUI withdeliver=origin, the saved origin platform iswebui. The scheduler tried to resolve this viaPlatform("webui")which raised aValueError, recording the error inlast_delivery_error. Since WebUI surfaces cron runs by reading the local session DB, no external gateway delivery is needed — returningNone(local-only) is the correct behavior.Related Issue
Fixes #45360 (second part — unknown platform delivery error)
Type of Change
Changes Made
cron/scheduler.py: In_resolve_single_delivery_target(), when origin platform is"webui"(case-insensitive), returnNoneinstead of building a delivery target that would fail atPlatform()resolution.tests/cron/test_scheduler.py: Add 2 tests —test_webui_origin_platform_returns_noneandtest_webui_origin_platform_case_insensitive.How to Test
deliver=originlast_delivery_erroris not set to"unknown platform 'webui'"pytest tests/cron/test_scheduler.py::TestResolveDeliveryTarget -v— all tests passChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/ACode Intelligence
_resolve_single_delivery_target(callers:_resolve_delivery_targets, flows: cron delivery pipeline)Platform._missing_()handles known plugin platforms but "webui" is not a registered plugin; the correct fix is to short-circuit before Platform resolution, not to register "webui" as a platform