Skip to content

test: make two environment-sensitive tests deterministic - #153

Open
jklap wants to merge 1 commit into
sstraus:mainfrom
jklap:upstream/pr0-sandbox-microfixes
Open

jklap wants to merge 1 commit into
sstraus:mainfrom
jklap:upstream/pr0-sandbox-microfixes

Conversation

@jklap

@jklap jklap commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
  • remote_runtime: the remaining name-resolution cases of direct_recovery_excludes_fqdns_and_resets_and_bounds_missing_peers use the no-proxy client. An environment proxy (an agent sandbox sets one) answered for the host and turned "cannot resolve" into an HTTP 403.
  • tuic-git: the pull-request lookup concurrency probe holds a lookup open until a second one overlaps it (3 s bound) instead of sleeping a fixed 100 ms, which under a loaded full-suite run could end before the next worker thread was scheduled.

No production code changes.

Summary by CodeRabbit

  • Tests
    • Improved reliability of checks for overlapping branch lookups by waiting for the expected activity rather than relying on a fixed delay.
    • Updated direct-health recovery checks to use consistent network settings across scenarios, reducing the chance that environment proxy configuration affects results.

- remote_runtime: the remaining name-resolution cases of
  direct_recovery_excludes_fqdns_and_resets_and_bounds_missing_peers use the
  no-proxy client. An environment proxy (an agent sandbox sets one) answered
  for the host and turned "cannot resolve" into an HTTP 403.
- tuic-git: the pull-request lookup concurrency probe holds a lookup open
  until a second one overlaps it (3 s bound) instead of sleeping a fixed
  100 ms, which under a loaded full-suite run could end before the next
  worker thread was scheduled.

No production code changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Two tests now control external conditions more directly: one waits for overlapping lookups, and the other reuses a proxy-disabled HTTP client for its lookup cases.

Changes: Git lookup concurrency test

Layer / File(s) Summary
Wait for lookup overlap
src-tauri/crates/tuic-git/src/worktree.rs
The concurrency test polls every 5 ms until at least two lookups overlap or three seconds elapse. The existing overlap assertion remains.

Direct DNS recovery test

Layer / File(s) Summary
Reuse the proxy-disabled client
src-tauri/src/remote_runtime.rs
The test retains a proxy-disabled client and uses it for the missing-peer and advertised-FQDN cases.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: sstraus

Merge Risk: Minimal · up to ac829

The changes reduce environment sensitivity in two tests. No merge-blocking issue is established.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the two test changes, which make environment-sensitive tests deterministic.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 too large.)

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • 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

Recent review info

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: 887f41f2-8f11-41f9-953f-4794d9304caf
Commits

Reviewing files that changed from the base of the PR and between 9f6af42 and ac82921.

Files selected for processing: 2

  • src-tauri/crates/tuic-git/src/worktree.rs
  • src-tauri/src/remote_runtime.rs

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

This branch has not been deployed

No deployments
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