This commit fixes 4 production bugs found via edge case testing: 1. BUG: System allowed assigning issues to terminated agents - Added validation in issue creation endpoint - Added validation in issue update endpoint - Added validation in issue assign endpoint 2. BUG: Issues remained orphaned when agent was terminated - Agent termination now auto-unassigns all issues from that agent These bugs could lead to issues being assigned to non-functional agents that would never work on them, causing work to stall silently. Tests added in tests/api/routes/syndarix/test_edge_cases.py to verify: - Cannot assign issue to terminated agent (3 variations) - Issues are auto-unassigned when agent is terminated - Various other edge cases (sprints, projects, IDOR protection) Coverage: 88% → 93% (1830 tests passing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
30 KiB
30 KiB