feat(gateway): make busy acknowledgement messages configurable (closes #26024) - #26150
feat(gateway): make busy acknowledgement messages configurable (closes #26024)#26150Bartok9 wants to merge 3 commits into
Conversation
6343e8b to
97cbc10
Compare
97cbc10 to
bcca5ed
Compare
austinpickett
left a comment
There was a problem hiding this comment.
Please use .github/PULL_REQUEST_TEMPLATE.md
There was a problem hiding this comment.
Pull request overview
Adds operator-configurable templates for the gateway's busy-input acknowledgement messages (interrupt / queue / steer) under display.busy_ack_templates, while preserving the existing strings as defaults.
Changes:
- New
tools/busy_ack_templates.pyhelper withDEFAULT_TEMPLATES,resolve_busy_ack_template,render_busy_ack, and JSON env-var bridge (encode_templates_for_env/load_templates_from_env). gateway/run.pybridgesdisplay.busy_ack_templates→HERMES_GATEWAY_BUSY_ACK_TEMPLATESenv var at bootstrap and callsrender_busy_ack(...)in_handle_active_session_busy_message, with a literal-string fallback in theexceptbranch and an empty-template suppression check.hermes_cli/config.pyaddsbusy_ack_templates: {}to the defaultdisplaysection so schema introspection picks it up.- New
tests/tools/test_busy_ack_templates.py(22 tests) covering defaults, resolver edge cases, render path, and env-var roundtrip.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/busy_ack_templates.py | New stdlib helper exposing defaults, resolver, renderer, and env-var bridge. |
| tests/tools/test_busy_ack_templates.py | Unit tests for defaults, resolver, renderer, and env roundtrip. |
| gateway/run.py | Bridges templates into env at bootstrap; renders ack via helper with literal fallback and empty-template suppression. |
| hermes_cli/config.py | Adds empty busy_ack_templates default to display config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Closing to stay within contributor PR limit. Will resubmit with fresh rebase if the issue remains open in main. |
|
Hi @austinpickett — thanks for the review. The PR body has been updated to use the .github/PULL_REQUEST_TEMPLATE.md format (What does this PR do / Related Issue / Type of Change / Changes Made / How to Test / Checklist). CI is also failing — looks like pre-existing baseline failures on the test + e2e jobs that I need to investigate against current main. I'll rebase shortly and push fresh. Ready for re-review when you have time. 🙏 |
a47e073 to
3692d06
Compare
3692d06 to
b83018c
Compare
|
Rebased onto current @austinpickett — re: "Please use .github/PULL_REQUEST_TEMPLATE.md": the PR description now follows the template (What does this PR do / Related Issue / Type of Change / Changes Made / How to Test / Checklist). Also made the Rebase conflict & resolution:
Verification:
Ready for re-review when you have a moment. 🙏 |
|
Thanks @austinpickett — the PR description now follows |
|
Ready for re-review This PR is complete and template-compliant. It adds the three configurable busy-acknowledgement strings exactly as requested in #26024, with 22 new tests and zero behavior change for operators who don't opt in. The stale Thanks! — Bartok9 |
|
Thanks @austinpickett — addressed. The PR body now follows Quick summary of the change itself: operator-configurable templates for the gateway's busy-input ack messages (interrupt / queue / steer) under Would you mind re-reviewing when you have a moment? Happy to adjust anything else. 🙏 |
|
Re-confirmation (maintenance pass, 2026-06-23): still valid and clean against current
Defaults match the pre-existing strings, so unconfigured deployments are unchanged. Ready for review whenever a maintainer has a slot. 🙏 |
|
Maintenance re-confirmation (2026-07-03): still valid, MERGEABLE, and all CI green against current Traced current The only thing gating merge is @austinpickett's stale |
b83018c to
002a8de
Compare
|
Rebased onto current Verified the feature is still absent on main (issue #26024 remains open, only auto-linked to this PR — not superseded) and the hardcoded interrupt/queue/steer ack strings are still live in |
|
Refresh (2026-07-13): rebased onto current |
002a8de to
a68773e
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused configuration feature and preservation of the existing defaults.
Problems
gateway/run.py:5651renders operator-controlled text, but busy acks still route throughBasePlatformAdapter._send_with_retry()→send()(gateway/platforms/base.py:4091-4096). LINE bypasses its pending postback cache only for the hardcoded prefixes inplugins/platforms/line/adapter.py:603-614. Therefore a localized or emoji-free template—the stated purpose of #26024—can be cached instead of displayed on LINE.tests/tools/test_busy_ack_templates.pycovers the helper only; it does not cover that gateway-to-LINE delivery path.
Suggested changes
- Carry a structured busy-ack marker through delivery metadata and have LINE use it instead of matching operator-controlled text.
- Add a pending-postback integration test using a prefix-free/localized template and assert visible delivery.
This is an automated hermes-sweeper review.
| render_busy_ack as _render_busy_ack, | ||
| ) | ||
| _busy_templates = _load_busy_templates() | ||
| message = _render_busy_ack( |
There was a problem hiding this comment.
This allows a configured acknowledgement with no ⚡ Interrupting / ⏳ Queued / ⏩ Steered prefix. LINE detects busy acks solely by those prefixes (plugins/platforms/line/adapter.py:603-614) before bypassing its pending postback cache, so the localized/no-emoji templates requested by this feature can be swallowed. Please carry a structured busy-ack delivery marker instead of relying on rendered copy, and add a LINE pending-cache regression test.
|
Thanks @teknium1 / hermes-sweeper — good catch, addressed in 0d8c830. Root cause: busy-ack templates route through Fix (structured marker, not string matching):
|
|
Fixed red CI (slice 2/8). The failure was |
fcd094a to
acb5f40
Compare
|
Rebased onto current
Conflict resolution: Local: |
Implements NousResearch#26024 — let operators override the three busy-input acknowledgement messages (interrupt / queue / steer) via config.yaml so persona / brand-voice / i18n / quiet-mode deployments stop relying on local source patches that break across upgrades. Defaults match the strings that shipped before this feature, so deployments that don't opt in see zero behaviour change. Adds: * tools/busy_ack_templates.py (new, stdlib-only helper) * gateway/run.py config bridge + render call * hermes_cli/config.py default entry * tests/tools/test_busy_ack_templates.py (22 tests) Closes NousResearch#26024
… surface The hermes-sweeper review on NousResearch#26150 noted that busy-ack templates (now operator-configurable per NousResearch#26024) route through the LINE adapter's send() path, which only bypasses its pending-postback cache for the hardcoded _SYSTEM_BYPASS_PREFIXES. A localized or emoji-free template would therefore be cached instead of displayed on LINE. - gateway/run.py: tag the busy-ack send with a structured busy_ack=True delivery marker in metadata. - plugins/platforms/line/adapter.py: bypass the postback cache when the busy_ack marker is present, keeping the prefix check as a fallback. - Add an integration test covering the gateway-to-LINE delivery path with a prefix-free/localized template and asserting visible delivery.
…etadata The configurable busy-ack change tags busy acknowledgements with a structured busy_ack=True metadata marker (gateway/run.py) so platform adapters can bypass response-caching without string-matching operator templates. Update the exact-equality assertion in test_gateway_runner_busy_ack_replies_to_triggering_message_for_telegram_dm_topic to expect this marker (NousResearch#26024).
acb5f40 to
93940dd
Compare
|
Re-based cleanly onto current py_compile OK; 54/54 tests pass ( |
What does this PR do?
Adds operator-configurable templates for the gateway's busy-input acknowledgement messages (interrupt / queue / steer) under
display.busy_ack_templates. When an active session is busy and a new message arrives, operators can now customise the three ack strings instead of being stuck with the hardcoded defaults. Empty-string templates suppress the ack entirely (useful for silent agents).Related Issue
Fixes #26024
Type of Change
Changes Made
tools/busy_ack_templates.py— new stdlib helper:DEFAULT_TEMPLATES,resolve_busy_ack_template,render_busy_ack, and JSON env-var bridge (encode_templates_for_env/load_templates_from_env)gateway/run.py— bridgesdisplay.busy_ack_templates→HERMES_GATEWAY_BUSY_ACK_TEMPLATESenv var at bootstrap; callsrender_busy_ack()in_handle_active_session_busy_messagewith a literal-string fallback inexceptand empty-template suppressionhermes_cli/config.py— addsbusy_ack_templates: {}to the defaultdisplaysection so schema introspection picks it uptests/tools/test_busy_ack_templates.py— 22 tests covering defaults, resolver edge cases, render path, and env-var roundtripHow to Test
~/.hermes/config.yaml:pytest tests/tools/test_busy_ack_templates.py -v— all 22 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/AScreenshots / Logs