Skip to content

Validate event search parameters in FastAPI query models - #16354

Merged
frankie567 merged 5 commits into
mainfrom
codex/plr-428-event-query-filter
Nov 4, 2026
Merged

frankie567 merged 5 commits into
mainfrom
codex/plr-428-event-query-filter

Conversation

@frankie567

@frankie567 frankie567 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Event listing and statistics routes now validate search parameters through FastAPI query models. Pydantic parses the JSON-encoded filter, enforces the existing three-character minimum for search text, and checks that search text is accompanied by an organization ID.

OpenAPI now declares the search minimum length. The frozen 2026-04 and 2026-10 fixtures include the constraint, and the internal TypeScript client was regenerated.

Closes PLR-428.

Focused query validation checks and both frozen OpenAPI comparisons passed. The event integration tests stopped at fixture setup because the sandbox blocked access to local MinIO.

@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
orbit Ready Ready Preview Nov 4, 2026 4:34pm UTC
polar-test Ready Ready Preview Nov 4, 2026 4:34pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot 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.

cubic analysis

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Linked issue analysis

Linked issue: PLR-428: Use FastAPI support for complex query parameter schemas

Status Acceptance criteria Notes
✅ Validate filter schemas through FastAPI query models EventQueryFilter uses Json[Filter] in the query models, replacing endpoint-level JSON parsing.
✅ Remove the obsolete comment about unsupported complex query schemas The manual parser and its outdated FastAPI support comment are removed from the endpoint file.

Auto-approved: Moves event filter JSON validation from endpoint helpers into FastAPI query models via Json[Filter], keeping the query parameter typed as string in generated schemas. Valid/omitted filters behave identically; invalid filters still 422 with a clearer query.filter location.

View guided diff | Turn on auto-fix | Re-trigger cubic

@frankie567 frankie567 changed the title Validate event filters in FastAPI query models Validate event search parameters in FastAPI query models Nov 4, 2026
@frankie567
frankie567 marked this pull request as ready for review November 4, 2026 16:34
@frankie567
frankie567 enabled auto-merge November 4, 2026 16:34
@frankie567
frankie567 added this pull request to the merge queue Nov 4, 2026
@codspeed

codspeed Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 10.19%

⚡ 1 improved benchmark
✅ 19 untouched benchmarks
⏩ 120 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_confirm_pending[1] 27.3 ms 24.8 ms +10.19%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing codex/plr-428-event-query-filter (3db68b1) with main (41f3b74)

Open in CodSpeed

Footnotes

  1. 120 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@cubic-dev-ai cubic-dev-ai Bot 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.

0 issues found across 4 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Refactors event filter/search validation into FastAPI query models, preserving existing rejection behavior and OpenAPI schemas while declaring the min-length rule; generated client and frozen fixtures updated.

View guided diff | Turn on auto-fix | Re-trigger cubic

Merged via the queue into main with commit 421b995 Nov 4, 2026
46 of 53 checks passed
@frankie567
frankie567 deleted the codex/plr-428-event-query-filter branch November 4, 2026 16:48

This branch was successfully deployed

2 active deployments
Preview – polar-test — 3db68b1c Deployed Nov 4, 2026 by vercel[bot]
Preview – orbit — 3db68b1c Deployed Nov 4, 2026 by vercel[bot]
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