Skip to content

[avenger] Fix flaky TestHeaderRoundTripper - #78420

Merged
pelikhan merged 1 commit into
mainfrom
avenger/fix-header-roundtripper-flake-ffb30adf8f727124
Nov 16, 2026
Merged

pelikhan merged 1 commit into
mainfrom
avenger/fix-header-roundtripper-flake-ffb30adf8f727124

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

CI failure

CI run 43896838115, job "Integration: CLI Completion & Other": TestHeaderRoundTripper/no_headers failed with HTTP/1.x transport connection broken: http: CloseIdleConnections called.

Cause

The test used the shared http.DefaultTransport, and other parallel tests call CloseIdleConnections on it.

Fix

Each subtest now clones the default transport and uses its own copy (pkg/cli/mcp_inspect_headers_test.go).

Validation

  • gofmt clean; go vet -tags integration ./pkg/cli/ clean.
  • go test -tags integration ./pkg/cli -run TestHeaderRoundTripper -count=3 passes.
  • make lint and the full make test-unit were not run, to stay within the runtime budget. The change is limited to one integration-tagged test file.
  • git fetch origin main failed with an SSL certificate error, so the checkout was not merged with the latest main.

Generated by 🦸 Avenger · copilot · routed: sonnet55 high · ~19 AIC · ⌖ ~2 AIC · ⊞ 5K · ◷

  • expires on Nov 18, 2026, 8:38 AM UTC-08:00

@pelikhan
pelikhan marked this pull request as ready for review November 16, 2026 17:06
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 17:06
@pelikhan
pelikhan merged commit 5c7aa93 into main Nov 16, 2026
2 checks passed
@pelikhan
pelikhan deleted the avenger/fix-header-roundtripper-flake-ffb30adf8f727124 branch November 16, 2026 17:06
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #78420 · copilot · gpt56 · ~1 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #78420 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

Copilot AI 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.

🟡 Changes recommended

The test assumes http.DefaultTransport is always an *http.Transport, so a custom or nil global transport can cause a panic before the round trip is exercised.

1 open issue
What changed in this PR

This pull request fixes flaky integration test behavior by isolating each TestHeaderRoundTripper subtest from the shared HTTP default transport.

Changes:

  • Clones the default HTTP transport for each subtest.
  • Closes each private transport during cleanup.
  • Preserves the existing header round-tripping assertions.
File Description
pkg/​cli/​mcp_inspect_headers_test.go Updates TestHeaderRoundTripper to use an independent cloned HTTP transport for each subtest and clean it up afterward.

Review effort: Lite (dynamic)

Comment on lines +69 to +70
base := http.DefaultTransport.(*http.Transport).Clone()
defer base.CloseIdleConnections()
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants