Skip to content

fix(tasks): the execution error's reader phrases are matched case-sensitively, so the portal loses its 504/429 on mixed-case text #4352

Closed

Description

@vybe

Follow-up from the #4340 merge-train validation (#4284).

task_execution_service._exception_words keeps a reader phrase only when it appears in exact lowercase (phrase in text, _READER_PHRASES = ("timed out", "at capacity")). The readers do not all match the same way:

  • chat_execution_service._map_task_failure, public_chat_service, mcp_auth_service match case-sensitively
  • client_portal/service.py (~L3514/L3519) lowercases first (err = (result.error or "").lower())

So an unforeseen exception whose text says e.g. Lock Timed Out or Agent At Capacity used to give the portal its 504 / 429 and now falls through, while /task behaves as before. Narrow edge case; no known exception emits mixed case today.

Separately, scheduler/service.py (~L1649) chose a longer retry delay on 429 / rate limit / too many requests in the error text; an unforeseen exception carrying those words no longer passes them on (low impact — decide whether to add them to _READER_PHRASES or accept it).

Acceptance criteria

  • _exception_words finds each phrase case-insensitively and emits it in the case the exception used, so every reader answers the status it gave the original text
  • test_4284_exception_text_sites.py gains a portal-reader case (mixed-case "Timed Out" → 504) beside the _map_task_failure parametrization
  • Decide and record the scheduler 429 / rate-limit phrases

Activity

  1. added
    priority-p3
    type-bug
    complexity-low
    on Nov 7, 2026
  2. added
    status-in-dev
    on Nov 11, 2026
  3. removed
    status-in-dev
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

complexity-lowpriority-p3type-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions