fix(oneshot): hermes -z returns empty stdout; fix(cron): whatsapp delivery silently dropped - #23067
Closed
Bartok9 wants to merge 1 commit into
Closed
fix(oneshot): hermes -z returns empty stdout; fix(cron): whatsapp delivery silently dropped#23067Bartok9 wants to merge 1 commit into
Bartok9 wants to merge 1 commit into
Conversation
…ivery silently dropped Fix NousResearch#22975 — hermes -z empty stdout: When stream_delta_callback is None and no other stream consumers are registered, _use_streaming stays True. The API response is emitted as stream deltas into the void and chat() returns ''. Fix: set _disable_streaming=True in _run_agent() before calling chat() so the non-streaming path is used and the full response is returned. Fix NousResearch#22997 — cron silently drops deliver: whatsapp: 'whatsapp' was absent from _HOME_TARGET_ENV_VARS so _resolve_home_env_var('whatsapp') returned '' and _resolve_delivery_targets() returned []. The caller treats an empty list as a no-op — no message sent, no error logged. Fix: add 'whatsapp': 'WHATSAPP_HOME_CHANNEL' to _HOME_TARGET_ENV_VARS. Also: - Add lowercase bartok9 noreply email to AUTHOR_MAP (fixes check-attribution) - Add windows-footgun: ok suppression on process_registry.py:588
Collaborator
Contributor
Author
|
Closing in favor of competing PRs that arrived first or have deeper fixes:
Left review comments on both. Happy to contribute tests or additional coverage if useful. |
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.
Fixes #22975 and #22997.
fix(oneshot): hermes -z returns empty stdout (#22975)
Root cause: In
_run_agent(),agent.stream_delta_callback = Nonesuppresses token callbacks but_has_stream_consumers()returnsFalse— so_use_streamingstaysTrue. The response is emitted as stream deltas into the void;chat()returns"".Fix: Set
agent._disable_streaming = Truebefore callingchat(). This forces the non-streaming path which returns the full response object directly.Test:
test_oneshot_disables_streaming_to_prevent_empty_stdout— asserts_disable_streamingisTruewhenchat()is invoked.fix(cron): whatsapp delivery silently dropped (#22997)
Root cause:
'whatsapp'was absent from_HOME_TARGET_ENV_VARSincron/scheduler.py._resolve_home_env_var('whatsapp')returned'',_resolve_delivery_targets()returned[], and the job was silently marked successful with no message sent.Fix: One-line addition:
'whatsapp': 'WHATSAPP_HOME_CHANNEL'in_HOME_TARGET_ENV_VARS.Test:
test_whatsapp_deliver_resolves_home_channel— verifies the resolver returns a valid target whenWHATSAPP_HOME_CHANNELis set.