Skip to content

Fix recurring merge queue failure causes - #2515

Merged
stephentoub merged 1 commit into
mainfrom
stephentoub-merge-queue-deflake
Sep 4, 2026
Merged

Fix recurring merge queue failure causes#2515
stephentoub merged 1 commit into
mainfrom
stephentoub-merge-queue-deflake

Conversation

@stephentoub

Copy link
Copy Markdown
Collaborator

Repeated merge-queue attempts for #2507 exposed several independent SDK test and CI defects: replay mismatches after aborts, uninitialized proxy traffic, fragile Windows shell execution, truncated Python downloads, and accidental Maven Central publication during local validation.

Changes

  • Normalize the runtime's bare Session aborted result to the replay harness's stable interruption representation.
  • Initialize each Go replay proxy before runtime startup traffic, and run the Windows shell marker command through cmd.exe in an isolated working directory instead of nested PowerShell.
  • Retry http.client.IncompleteRead failures while continuing to verify complete downloads with checksums or package integrity metadata.
  • Explicitly set skipPublishing during Java native local publication validation so release-version commits do not require Maven Central credentials.

The MCP OAuth startup race is intentionally excluded because github/copilot-agent-runtime#18931 and #2511 already own that work. This also complements #2484, which improved teardown, diagnostics, artifact reruns, and registry retries but did not cover these failure modes.

Validation

  • Replay harness: 34 tests passed
  • Harness TypeScript check passed
  • Python Ruff checks and 9 downloader tests passed
  • Go E2E package compilation passed
  • Windows Go shell E2E passed
  • Java workflow YAML parsed successfully
  • Opus review found no significant issues

Generated by Copilot

Synchronize Go replay proxy startup, avoid nested PowerShell in the Windows shell E2E test, normalize bare abort results, retry truncated Python downloads, and prevent local Java validation from invoking Central publishing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@stephentoub
stephentoub requested a review from a team as a code owner September 4, 2026 02:50
Copilot AI balanced review requested due to automatic review settings September 4, 2026 02:50
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

SDK Consistency Review

Reviewed the full PR diff (7 files) against all six SDK implementations.

Summary of changes:

  • .github/workflows/java-sdk-tests.yml — CI-only flag addition (-DskipPublishing=true), no SDK API surface.
  • go/internal/e2e/rpc_shell_and_fleet_e2e_test.go + go/internal/e2e/testharness/context.go — Go E2E test/harness fixes (writing marker file in a subdirectory, initializing the replay proxy with a dummy snapshot before model traffic). Internal test infra only, no public Go SDK API changed.
  • python/copilot/_cli_download.py (+ its test) — expands the retriable exception set for CLI/runtime downloads to include http.client.IncompleteRead alongside HTTPError/URLError.
  • test/harness/replayingCapiProxy.ts + .test.ts — shared test-harness normalization logic (used by all SDKs' E2E suites), tightened to also match a bare "Session aborted" tool result.

Cross-SDK consistency assessment:

The _cli_download.py retry-hardening only applies to Python because Python is the only SDK that implements its own bespoke CLI/runtime download-with-retry logic in this repo. The other SDKs acquire the CLI/native runtime through their respective language package managers (npm for Node.js, Go modules, NuGet for .NET, Maven for Java, crates.io conventions for Rust) rather than a custom HTTP downloader with manual retry loops — I found no equivalent _fetch_url_bytes/retry-loop pattern in nodejs/, go/, dotnet/src/, java/sdk/src/main/java/, or rust/src/. Since there's no parallel implementation to update, this isn't a parity gap — it's a Python-specific implementation-detail fix.

The Go E2E test change and the shared test/harness/ normalization update are test-infrastructure fixes that benefit every SDK's E2E suite equally (the harness is shared), and the CI workflow tweak is Java-build-only with no code-level API implication.

No action needed. This PR does not introduce any new public API in one language without a counterpart elsewhere, nor does it change SDK behavior inconsistently across languages. No inline comments added.

Generated by SDK Consistency Review Agent for #2515 · copilot · sonnet50 · 23.1 AIC · ⌖ 12 AIC · ⊞ 9.7K ·

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.

Copilot review overview

🟢 Approval recommended

The focused reliability fixes are consistent with their surrounding implementations and include appropriate validation coverage.

Review tier: Balanced
Findings: None

What changed in this PR

Fixes recurring merge-queue failures across replay handling, Python downloads, Go E2E setup, and Java validation.

Changes:

  • Normalizes aborted tool results and retries truncated downloads.
  • Stabilizes Go proxy initialization and Windows shell execution.
  • Prevents Java local validation from publishing to Maven Central.
File Description
test/​harness/​replayingCapiProxy.ts Normalizes bare session-abort results.
test/​harness/​replayingCapiProxy.test.ts Tests abort-result normalization.
python/​copilot/​_cli_download.py Retries incomplete HTTP reads.
python/​test_cli_download.py Tests truncated-response recovery.
go/​internal/​e2e/​testharness/​context.go Initializes the replay proxy before clients start.
go/​internal/​e2e/​rpc_shell_and_fleet_e2e_test.go Stabilizes Windows shell marker execution.
.github/​workflows/​java-sdk-tests.yml Explicitly disables Maven Central publication.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@stephentoub
stephentoub merged commit 3428b36 into main Sep 4, 2026
164 of 166 checks passed
@stephentoub
stephentoub deleted the stephentoub-merge-queue-deflake branch September 4, 2026 03:25
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.

2 participants