Skip to content

test: fix three red main checks (OAuth replay fixtures, fetch --wait timing, quarantine-pilot model) - #1829

Merged
Dumbris merged 3 commits into
mainfrom
claude/main-release-readiness-f45bb0
Nov 7, 2026
Merged

Dumbris merged 3 commits into
mainfrom
claude/main-release-readiness-f45bb0

Conversation

@Dumbris

@Dumbris Dumbris commented Nov 6, 2026

Copy link
Copy Markdown
Member

Summary

Three checks are red on main at 28247002e. All three are test-side problems; no production code changes here. One commit per check.

Check Failure Cause Fix
Unit Tests (ubuntu) TestRefreshReplay_HTTPTimeout: expected "rt-0", actual "" The synthetic AS asserted on every non-metadata request. It stays up for the 10s first-attempt timeout, and a request from outside the test reached its loopback port. The three refresh-replay fixtures count and assert only on POST /token carrying rt-0; anything else is logged and answered 404.
Unit Tests (shuffle) TestReviewFetchWaitBoundsWholeCommand/post: 1.59s is not less than 1.45s The stopwatch ran around runFetch, so it also timed the harness (temp dirs, config write, test server) and left 450ms for all of it on top of the 1s --wait. The fixture records whether a delayed request ran its full delay; the test requires the command to be back before that.
Quarantine Pilot: Exploration (scheduled) TestQAPilot_Explore: tool expected approved, actual pending Failing daily since Oct 31. #1714 (R2-1) made the first-discovery baseline scan-gated; the pilot model still approved every first-seen tool. No deterministic scenario had a poisoned first-seen tool, so the PR lane stayed green. Model: a baseline pass approves a new tool, or promotes an unchanged pending one, only on a clean verdict. New scenarios S30, S31 and mutations M20, M21 put this on the PR lane. QP-08 and the pilot doc updated.

Evidence

OAuth fixture. In the failing run the test's own two token requests both arrived and every assertion on the test goroutine passed (one error in the output, test ended at 10.02s), so there was a third request, and refreshToken in mcp-go always sends refresh_token. Injecting a stray GET into the unfixed test reproduces the CI output line for line; with the fix the same injected request is logged and the test passes. The sender of the CI request is not identified: the fixture did not log it. It does now.

Fetch --wait. Not reproduced locally (6 runs under 3×ncpu CPU load stayed at 1.03s). Reading review_fetch.go: every stage runs under one context.WithTimeout(wait) and DoRaw has no retry, so the overrun is outside the deadline. The new assertion was checked both ways: with the discover POST taken off the shared context the post case fails; with a 600ms sleep added to the harness the test passes.

Pilot model. Reproduced locally with the CI seed (-rapid.seed=2531019367865565570). S30 and S31 fail against the old model and pass with the new one. The exploration lane passes with the CI seed and with a fresh seed, 200 checks each. go run ./cmd/qapilot mutate --only M20,M21: both detected.

Verification

  • go test -race -count=1 ./internal/upstream/core/ ./internal/qapilot/... ./cmd/qapilot/...
  • go test -race -count=1 -run 'TestReviewFetch|TestQAPilot' ./cmd/mcpproxy/ ./internal/runtime/
  • golangci-lint run --config .github/.golangci.yml, bare and --build-tags server, on the touched packages: 0 issues
  • ./scripts/test-api-e2e.sh not run: no production code changed

Not in this PR

TestEgress_RateLimitMovesNextCheckAndNothingIsRecorded (internal/security/scanner) failed once on main on Nov 4 (run 41894266461): next_check_at still showed the previous subtest's 24h cap instead of the 10-minute tick. Not investigated here.

Review

opencode github-copilot/gpt-6.1-sol, read-only, one round over the three commits against the production paths: VERDICT: SHIP, no findings.

…ir own

TestRefreshReplay_HTTPTimeout failed on main (run 42203437083) with a token
request carrying no refresh_token, while the test's own two requests both
arrived and every assertion on the test goroutine passed. The code under test
cannot send that request: the synthetic AS stays up for the 10s first-attempt
timeout, and a request leaked by an earlier test reached its reused loopback
port. An injected stray GET reproduces the CI output exactly.

The three synthetic AS handlers now count and assert only on POST /token
carrying rt-0; anything else is logged and answered 404. A replay that sent a
different token still fails the test, because it gets the 404.
TestReviewFetchWaitBoundsWholeCommand/post failed in the shuffle job at 1.59s
against a 1.45s bound. The stopwatch ran around runFetch, so it also timed the
harness (two temp dirs, a config write, the test server) and left 450ms for
all of it on top of the 1s deadline.

The fixture now records whether a delayed request ran its full delay, and the
test requires that the command returned before that. Checked both ways: with
the POST taken off the shared deadline the post case fails, and with a 600ms
stall added to the harness the test passes.
The scheduled exploration lane has failed since #1714: the model still
approved every tool on a trusted server's first discovery, while the
implementation now holds a tool that scans dangerous (and does not promote it
on the next identical list). The deterministic lane had no scenario with a
poisoned first-seen tool, so the PR checks stayed green.

- model: a baseline pass approves a new tool, or promotes an unchanged
  pending one, only on a clean verdict
- S30, S31: the mixed and the all-dangerous first discovery, on every PR
- M20, M21: removing either baseline hold is detected by those scenarios
- QP-08 and the pilot doc say what the baseline now means
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e28cc02
Status: ✅  Deploy successful!
Preview URL: https://58b2ceb8.mcpproxy-docs.pages.dev
Branch Preview URL: https://claude-main-release-readines.mcpproxy-docs.pages.dev

View logs

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: claude/main-release-readiness-f45bb0

Available Artifacts

  • archive-darwin-amd64 (32 MB)
  • archive-darwin-arm64 (29 MB)
  • archive-linux-amd64 (20 MB)
  • archive-linux-arm64 (18 MB)
  • archive-windows-amd64 (32 MB)
  • archive-windows-arm64 (28 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (28 MB)
  • installer-dmg-darwin-arm64 (25 MB)
  • smart-mcp-proxymcpproxy-goW2RQBW.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 42259565575 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/qapilot/model.go 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Dumbris
Dumbris merged commit c28c2be into main Nov 7, 2026
52 checks passed
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