Skip to content

test(rpc): settle the startup probe before checking cached search calls - #114

Merged
MrScripty merged 1 commit into
mainfrom
test/settle-startup-probe-before-cache-check
Nov 6, 2026
Merged

MrScripty merged 1 commit into
mainfrom
test/settle-startup-probe-before-cache-check

Conversation

@MrScripty

Copy link
Copy Markdown
Owner

Fixes the main failure in run 42272350224 (Headless without inference plugins):

AssertionError: cached browse/filter attempted upstream: [{'method': 'CONNECT', 'target': 'api.github.com:443'}, {'method': 'CONNECT', 'target': 'huggingface.co:443'}]

Cause

Those two targets are exactly the startup connectivity probe's URLs (ConnectivityConfig::default). PumasApiBuilder spawns that probe in the background without waiting (api/builder.rs, "non-blocking").

qualify-hf-cached-search-ui.py took 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, until is_offline is true. The proxy refuses every probe, so is_offline turning 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_tests passed three times in a row locally.

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 63bb7850-6303-4cde-949e-f437a9c85b86
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This change appears safe to merge.

Summary

Waits for the startup connectivity probe to finish before counting upstream calls from cached searches.

  • Cached-search checks wait for the startup probe to finish.

Reviews (1) · Last reviewed commit: "test(rpc): settle the startup probe befo..." · Reviewed by Greptile

@MrScripty
MrScripty merged commit 023e70e into main Nov 6, 2026
35 checks passed
@MrScripty
MrScripty deleted the test/settle-startup-probe-before-cache-check branch November 6, 2026 19:41
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.

1 participant