## Code Review: Ticket #125 - Status-Only Queue Workflow ❌ FAIL
### Summary
**CRITICAL ISSUE**: Breaking inconsistency between Rails and mcp-bridge. The PR removes `assign_ticket` from Rails but leaves it in mcp-bridge, causing 500 errors when called.
### Critical Issues
#### 1. assign_ticket Tool Not Fully Removed ❌
The architectural change to remove agent assignments is incomplete:
**Removed:**
- ✓ `assigned_agent_id` column from tickets table (migration)
- ✓ `belongs_to :assigned_agent` from Ticket model
- ✓ `has_many :assigned_tickets` from Agent model
- ✓ `assign_ticket` from Rails `mcp_controller.rb` (3 occurrences → 0)
**NOT Removed (BREAKING):**
- ❌ `mcp-bridge/src/tools/index.ts` - Still has `assign_ticket` tool registered (lines 285-307)
- ❌ `config/tinker/mcp_permissions.yml` - Still references `assign_ticket` in permissions for orchestrator/worker/reviewer/planner
**Impact:** When mcp-bridge tries to call `assign_ticket`, Rails returns "Tool not found" (404), breaking any workflows that rely on this tool.
### What Was Done Correctly ✓
#### Migration
`remove_assigned_agent_id_from_tickets.rb` properly removes:
1. Foreign key constraint
2. Index on `assigned_agent_id`
3. The `assigned_agent_id` column
#### Model Changes
- Ticket model: Removed `belongs_to :assigned_agent`
- Agent model: Removed `has_many :assigned_tickets`, removed `assign_ticket` from CAPABILITIES
#### API Changes
- `get_status` now returns `todo_tickets` instead of `unassigned_todo`
- `assignments#claim` uses status-based workflow (finds tickets in "todo" status)
#### Serializers
- TicketSerializer: Removed `assigned_agent` relationship (noted in comment)
- AgentSerializer: Removed `assigned_tickets_count` attribute (noted in comment)
#### UI Changes
- Removed assigned agent displays from views (kanban_card, subtask_card, ticket show, etc.)
- Removed `assigned_agent` field from AVO Ticket resource
### Required Fixes
To pass this audit, the PR must also:
1. **Remove from mcp-bridge:**
```typescript
// File: mcp-bridge/src/tools/index.ts
// DELETE lines 285-307 (assign_ticket tool registration)
```
2. **Remove from permissions:**
```yaml
# File: config/tinker/mcp_permissions.yml
# Remove assign_ticket from all role lists (orchestrator, worker, reviewer, planner)
```
### Architecture Concern
This is a significant architectural change that fundamentally alters how work is distributed. The change itself is sound (status-based queue is cleaner than assignment), but incomplete implementation will cause production issues.
### Recommendation
**FAIL AUDIT** - Add the missing mcp-bridge and permissions changes, then resubmit.