Skip to content

test: fix flaky macOS aiohttp connection refusal test - #7423

Merged
masenf merged 1 commit into
mainfrom
codex/fix-macos-connection-refused-test
Oct 5, 2026
Merged

masenf merged 1 commit into
mainfrom
codex/fix-macos-connection-refused-test

Conversation

@masenf

@masenf masenf commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

The macOS unit job on main fails because test_connection_refused assumes a bound, non-listening socket immediately refuses connections. On the runner it instead produces a connection timeout, so the timed_out=False assertion fails. See the failing job.

Move connection-refusal coverage into the existing parameterized error-mapping test by injecting an aiohttp ClientConnectorError wrapping ECONNREFUSED. Preserve the sent=False and timed_out=False assertions and verify exception chaining for every error case. This changes only tests.

Validation:

  • Build SDK unit suite: 768 passed.
  • Full unit suite: 11,234 passed, 159 skipped, and 18 unrelated JavaScript failures with the shell's Node 18. All 18 failures passed when rerun with CI's Node 22 (19 tests passed in that rerun).
  • Full-run coverage: 79%.
  • Repository-wide Ruff lint and formatting checks passed.
  • uv run pyright reflex tests: zero errors or warnings.
  • Adversarial review: no actionable findings.

Review in cubic

@masenf masenf added the skip-changelog For doc/internal changes label Oct 5, 2026
@masenf
masenf requested a review from a team as a code owner October 5, 2026 18:00

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@masenf masenf added the on deck PRs lined up to review / merge next label Oct 5, 2026
@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Test fix for flaky macOS connection refusal behavior.

The PR appears safe to merge; no actionable issue was established.

Summary

Replaces a platform-dependent connection-refusal test with a parameterized, injected aiohttp error case.

  • Preserves the refusal mapping assertions and checks exception chaining across the error cases.

Reviews (1) · Last reviewed commit: "test: make aiohttp connection refusal co..."

@masenf
masenf enabled auto-merge (squash) October 5, 2026 18:03
@codspeed

codspeed Bot commented Oct 5, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 150 untouched benchmarks
⏩ 18 skipped benchmarks1


Comparing codex/fix-macos-connection-refused-test (632b797) with main (eb14860)

Open in CodSpeed

Footnotes

  1. 18 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@masenf
masenf merged commit 954db0d into main Oct 5, 2026
150 of 151 checks passed
@masenf
masenf deleted the codex/fix-macos-connection-refused-test branch October 5, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on deck PRs lined up to review / merge next skip-changelog For doc/internal changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants