fix(approval): show human gateway approval reasons - #34629
Open
viggomeesters wants to merge 5 commits into
Open
Conversation
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for addressing an approval prompt that currently exposes terse detector labels.
Problems
- Current
mainnow constructs gateway approval text through the combined guard attools/approval.py:2790-2825; the patch predates that route. A salvage needs to expand the presentation description there while retaining the stable approvalpattern_key. - The patch hard-codes Dutch strings in
tools/approval.pyandgateway/platforms/telegram.py, while language selection is configured throughagent/i18n.py:212-252. This would change the default English prompt regardless ofdisplay.language. - The approval fix is bundled with 68 changed files / +3,835 lines, including
.go-workflow/runtime/go_workflow/__main__.py:1-1407, which is unrelated to this behavior.
Suggested changes
- Keep only the focused approval change; exclude the workflow files and unrelated ignore rules.
- Port reason formatting to the current combined gateway path and add an end-to-end gateway-payload test.
- Use English defaults or
agent.i18n.t()for localized static UI text.
Automated hermes-sweeper review.
| return (False, None, None) | ||
|
|
||
|
|
||
| def format_approval_description(command: str, description: str | None) -> str: |
Contributor
There was a problem hiding this comment.
These hard-coded Dutch strings are used beyond Telegram, but current language selection is centralized in agent/i18n.py. Please keep the default English or add translation keys and render through t() so display.language remains authoritative.
| @@ -0,0 +1,1407 @@ | |||
|
|
|||
Contributor
There was a problem hiding this comment.
This 1,407-line workflow runtime is unrelated to the approval-reason fix. Please remove it from this PR so the approval change can be reviewed and salvaged independently.
This was referenced Aug 1, 2026
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
Test plan