Repository navigation
fix(auto-routing-benchmark): publish the platform table without waiting for the whole queue - #8482
Conversation
…ng for the whole queue A platform pair still being measured is not served yet: the subscription promotes servingPairs only once the whole replacement set is ready. Gating publication on a queue with no pending or running row instead let one slow measurement hold back every other improvement to the live table. The shared registry row made this worse, because a user-queue run can claim the same pair and keep it running for hours. Publish once every pair the table currently serves has a ready current-engine row. That still refuses a thinner table: after an engine bump no ready row matches the previous serving pairs, so publication waits, and an unready served pair keeps the existing table in place.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe new gate now diffs the published table instead of the already-narrowed serving set, so a live pair that is still a target and has no ready current-engine row blocks publication while a newly admitted pair no longer does; both previously reported findings are addressed at Assumptions: Files Reviewed (2 files)
Previous Review Summaries (2 snapshots, latest commit f7e6ac2)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f7e6ac2)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe new Assumptions: Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files)
Previous review (commit 6804a1e)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe replacement publish gate compares against serving pairs that Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files)
Fix these issues in Kilo Cloud: Fix these issues in Kilo Cloud Reviewed by deepseek-flash-latest · Input: 60.2K · Output: 14.9K · Cached: 765.1K Review guidance: REVIEW.md from base branch |
The coverage check blocked on any served pair without a ready row, which wedged publication on a pair whose re-measurement settled as failed. Only a pair that is missing, pending or running under this engine means mid-flight work; a failed pair drops out of the table exactly as it did when the gate counted pending and running rows.
…ng set servingSubscriptionSnapshot already restricts servingPairs to rows that are ready under the current engine, so comparing against them could never see a live pair about to disappear, and the first ready pair after an engine bump published a one-model table. Compare the live table's pairs with the new build instead: a live pair that is still a target and has no ready row blocks publication, unless its own re-measurement settled as failed, which drops out as before.
Problem
The platform routing table published only when no platform registry row was
pendingorrunning. A pair being measured is not served yet, so that gate made publication wait on the slowest measurement in the queue instead of on table readiness.The registry row is shared between the two queues: a
user-purpose run claims the same row the platform queue admitted. One such run held a new DeepSeek snapshot pair inrunningfrom the moment it started, and everyPUT /admin/configin that window loggedrouting_table_publish_skipped_queue_unsettled, leaving the live table on the previous build.Invariant
Publish when every pair the published table serves either still carries over, or was deliberately removed.
The serving set cannot express that:
servingSubscriptionSnapshotalready restrictsservingPairsto rows that are ready under the current engine, so it is empty after a bump and fills one pair at a time. The gate therefore diffs the published table:pendingorrunning, blocks. That is a re-measurement in flight or an engine bump, and publishing would drop a pair the table serves.faileddrops out, as it did when the gate counted only pending and running rows.Change
publishPlatformRoutingTablereads the published table once, before the build, and reuses it for the identical-version check.routing_table_publish_skipped_serving_pair_unreadywith the model, variant and current status.db.tsthat described a reaped claim as holding the queue unsettled now state the real consequence: the pair is neither served nor re-measured, so the table never gains it.Verification
pnpm vitest runinservices/auto-routing-benchmark: 909 tests pass.pnpm typecheck,pnpm lint: clean.faileddrops out; the engine-bump sequence publishes nothing until every live pair is ready again.