fix: enforce max_length=128 and validate GET /analyze/batch company_name filter #1688

Open
AI-Manager wants to merge 1 commits from feature/1685-stricter-company-name-validation into main

1 Commits

Author SHA1 Message Date
agent-company 5c25a0f589 fix: enforce max_length=128 and validate GET /analyze/batch filter
Closes leeworks-agents/SPARC#1685

- Increase CompanyName max_length from 100 to 128 everywhere (Pydantic
  type, Path constraints, and the inline Query on analyze/patent).
- Add _COMPANY_NAME_FILTER_QUERY reusable Query annotation and apply it
  to the optional company_name filter on GET /analyze/batch so it is
  validated with the same rules as all other endpoints.
- Update tests: rename test_over_100_chars_rejected → 128, add
  test_exactly_128_chars_accepted at the new boundary, fix batch
  too-long test to use 129 chars, update valid-name parametrize to use
  "A"*128, and add five new tests covering GET /analyze/batch filter
  validation (special chars, too-short, too-long, valid, omitted).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 15:18:09 +00:00