Flake: a_refused_connection_is_not_retried races other tests for its freed port
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず crates/socket-patch-core/tests/api_retry_e2e.rs を確認し、特に a_refused_connection_is_not_retried と issue に記載された listener の設定を調べてください。アサーションの実行中、テストでバインド済みかつ待ち受けていないソケットを保持する方法を確認し、その後この integration test を実行してください。完了条件は、ポートが並列テストで引き続き使用できず、アサーションが引き続き ApiError::Network を要求することです。
索引モデルが issue の本文から書いたものです。
説明
[agent] Found while handling a merge-queue eviction of #2405 (a test-only change in the CLI crate that does not touch this code).
Problem
a_refused_connection_is_not_retried in crates/socket-patch-core/tests/api_retry_e2e.rs picks its "dead" port by binding 127.0.0.1:0, reading the port and dropping the listener. Tokio tests in the same binary run in parallel and start their own stand-in servers on 127.0.0.1:0, so one of them can be handed the port just freed. The request then reaches a live server instead of being refused.
Evidence
Merge-queue CI run 46744428179, job coverage (1):
thread 'a_refused_connection_is_not_retried' panicked at crates/socket-patch-core/tests/api_retry_e2e.rs:983:5:
Other("API request failed with status 404: 127.0.0.1:36553 did not answer like the Socket patch API — check --api-url / SOCKET_API_URL and the organization slug 'org' (--org / SOCKET_ORG_SLUG)")
test result: FAILED. 17 passed; 1 failed
Something answered 404 on the port the test expected to be closed. ci-ok failed on that job alone and the queue entry was evicted.
Suggested fix
Keep the port reserved and still refusing for the length of the test, so no other test can take it. One way: bind a socket to the port without calling listen and hold it until the assertions finish (a connect to a bound, non-listening TCP socket is refused on Linux, macOS and Windows). Don't loosen the assertion on ApiError::Network.
Generated by Claude Code
- 主要言語
- Rust
- スター
- 9
- フォーク
- 2
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 213
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SocketDev/socket-patch のほかの issue
-
agent:triaged arch-audit bug priority:p1
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
SocketDev/socket-patch#2517 ·
メンテナーはふだん 1 日以内に返信
-
agent:triaged bug bughunt pm:bundler priority:p1 ux
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
SocketDev/socket-patch#2508 ·
メンテナーはふだん 1 日以内に返信
-
agent:triaged bug bughunt pm:npm priority:p1
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SocketDev/socket-patch#2476 ·
メンテナーはふだん 1 日以内に返信
-
agent:triaged arch-audit priority:p3 refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SocketDev/socket-patch#2429 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent:triaged arch-audit priority:p3 refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
SocketDev/socket-patch#2419 ·
メンテナーはふだん 1 日以内に返信
SocketDev/socket-patch の issue をすべて見る
似ている issue
-
chat compiler P1
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
HerringtonDarkholme/hd-lang#2793 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
security-advisory
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MinBZK/regelrecht#2173 ·
-
ci
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
jonathanong/no-mistakes#5804 ·
-
triage: failed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
oxc-project/tsrs#1277 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信