Repository navigation
fix(reliability): honest per-agent circuit-breaker toggle in Settings (#1712) - #1717
Merged
Merged
Conversation
…#1712) The dispatch breaker is two-tier — per-agent `circuit_breaker_enabled` AND the platform-wide `DISPATCH_BREAKER_ENABLED` must both be on. The endpoint already returns `config.global_enabled` (GET) and a `warning` (PUT) when a toggle is inert (#1491/#1499). The residual #1712 gap was the UI: there was no owner-facing toggle at all — it was a growth-path TODO in SettingsPanel — and the API-level "toggle reports success while doing nothing" had no honest surface. New `ReliabilityPanel.vue` (agent Settings tab): - Reads `config.global_enabled` from the endpoint (consumes, doesn't infer), so the honest state shows on every (re)load — including a persisted-but-inert "on". - When the global flag is OFF: a clear amber notice names the REASON (the platform-wide flag is off) and the REMEDY (an admin sets `DISPATCH_BREAKER_ENABLED=true` in the environment) — it does not silently accept-and-succeed. The toggle stays operable (the owner may pre-set their preference), with a "saved · inactive" badge so the inertness is explicit. - On save while global-off, surfaces the endpoint's `warning` as the outcome, not a plain "Saved". When both flags are on, shows an "active" badge. No change to gating semantics (both flags still required; config.py untouched). Open question (global default) — decision: keep `DISPATCH_BREAKER_ENABLED=false` for this release. Flipping it to true would start engaging the breaker for any already-opted-in agent mid-freeze (a runtime behaviour change needing soak); the honest UI removes the confusion without that risk. Revisit post-freeze. Recorded on #1712. Static guards (tests/unit/test_1712_*): fail if the panel drops the global_enabled read, the warning surface, the reason/remedy copy, or its mount in SettingsPanel — the honesty can't silently regress. Verified live: GET returns `global_enabled:false` on this install; PUT enabled=true returns the inert warning, which the panel surfaces. Related to #1712
…cancels) The pytest matrix job runs ~7-8 min on a normal GitHub runner, but the shared runners vary ~2-2.5x. A slow one was sitting at ~78% of the suite (all tests passing — pure dots in the log) when it hit the 15-min `timeout-minutes` and got killed, which surfaces as a red "pytest (…) fail" + a "regression diff" fail even though the diff itself reports "No new failures". Seen repeatedly this cycle (#1700, #1712) with zero real failures. 25 min gives headroom for the slow tail without masking a genuine hang — pytest-timeout still bounds any single test. Not payload-specific; belongs on dev so every PR stops flaking on runner variance. Related to #1712
vybe
approved these changes
Jul 21, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Validated: frontend-only (ReliabilityPanel.vue + SettingsPanel.vue) — consumes config.global_enabled for an honest per-agent breaker toggle, no gating-semantics change (config.py untouched). CI timeout bump 15m→25m is justified (spurious runner-variance kills). Static guard test_1712 present. Required checks green; pytest head-seed matrix green.
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.
What
The per-agent dispatch breaker is two-tier — per-agent
circuit_breaker_enabledand the platform-wideDISPATCH_BREAKER_ENABLEDmust both be on. The endpoint already returnsconfig.global_enabled(GET) and awarning(PUT) when a toggle is inert (#1491/#1499). The residual #1712 gap was the UI: there was no owner-facing toggle at all (a growth-path TODO inSettingsPanel), so the "control that reports success and does nothing" had no honest surface.Change — new
ReliabilityPanel.vue(agent Settings tab)config.global_enabledfrom the endpoint (doesn't infer) → honest state on every load, including a persisted-but-inert "on".DISPATCH_BREAKER_ENABLED=truein the environment. The toggle stays operable (owner may pre-set the preference) with a "saved · inactive" badge — it does not silently accept-and-succeed.warningas the outcome (not a plain "Saved"). When both flags are on → "active" badge.No change to gating semantics —
config.pyuntouched, both flags still required.Open question (global default) — decided
Keep
DISPATCH_BREAKER_ENABLED=falsefor this release. Flipping it totruewould start engaging the breaker for any already-opted-in agent mid-freeze — a runtime behaviour change needing soak. The honest UI removes the confusion without that risk. Revisit post-freeze. (Recorded on #1712.)AC coverage
config.global_enabledVerified live
On this install
DISPATCH_BREAKER_ENABLEDis off →GET .../circuit-breakerreturnsconfig.global_enabled:false;PUT {enabled:true}returns the inertwarning, which the panel surfaces. Static guards (test_1712_*) fail if the panel drops theglobal_enabledread, the warning surface, the reason/remedy copy, or its mount. Both SFCs compile.Related to #1712 · #1487 · #526
🤖 Generated with Claude Code