Repository navigation
fix(tests): isolate loopback gateway fixture caches - #8013
Merged
Lightheartdevs merged 1 commit intoOct 23, 2026
Merged
Lightheartdevs merged 1 commit into
Lightheartdevs merged 1 commit into
Conversation
3 tasks done
Collaborator
|
Thanks for isolating the loopback fixtures while keeping the real socket coverage intact. Advisory status: looks merge-ready What looks good:
What I checked:
|
Contributor
|
Confirmed: this is the same change I'd prepared for the collision (a fresh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The real IPv4 and IPv6 gateway socket fixtures share a five-second address-family cache keyed by port. If the kernel reuses the IPv4 fixture's port for the IPv6 fixture, the latter sends its POST to the deliberately resetting IPv4 listener and fails with
ECONNRESET.Give each real socket fixture its own
createLoopbackGatewayFetch(). Both still use the default production HTTP transport and retain their health, family-selection, request and cleanup assertions. No production source changes.Closes #8012. Credit to roshangupta00750's diagnosis, which identified the collision in #7883's integration-smoke failure.
Why this matters
An unrelated PR can fail required CI depending on ephemeral-port allocation. Fixture-owned caches remove that cross-test state while preserving the real network behavior under test.
AI Assistance
0xacee leads this contribution, its scope and quality requirements, collaborating with Codex on reproduction, implementation, tests and review. The validation commands below were agent-executed.
Release Lane
mainChanged Surface
Risk And Validation
Low risk. Base
6513ad2e0e205525f148b68fffd095cb1b347e2c; candidate43a79de3346eb8c1af837f04a93a51b6afc701db.socket hang up / ECONNRESET. Candidate: 10 passed, zero skips on Ubuntu WSL / Node 22.23.3.node --test --test-concurrency=2 extensions/services/pixel-agent/tests/*.test.mjs— 4,920 passed, 52 conditional skips, zero failures in a private exact-tree Linux export.git diff --checkand Gitleaks 8.30.1 on the complete added range passed.The existing
test-linux.ymlintegration job executesnode --test extensions/services/pixel-agent/tests/*.test.mjs, including this file. No additional test file or CI exclusion is introduced.Operational Change Check
The scoped network tests establish fixture isolation. Runtime caching, authentication, transport discovery and mutation replay policy are unchanged.
Overlap check
The current 610-open-PR file inventory, including all 14 larger file lists, has no other change to this test file. All-state IPv6, gateway/cache and ECONNRESET searches found the original runtime coverage and the #7883 failure report, with no equivalent fixture-isolation PR. #7883 changes n8n workflow resolution; this PR repairs the independent CI test defect.
Hosted validation on the published head
The current-head integration-smoke job passed the unchanged workflow command with 4,920 Node tests passed, 52 conditional skips and zero failures. Its log explicitly records both real IPv4 and IPv6 fixtures passing. This complements the independently replayed forced-port-reuse regression and the local two-worker run.
Final current-head readback: 73/73 checks passed, with zero failed or pending checks. The PR is Ready for review and conflict-free. Hosted status is tied to candidate
43a79de3346eb8c1af837f04a93a51b6afc701db.