Skip to content

[AEW E2E] Add case-insensitive task search - #3

Draft
chen-gdp wants to merge 2 commits into
mainfrom
issue/1-aew-e2e-add-case-insensitive-task-search-impl
Draft

[AEW E2E] Add case-insensitive task search#3
chen-gdp wants to merge 2 commits into
mainfrom
issue/1-aew-e2e-add-case-insensitive-task-search-impl

Conversation

@chen-gdp

Copy link
Copy Markdown
Owner

Summary

Add an optional q query parameter to GET /tasks for case-insensitive substring matching on task titles. Composes with the existing completed filter.

Spec Source: specs/issue/1-aew-e2e-add-case-insensitive-task-search/spec.md

Key Changes

  • Add q: str | None = Query(default=None) parameter to the list_tasks endpoint
  • Strip leading/trailing whitespace from q; blank or whitespace-only q preserves current behavior
  • Apply case-insensitive substring filter: q.lower() in task.title.lower()
  • Compose q filter conjunctively with existing completed filter
  • Add 6 test cases covering match, no match, blank, whitespace-only, case-insensitive, and composition with completed
Area What changed Reviewer focus
API src/task_api/main.py:48list_tasks signature + filter logic Correctness of filter composition, whitespace handling
Tests tests/test_api.py — 6 new test functions Coverage of edge cases, regression of existing behavior

How to Test

Step Command Expected result
1 uv run --extra test pytest -v 10/10 tests pass (4 existing + 6 new)
2 uv run --extra test pytest -v -k "test_search_q" 6/6 q-related tests pass
3 uv run --extra test python -c "from fastapi.testclient import TestClient; from task_api.main import create_app; api = TestClient(create_app()); api.post('/tasks', json={'title': 'Test item'}); r = api.get('/tasks', params={'q': 'test'}); assert len(r.json()) == 1; print('Manual check OK')" Manual behavior check passes

Related Issues

Closes #1

Author Checklist

  • Synced with latest main branch
  • All tests pass (10/10)
  • Spec validation passed

Additional Notes

  • Backward-compatible: q defaults to None, existing callers unaffected.
  • Single-slice PR (PR-001), no stacked dependencies.

chen-gdp added 2 commits July 26, 2026 23:49
Add optional q query parameter to GET /tasks for case-insensitive
substring matching on task titles. Composes with existing completed
filter.

Test tasks T001-T006 and implementation tasks T007-T010 complete.
@chen-gdp chen-gdp self-assigned this Jul 26, 2026

@chen-gdp chen-gdp left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary — ✅ Approved

@chen-gdp Implementation is clean, correct, well-tested, and fully aligned with the approved spec.

Reviewed: c41857c39787f992e015e130f764924037d6db72 against main

Notes

  • ✅ 10/10 tests passing (4 existing + 6 new)
  • ✅ Backward compatible — existing tests pass without modification
  • ✅ All 6 spec coverage categories are matched by dedicated test cases
  • ✅ No scope expansion, no security concerns, minimal diff

Validation

  • uv run --extra test pytest — 10/10 passed
  • ✅ Spec alignment confirmed — implementation matches spec.md design exactly

@chen-gdp

Copy link
Copy Markdown
Owner Author

@chen-gdp implementation PR ready for human review

This implementation delivers case-insensitive task search as specified in the approved spec. Please review at your convenience.

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.

[AEW E2E] Add case-insensitive task search

1 participant