Repository navigation
perf(server): skip periodic checks for disabled providers - #18851
juliusmarminge merged 6 commits into
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 13 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This PR changes production behavior by suppressing periodic provider status checks for disabled providers, while preserving manual and settings-triggered refreshes. The change is localized and tested, but it gates recurring runtime work based on provider state and merits human review. You can add or adjust custom eligibility rules. Learn more. |
…tream pingdotgg#18851) Own diff of pingdotgg#18851 at 4c27e20, applied on stark/main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Taking over this one. I'll trim the tests to the useful coverage, rebuild the implementation against current main, run independent reviews, and verify it before pushing to this branch. |
…-provider-health-skip
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Problem
Every provider instance runs a periodic health check while any client wants provider status, and disabled instances were included. With one provider enabled and the rest disabled, each cycle re-probed every disabled instance and pushed a provider-status catalog that differed only in
checkedAt. The original measurement on an idle web client was a 37,360-byte disabled-onlyproviderStatusespush every 300 s.Change
hasProviderStatusDemandinpackages/provider-core/src/server/managedProvider.tsreturnsfalsefor a disabled snapshot, so the interval loop skips the probe and the publication. That function is only consulted by the interval loop. Manual refresh of a disabled provider still probes, enabling a provider still checks it immediately, and periodic checks resume once the snapshot is enabled. Provider configuration changes rebuild the managed instance, so the gate always reads the current enabled state.Tests
The original two-case parametrized scenario (generic vs. instance demand) collapsed into one test in
managedProvider.test.ts, "skips periodic checks while disabled and resumes them once enabled". The two demand shapes exercised the same early return. The test drives the real publication stream withTestClock: two 5-minute intervals while disabled produce no probe and no publication, manual refresh probes, enabling through settings probes immediately, and the next interval probes again. It fails onmain(3 probes instead of 1) and passes here. The file's test count went from 12 onmainto 13.Verification
Headless Linux, Node 24.
vp test run src/server/managedProvider.test.tsinpackages/provider-core: 13 passed.vp lint,vp fmt --check, andprovider-coretypecheck: clean.checkedAtand found nothing that relies on periodic updates for disabled providers.Independent read-only reviews by Claude Opus 5.5 and GPT-6-Sol found no blockers.
Takes over #18851 by @saphid, whose measurement and gate this keeps. Implementation: Claude Fable 5.1 through Claude Code in T3 Code.