Skip to content

fix(auto): rate-limit empty-pool AUTO warnings - #10344

Open
RaviTharuma wants to merge 1 commit into
diegosouzapw:release/v3.8.50from
RaviTharuma:fix/auto-empty-pool-log-once
Open

fix(auto): rate-limit empty-pool AUTO warnings#10344
RaviTharuma wants to merge 1 commit into
diegosouzapw:release/v3.8.50from
RaviTharuma:fix/auto-empty-pool-log-once

Conversation

@RaviTharuma

Copy link
Copy Markdown
Contributor

Summary

  • virtualFactory log.warns auto/<family> matched no connected models; returning an empty pool on every resolve.
  • Observed on 3.8.49: that line ~once per 1–2 minutes continuously when a family (e.g. a virtual auto/<family>) has zero connected models — including when nothing user-facing needs that family (suspicion: health/catalog tick).
  • Behavior unchanged (still empty pool). Warn is rate-limited to once per label per 60s.
  • Unit test for the debounce helper.

Related Issues

Validation

  • Production-code changes include a new or updated automated test in this PR
node --import tsx --test tests/unit/auto-empty-pool-warn-once.test.ts

No secrets or private hostnames.

@RaviTharuma

Copy link
Copy Markdown
Contributor Author

Implements / pairs with #10346 (rate-limit the AUTO empty-pool warn). Does not change empty-pool routing.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.50 August 14, 2026 19:27
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for this — the debounce logic itself is clean and well-tested. I cherry-picked just your virtualFactory.ts commit onto a fresh release/v3.8.50 tip: it applies with zero conflicts, tests/unit/auto-empty-pool-warn-once.test.ts passes, and eslint is clean on the touched files. No concerns with the actual fix.

One thing to fix before merge, though: the PR branch looks like it was cut from main rather than rebased onto release/v3.8.50, so the diff currently also carries 4 commits that aren't part of this fix — the Dependabot nanoid/dompurify bump, the .gitignore _tasks symlink hardening, PR #10026's catalog excludedModels filter, and your own earlier #10055 pricing-memoization fix. All four already live on main but haven't synced to release/v3.8.50 yet, so merging as-is would pull them in ahead of the normal release sync-back and could cause duplicate/conflicting commits later.

Could you reset your branch to the current release/v3.8.50 tip and re-apply just your rate-limit commit on top, then force-push? That should also clear up the "Build" and "Quality Ratchet" CI reds — neither is caused by your change (Build was an infra runner cancellation mid-build; the Quality Ratchet CodeQL alerts are all in unrelated test files that live on the branch already). Once that's done this should be ready to go.

Family resolves like auto/zai with no connected models logged a warn
on every call (about once a minute per poll). Keep the empty-pool
behavior; emit the warn at most once per label per 60s.

Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
@diegosouzapw
diegosouzapw force-pushed the fix/auto-empty-pool-log-once branch from af88f6a to 8bed9d8 Compare August 15, 2026 11:41
@diegosouzapw

Copy link
Copy Markdown
Owner

Babysit summary

  • Rebuilt branch onto current base release/v3.8.50 (was 2,280 commits stale). The previous PR head carried leaked unrelated content (deps bumps, catalog/radar changes from other contributors); rebuilt as base + af88f6a55 only. New head: 8bed9d8a9.
  • Preserved author + credit: RaviTharuma RaviTharuma@users.noreply.github.com, Co-authored-by: diegosouzapw diegosouza.pw@gmail.com.
  • Docs Gates (fast-path) fail = infra, not defect: onnxruntime-node binary download from api.nuget.org timed out (ETIMEDOUT/ENETUNREACH) during npm ci — the docs checks never ran. Re-run of the job passed cleanly.
  • Gate: all checks green (Docs Gates, Unit Tests, Vitest, Fast Quality Gates, ESLint warnings, Merge integrity, dast-smoke, semgrep, Build advisory).
  • Tests: tests/unit/auto-empty-pool-warn-once.test.ts passes locally; lint clean.
  • Ready for human review & merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants