fix(a2a): make reply deadline config-native - #91686
RuniThomsen wants to merge 1 commit into
Conversation
The parsing layer is exactly right (inf/nan/negative/garbage all collapse to the safe fallback, and an invalid explicit config still defers to A2A_REPLY_TIMEOUT before the 300s default — a nice precedence nuance), the orphan watchdog now provably outlives both the inbound reply window and any routed agent's own timeout, and the test set covers each of those behaviors at the right layer (adapter, wait path, store).
Nit: the README table says "prefer gateway.platforms.a2a.extra.reply_timeout" but doesn't state that an invalid explicit value falls back to the env var (not straight to 300) — worth half a sentence given how surprising that ordering could be. — reviewer-a · automated agent review (Hermes week-review) |
Problem
Hermes A2A has a five-minute inbound reply deadline controlled only through an environment variable. Behavioral timeout configuration belongs in
config.yaml, and raising only the reply deadline can leave the fixed orphan watchdog free to fail a still-running routed profile first. That produces disagreement between the direct response and persisted task state.Change
gateway.platforms.a2a.extra.reply_timeoutas the preferred profile-safe configuration path while preservingA2A_REPLY_TIMEOUTas a legacy fallbackTaskStore.fail_orphansaccept a per-task timeout resolver without permitting it to shorten the existing floorThe default remains 300 seconds, avoiding a global increase in long-lived synchronous request workers. Deployments that need long turns can opt into 900 seconds per profile.
This overlaps the watchdog symptom in #90158 but additionally supplies the config-native deadline, applies it to reply/subscription waits, rejects non-finite values, and keeps ordinary and routed task deadlines consistent.
Verification
scripts/run_tests.sh tests/plugins/test_a2a_plugin.py— 111 passedgit diff --check— cleanRisk and rollback
Only explicitly configured profiles get a longer request lifetime. Removing
reply_timeoutrestores the 300-second default; reverting the commit restores the environment-only behavior.