fix(fallback): restore primary route after picker errors - #76497
Conversation
|
Thanks for isolating this cleanup path. The premise is valid: current main catches only Problems
Suggested changes
Automated hermes-sweeper review. |
ff138ff to
4944099
Compare
|
Fixed in |
4944099 to
a76394a
Compare
|
Follow-up after the final route-isolation audit (head
Verification on the exact pushed head: |
a76394a to
abe676c
Compare
|
Rebased onto current Verification: |
abe676c to
a974f0c
Compare
a974f0c to
1fc87bd
Compare
Summary
hermes fallback addreuses the canonical model picker, which temporarily writes the selected route as the primary model/provider before appending it to the fallback chain.The old cleanup path restored only part of that route and only on limited exits. Ordinary picker exceptions, post-picker config-read failures, and cleanup failures could leave the temporary route active or skip the second half of restoration.
Fix
BaseException, so an error or interrupt in one half cannot skip the other.active_providerremains absent rather than becoming persistednull.Development context
This pre-existing fallback bug was discovered while developing the CLI subagent model/reasoning picker in #76480, because that feature reuses the same canonical provider/model setup flow. It is intentionally extracted here as an independent mainline fix so the picker PR remains feature-scoped.
This does not duplicate whole-config stale-write concurrency work already tracked in #62232.
Verification
20 passed—tests/hermes_cli/test_fallback_cmd.pypy_compilepassed.git diff --checkpassed.Coordination graph
hermes_cli/fallback_cmd.pyor its focused test on the audited headshermes fallback addonlyHermes triage dashboard graph
Live dashboard neighbourhood: https://hermes-triage.gottz.de/?node=76497
flowchart LR classDef focus fill:#fef3c7,stroke:#b45309,stroke-width:3px,color:#451a03 classDef issue fill:#ede9fe,stroke:#6d28d9,color:#2e1065 classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937 P76497["PR #76497 (open)"] I85651(["issue #85651 (open)"]) P6554["PR #6554 (merged)"] P9803["PR #9803 (closed)"] P33846["PR #33846 (closed)"] P36789["PR #36789 (closed)"] P47433["PR #47433 (closed)"] P60176["PR #60176 (open)"] P62417["PR #62417 (merged)"] P65656["PR #65656 (merged)"] P66400["PR #66400 (open)"] P71533["PR #71533 (open)"] P77631["PR #77631 (merged)"] P76497 -->|closes| I85651 P76497 -->|related| I85651 P60176 -.->|duplicate of 0.71| P76497 P65656 -.->|duplicate of 0.71| P76497 P71533 -.->|duplicate of 0.71| P76497 P9803 -.->|duplicate of 0.71| P76497 P62417 -.->|duplicate of 0.71| P76497 P47433 -.->|duplicate of 0.71| P76497 P66400 -.->|duplicate of 0.71| P76497 P6554 -.->|duplicate of 0.70| P76497 P36789 -.->|duplicate of 0.70| P76497 P76497 -.->|duplicate of 0.70| P77631 P33846 -.->|duplicate of 0.70| P76497 class P76497 focus click P76497 "https://github.com/NousResearch/hermes-agent/pull/76497" class I85651 issue click I85651 "https://github.com/NousResearch/hermes-agent/issues/85651" class P6554 merged click P6554 "https://github.com/NousResearch/hermes-agent/pull/6554" class P9803 closed click P9803 "https://github.com/NousResearch/hermes-agent/pull/9803" class P33846 closed click P33846 "https://github.com/NousResearch/hermes-agent/pull/33846" class P36789 closed click P36789 "https://github.com/NousResearch/hermes-agent/pull/36789" class P47433 closed click P47433 "https://github.com/NousResearch/hermes-agent/pull/47433" class P60176 open click P60176 "https://github.com/NousResearch/hermes-agent/pull/60176" class P62417 merged click P62417 "https://github.com/NousResearch/hermes-agent/pull/62417" class P65656 merged click P65656 "https://github.com/NousResearch/hermes-agent/pull/65656" class P66400 open click P66400 "https://github.com/NousResearch/hermes-agent/pull/66400" class P71533 open click P71533 "https://github.com/NousResearch/hermes-agent/pull/71533" class P77631 merged click P77631 "https://github.com/NousResearch/hermes-agent/pull/77631"Dashboard interpretation:
closes/related);0.88and file overlap0.75;duplicate ofedge below the fold threshold is a similarity lead for review, not an accepted duplicate or merge-order edge;This graph is additive to the hand-audited coordination block above: the dashboard supplies discovery neighbourhoods, while the declared dependency, collision, ownership, and merge-order edges remain the reviewed coordination contract.