Skip to content

chore: remove duplicate Cloudflare wrapper test - #129530

Merged
steipete merged 1 commit into
mainfrom
test-audit/cloudflare-wrapper-duplicate
Aug 25, 2026
Merged

steipete merged 1 commit into
mainfrom
test-audit/cloudflare-wrapper-duplicate

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Cloudflare AI Gateway suite repeated the same Anthropic thinking-prefill success path in both a direct wrapper test and the plugin registration test. The direct case added maintenance cost without protecting an independent behavior.

Why This Change Was Made

Remove only the direct wrapper replay. The surviving registration test captures the real provider, invokes its registered wrapStreamFn, executes the actual wrapped stream, and asserts the same assistant-prefill removal. The focused wrapper suite still covers warning details, multiple trailing prefills, disabled thinking, tool-use preservation, non-Anthropic bypass, and the missing-API default.

AI-assisted test audit requested by the maintainer.

User Impact

No user-visible behavior changes. The extension suite keeps its unique behavior and wiring coverage with one fewer duplicate test.

Evidence

  • Baseline: node scripts/run-vitest.mjs extensions/cloudflare-ai-gateway/index.test.ts extensions/cloudflare-ai-gateway/stream-wrappers.test.ts — 8/8 tests passed.
  • After cleanup: the same focused command — 7/7 retained tests passed.
  • node scripts/check-changed.mjs --dry-run -- extensions/cloudflare-ai-gateway/stream-wrappers.test.ts — classified the extension-test lane.
  • node scripts/check-changed.mjs -- extensions/cloudflare-ai-gateway/stream-wrappers.test.ts — passed, including extension-test typecheck and type-aware lint.
  • git diff --check — passed.
  • Fresh autoreview reported no actionable findings; correctness confidence 0.99.
  • Production LOC: +0/-0. Test LOC: +0/-22.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 25, 2026 18:31

Copy link
Copy Markdown
Contributor Author

Exact-head validation for d0557be79fabead5b04a5aca7c440844df072cb5:

  • Baseline focused run: 2 files, 8/8 tests passed.
  • After cleanup: 2 files, 7/7 retained tests passed.
  • node scripts/check-changed.mjs -- extensions/cloudflare-ai-gateway/stream-wrappers.test.ts passed, including extension-test typecheck and type-aware lint.
  • git diff --check passed.
  • Fresh autoreview found no actionable issues (correctness confidence 0.99).
  • Exact-head CI is green. The first hosted check-lint attempt was interrupted by a runner shutdown (exit 143) without a lint finding; its isolated rerun passed.
  • Production LOC: +0/-0. Test LOC: +0/-22.

Coverage retained: the plugin registration test captures the real provider, invokes its registered wrapStreamFn, executes the actual wrapper, and asserts Anthropic assistant-prefill removal. Focused tests retain warning count/text, multiple trailing prefills, disabled thinking, tool-use preservation, non-Anthropic bypass, and missing-API default behavior.

@steipete
steipete merged commit 66bfdef into main Aug 25, 2026
213 of 223 checks passed
@steipete
steipete deleted the test-audit/cloudflare-wrapper-duplicate branch August 25, 2026 19:43

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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