Skip to content

Accept collections in CORS configuration annotations - #3518

Merged
Kludex merged 3 commits into
mainfrom
codex/cors-collection-annotations
Sep 5, 2026
Merged

Kludex merged 3 commits into
mainfrom
codex/cors-collection-annotations

Conversation

@Kludex

@Kludex Kludex commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

CORSMiddleware already accepts sets and frozensets at runtime, but its Sequence[str] annotations reject them during type checking. Use Collection[str] for allow_origins, allow_methods, allow_headers, and expose_headers so the annotations describe the operations the middleware needs.

Existing list and tuple arguments remain accepted. Runtime logic and immutable tuple defaults are unchanged.

Validation: all 36 existing CORS tests and mypy pass.

Extracted from @Zaczero's work in #3067. Co-authored by Kamil Monicz (@Zaczero).

Review in cubic

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.

@Kludex
Kludex deployed to cloudflare September 5, 2026 11:22 — with GitHub Actions Active
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-05T11:24:33.226226Z 52312ae PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

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

Re-trigger cubic

@codspeed

codspeed Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 10.83%

❌ 1 regressed benchmark
✅ 241 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation test_multipart[boundary-like-file] 8.4 ms 9.4 ms -10.83%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing codex/cors-collection-annotations (79d21d1) with main (c9176b5)

Open in CodSpeed

@Kludex
Kludex deployed to cloudflare September 5, 2026 11:50 — with GitHub Actions Active
@Kludex
Kludex deployed to cloudflare September 5, 2026 11:55 — with GitHub Actions Active
@Kludex
Kludex enabled auto-merge (squash) September 5, 2026 11:55
@Kludex
Kludex merged commit 0fcaff1 into main Sep 5, 2026
15 checks passed
@Kludex
Kludex deleted the codex/cors-collection-annotations branch September 5, 2026 11:56

This branch was successfully deployed

1 active deployment
cloudflare — 79d21d10 Deployed Sep 5, 2026 by Kludex via Docs preview (Cloudflare) #1220
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