Skip to content

Add 19 activity route edge-case tests#775

Merged
selfcontained merged 1 commit into
mainfrom
agt_1618ebdcaccd/job-test-enforcer-65f17a56
Jul 15, 2026
Merged

Add 19 activity route edge-case tests#775
selfcontained merged 1 commit into
mainfrom
agt_1618ebdcaccd/job-test-enforcer-65f17a56

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Add 19 tests for the handleHistoryAgents, handleHistoryProjects, and handleHistoryAgentDetail route handlers covering edge cases not previously tested:
    • Sort/order whitelist safety (including SQL injection attempt in sort param)
    • LIKE wildcard escaping for % and _ in search queries
    • Limit/offset clamping (max, negative, zero defaults)
    • Agent type filtering
    • Date range filtering via start/end params
    • gitContext.repoRoot takes precedence over cwd for project grouping and filtering
    • Recipient messages included in agent detail
    • stateDurations computation from events
    • Zero token and multi-model token breakdown edge cases
  • Server test count: 2411 (up from 2392)

Test plan

  • All 63 activity route tests pass
  • Full server suite green (2411 passed, 8 skipped)
  • Full web suite green (200 passed)
  • Full E2E suite green (168 passed, 12 skipped)
  • Type checking passes

🤖 Generated with Claude Code

Cover sort/order whitelist safety, LIKE wildcard escaping, limit/offset
clamping, type filtering, date range filtering, gitContext project
resolution, recipient messages, stateDurations, and multi-model tokens.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@selfcontained
selfcontained merged commit eb8b3e9 into main Jul 15, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_1618ebdcaccd/job-test-enforcer-65f17a56 branch July 15, 2026 02:19
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