Repository navigation
fix(router): suppress persistent target failures under sparse traffic - #20
Merged
Merged
Conversation
Track consecutive operational failures by provider/model/auth identity across idle gaps, preserve longer reason deadlines, and admit one recovery probe with capped 2m/5m/30m/2h escalation. A successful sibling no longer resets the failing target. Preserve abort, signature, auth/input and partial-output behavior. Reuse the previously validated eight-file issue #17 patch unchanged. Add a read-only PR CI validate job on Node24 for locked install, typecheck and tests; pin official checkout/setup-node actions and disable persisted credentials. Validation: targeted 28 circuit/operational regression tests passed; reviewed CI proposal YAML/scope and mutation guard passed; exact explicit staged paths reviewed. Postcommit project checks, independent exact-source review and remote CI are required before delivery completion. Task: task-issue17-draft-pr-delivery-20261016 (T1). Limits: in-memory health state and message classification; no live Mistral quota or paid-provider test, hosted preview, merge or deployment.
danialranjha
marked this pull request as ready for review
October 16, 2026 18:08
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.
Fixes #17.
A target returning 429 once every few minutes never accumulated three failures inside the old one-minute circuit window. A successful sibling model also reset the shared provider counter, so the failing target kept returning to rotation.
Track consecutive operational failures by provider, model and configured auth identity across idle gaps and routes. After three failures, apply capped 2m → 5m → 30m → 2h cooldowns, preserve longer reason-based deadlines, and admit one on-demand recovery probe. Success resets that target's history; sibling successes do not. Blocked targets are excluded from the healthy list.
The implementation keeps current
main's routing-scope lifecycle guards while admitting attempts through the per-target cooldown/probe permit. The issue's separate excluded-provider candidate-trace note remains deferred.Review and validation
df4c66da7d42978096e91ba529fe3f65cf5b50b4.npm run check: passed.npm test: 553 passed, 0 failed.validatepassed: https://github.com/danialranjha/pi-auto-router/actions/runs/40322918081.Merge-safety verdict
Safe to merge. Residual risks are non-blocking: concurrent failures already in flight may escalate cooldown faster than the README's recovery-probe wording suggests; operational classification remains message-based; live paid-provider/zero-limit behavior was not exercised.
Visual review artifact
The self-contained HTML review is prepared as
show-me-pr20-review.html. Orca public artifact sharing is disabled on the coordinator device, so a public artifact URL could not be minted; enable Settings → Artifacts → “Allow publishing public artifact links” to publish it.Hosted preview QA is not applicable: this is a Pi CLI/router extension with no hosted application or preview deployment.