Add input validation for titles and ids
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start with TaskStore.add and trace the API and CLI entry points that create tasks or perform id lookups. Read the unified error contract from item 2 and the prerequisite work in #6 before deciding how validation errors should be represented. Done means blank titles and malformed or negative ids produce clear, consistent errors in the store, 400-style API responses, and readable CLI output.
Written by the indexing model from the issue text.
Description
Scope: Reject empty/whitespace-only titles in TaskStore.add (raise a clear validation error, e.g. ValueError or a new InvalidTask exception). Validate id lookups (e.g., non-integer or negative ids) before hitting storage, raising the same TaskNotFound/validation error consistently. Surface validation failures as 400-style responses in the API and readable errors in the CLI.
Acceptance criteria:
- Empty title via API/CLI/store returns a clear validation error, not a silently created blank task.
- Malformed id lookups return a clear error instead of an uncaught exception.
Notes: Builds on the unified error contract from item 2.
Context:
- Parent: #4
- Size: S
- Owner: Backend
- Depends On: #6
Part of the plan accepted for #4.
Related to #4
Generated by 🤖 Squad for #4 · copilot · auto · 54.9 AIC · ⌖ 26.1 AIC · ⊞ 19.7K · ◷
Comment /squad to run again
Add this agentic workflow to your repo
To install this agentic workflow, run
gh aw add bradygaster/squad/workflows/squad.md@bb5380b1ab5ceeb7d2ef3b3b0df4c364f9cada45
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bradygaster/squad-e4-validation
-
squad squad:docs
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
squad squad:tester
Difficulty 3/5 1-2 days Newbie friendliness 66/100
-
squad squad:backend
Difficulty 4/5 3-5 days Newbie friendliness 65/100
-
squad squad:backend
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
bradygaster/squad-e4-validation#4 · 14 comments ·
All issues in bradygaster/squad-e4-validation
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
UKGovernmentBEIS/inspect_ai#5802 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
no-human-ai/no_human#660 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
documentation need help question
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
phonology024/babelscribe#26 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100