Skip to content

fix(network): run the Bun-runtime gateway check in the integration tier - #10378

Open
waleedlatif1 wants to merge 2 commits into
stagingfrom
fix/gateway-tls-test-flake
Open

waleedlatif1 wants to merge 2 commits into
stagingfrom
fix/gateway-tls-test-flake

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • gateway.server.test.ts › "routes and verifies TLS under the actual Bun runtime" timed out at the unit suite's 10s on a staging validation (a test shard running 21,831 tests in 452s). It spawns a separate Bun process to prove gateway routing under Bun's own node:net/node:tls shims
  • Timed phase by phase: ~110ms idle. Under 3x CPU oversubscription, median 1.5s, p90 2.2s, worst 9.98s, dominated by Bun boot and module load (median 965ms, worst 7.6s). The child's imports are almost all undici and zod, which are the code under test, so they can't be narrowed. Its own 10s abort timers also matched the test's 10s budget, so a stalled step could never report itself
  • The probe moves to gateway-runtime.integration.ts. Integration files run one at a time with a 30s budget, and the child gets 25s so it fails with its own error first. The child and every assertion are unchanged (4 CONNECTs carrying the gateway token; the fixture's proxy route, signed target, PUT echo and wrong-host rejection)
  • The TLS proxy/origin fixture both files need moves into gateway-tls.test-helpers.ts; the unit file keeps its 15 tests on the same fixture

Type of Change

  • Bug fix (test)

Testing

  • Unit file 15/15 on 10 runs (and 5/5 under 28 busy loops); integration file 10 runs at 128–199ms (342–880ms under load)
  • Making the proxy stop marking proxied ports turns the integration test red ("Undici bypassed proxy"); restored
  • biome, check:file-names, check:test-patterns, check:unused-exports, cd apps/sim && bun run type-check

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 24, 2026 7:54pm UTC

Request Review

@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 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the previous missing-import finding is fixed and no new actionable issues were found.

Summary

Moves the Bun gateway probe into the integration tier and shares the TLS fixture with the unit suite.

  • The Bun gateway check runs in the integration test tier.

No new actionable issues were found in the changes since the previous review. The previous finding is fixed. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "fix(network): restore the Socket type im..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@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 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was successfully deployed

1 active deployment
Preview — f2ce3604 Deployed Nov 24, 2026 by vercel[bot]
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