Closesleeworks-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>
Add a CompanyName validated type enforcing 2-100 character length and
allowing only alphanumeric characters, spaces, hyphens, ampersands, and
periods. Applied to all endpoints accepting company names: /analyze,
/analyze/patent, /analyze/batch, /admin/tracked, and /export.
Includes unit tests covering too-short, too-long, special character,
leading-character, and valid edge cases for both single and batch
endpoints.
Closesleeworks-agents/SPARC#1670
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>