Skip to content

fix(smart): treat target probe transport errors as failures - #14

Open
yt433 wants to merge 2 commits into
vernesong:Alphafrom
yt433:fix/smart-target-probe-errors
Open

fix(smart): treat target probe transport errors as failures#14
yt433 wants to merge 2 commits into
vernesong:Alphafrom
yt433:fix/smart-target-probe-errors

Conversation

@yt433

@yt433 yt433 commented Aug 15, 2026

Copy link
Copy Markdown

Summary

  • Treat transport errors from a target-specific StatusTest as failures.
  • Preserve healthy handling for successful checks and failure handling for unexpected status responses.
  • Add table-driven regression tests covering success, unexpected status, EOF, and timeout.

Why

When a low-download HTTPS connection triggers a target-specific recheck, the existing code only updates failure when the check returns no error. A timeout, EOF, or other transport error therefore leaves the node eligible for the same target.

This change makes transport errors participate in the existing per-target failure cache and node filtering, without changing the global health-check URL or globally blocking the node.

Tests

  • go test ./adapter/outboundgroup ./component/smart/...

AI assistance

Investigation, patch preparation, and test generation were performed with assistance from OpenAI Codex. The changes were reviewed and submitted by @yt433.

yt433 added 2 commits August 16, 2026 01:38
Treat transport errors returned by target-specific status checks as failures, so unhealthy nodes are excluded for that target.

Assisted-by: OpenAI Codex
Verify that transport errors fail target-specific checks while successful responses remain healthy.

Assisted-by: OpenAI Codex
liuran001 pushed a commit to liuran001/mihomo that referenced this pull request Aug 20, 2026
chore: report detailed errors for invalid Clash-style domain patterns
@vernesong

Copy link
Copy Markdown
Owner

误判会增加,因为测试域名构建时只包含顶级域名

@sharkcpt

Copy link
Copy Markdown

[Smart] Maximum file size limit reached (100 MB), stopping data collection

这个可以改一下?

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.

3 participants