Repository navigation
fix: Hermes cron jobs with deliver: yui reach her wherever they were made - #2194
Merged
Merged
Conversation
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.
Summary
The YUI platform plugin now registers
cron_deliver_env_var="YUI_HOME_CHANNEL"with Hermes, so Hermes treatsyuias a cron delivery platform.Before, Hermes resolved a
deliver: yuijob made outside a YUI chat to no target, and its preflight (cron/scheduler_preflight.py:351) blocked everydeliver: yuijob as "not a known cron delivery target". WhyYUI_HOME_CHANNEL: it is the name Hermes already derives for the platform (gateway/run.py:1532-1541,f"{NAME}_HOME_CHANNEL"), so/sethomeand profile cloning see no change.Behaviour for existing users (measured on Hermes v0.23.2 by the reviewer with a throwaway
HERMES_HOME):deliver: yui: reaches her from any surface; preflight passes.deliver: all: now includes her when a home channel exists.deliver: originwith no origin: may fall back to her, after the 16 built-in home-target platforms and other plugin platforms.deliver: originfor a job made inside a YUI chat: unchanged (resolves to the origin before any home lookup).yuias a delivery target.Related issues
Closes #2187
Part of #2188
Related decisions / docs
integrations/hermes/platform/yui/docs/behaviour.md: the home-channel bullet statesdeliver: yui,deliver: all, and the variable's cron-only override.integrations/hermes/platform/yui/docs/map.js: theregister-platformedge carries the new field.Runtime evidence (required for UI / DOM / runtime behavior)
Red test:
bash scripts/red-run.sh d0c910b4→red test_the_platform_registers_a_cron_home_channel_so_deliver_yui_reaches_her … AssertionError: assert None == 'YUI_HOME_CHANNEL'.Hermes resolution with this branch's plugin registered through its own
register(ctx)(installed Hermes Agent v0.23.2, commit ae2a81ccc00, throwawayHERMES_HOME, home channel written bypersist_home_channel, no env var):On
mainthe same two jobs resolve to[](issue #2187, table under "Actual behavior").A cron result sent while the client is away goes through
send→_deliver→_send_render, which holds it until the client connects (src/transport/adapter.py:615-623). A live gateway run with a connected client was not made for this PR.Merge danger
Door: two-way (a revert removes the field; no stored key or contract changes).
Blast radius: Hermes cron delivery to the yui platform only;
deliver: alljobs start speaking through her.Verification
pnpm buildpasses (includes tsc typecheck)pnpm testpassespnpm lintpasses (biome format + lint)cargo test/cargo clippypass (Rust changes) — no Rust change; gates skipped themuv run pytestinintegrations/hermes/platform/yui: 389 passedChecklist (YUI principles)
docs/reference/client-context.mdalongside the code — no schema changedocs/agent-guide/architecture/map.jscarries every module, part, and exchange this PR adds, removes, or changes (or none changed) — app map unchanged; the plugin map edge updatedgenerate_expresstool-call argumentsconfigs/skip-testslabel justified)Review: one independent reviewer (single tier). Its five checks passed; two wording findings were applied (cron-only override,
deliver: all). Rejected: "the adapter drops the cron result when no client is connected" —_send_framedrops only frames sent directly (tool_status); a cron result goes through_send_render, which holds it (src/transport/adapter.py:615-623).