Repository navigation
fix: Forward actual error messages to Slack users, remove unused TaskExecutionErrorCode (#221) - #229
Merged
Merged
Conversation
added 2 commits
March 30, 2026 16:57
…sages (#221) The channel message router passed timeout_seconds=_get_channel_timeout() (default 120s), overriding the agent's configured execution_timeout_seconds. All other callers pass None and let TaskExecutionService read the per-agent timeout (TIMEOUT-001). - Pass timeout_seconds=None to match standard pattern - Forward actual error messages to Slack users instead of generic text - Generic fallback only for empty/unknown errors - 11 unit tests covering error message routing and timeout parameter Fixes #221
pavshulin
force-pushed
the
feature/221-slack-timeout-fix
branch
from
March 30, 2026 15:58
d0c5571 to
ddec0a1
Compare
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.
Context
PR #225 (merged) fixed two things:
timeout_seconds=_get_channel_timeout()(hardcoded 120s) totimeout_seconds=None— letsTaskExecutionServiceuse the agent's configured timeout (TIMEOUT-001). This is already in main.TaskExecutionErrorCodeenum for machine-readable error matching.Testing revealed that the timeout error originates from the agent container via HTTP response (caught by
except httpx.HTTPError), not fromhttpx.TimeoutException— soerror_codewas alwaysNoneat runtime. The enum approach doesn't work for this case.This PR (follow-up cleanup to #225)
Removes the non-functional
TaskExecutionErrorCodeand simplifies error handling:message_router.py
error_msgfrom the agent to the Slack usertimeout_seconds=Noneis already in main from fix: Slack message router uses per-agent timeout + forwards error messages (#221) #225 — not in this difftask_execution_service.py
TaskExecutionErrorCodeenum (6 values, only TIMEOUT was assigned, never reached at runtime)error_codefield fromTaskExecutionResultfrom enum import EnumimportTests
test_task_execution_error_code.py(237 lines testing the removed enum)test_slack_timeout_fix.py(11 tests for the simplified error message logic + timeout parameter contract)On raw error messages to Slack users
This is intentional. The previous hardcoded messages ("Sorry, I encountered an error") gave users zero information about what went wrong. The actual error from the agent (e.g. "Task execution timed out after 900 seconds", "Agent at capacity") is more useful. These are the same messages shown in the Trinity UI execution logs.
Test plan
tests/unit/test_slack_timeout_fix.py)timeout_seconds=Nonecontract verified (already in main from fix: Slack message router uses per-agent timeout + forwards error messages (#221) #225)Fixes #221