Repository navigation
test(rpc): settle the startup probe before checking cached search calls - #114
Merged
Merged
Conversation
Startup spawns one non-blocking connectivity probe against api.github.com and huggingface.co. The cached-search qualification took its "before" count of proxied upstream calls as soon as the RPC port was printed, so on a slow runner the probe's two CONNECTs landed afterwards and were blamed on the cached browse (main run 42272350224). Wait until get_network_status reports offline, which happens once the probe has been refused, before taking the baseline. The check that a cached browse/filter makes no upstream call is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Contributor
[Low impact] This change appears safe to merge. SummaryWaits for the startup connectivity probe to finish before counting upstream calls from cached searches.
Reviews (1) · Last reviewed commit: "test(rpc): settle the startup probe befo..." · Reviewed by Greptile |
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 the
mainfailure in run 42272350224 (Headless without inference plugins):Cause
Those two targets are exactly the startup connectivity probe's URLs (
ConnectivityConfig::default).PumasApiBuilderspawns that probe in the background without waiting (api/builder.rs, "non-blocking").qualify-hf-cached-search-ui.pytook its baseline count of proxied upstream calls as soon as the RPC printed its port. On a slow runner the probe's CONNECTs arrived after the baseline and were counted against the cached browse. The cached search itself made no upstream call, so this is a test race, not a product regression. The same code passed on #111's PR run.Fix
Before taking the baseline, poll
get_network_status, which only reads state and never probes, untilis_offlineis true. The proxy refuses every probe, sois_offlineturning true means the startup probe has finished. The wait is bounded at 20 s and fails with "startup connectivity probe did not settle". The no-upstream-call assertion for cached browse and filter is unchanged.Verification
cargo test --offline --locked -p pumas-rpc --no-default-features --test integration hf_cached_search_testspassed three times in a row locally.🤖 Generated with Claude Code