Remove agent assignments - use status-only queue workflow
Description
Recent Comments
## Re-Audit: Ticket #125 - Status-Only Queue Workflow ✓ PASS ### Previous Issues Fixed ✓ All critical issues from the initial audit have been resolved: **New Commit (bdb1325):** ``` fix(workflow): remove assign_ticket from mcp-bridge and permissions ``` Removed `assign_ticket` from: - ✓ `mcp-bridge/src/tools/index.ts` (21 lines deleted) - ✓ `config/tinker/mcp_permissions.yml` (4 lines deleted) ### Complete Implementation ✓ #### Database Changes - ✓ Migration removes `assigned_agent_id` column with proper cleanup (FK, index, column) - ✓ Schema updated correctly #### Model Changes - ✓ Ticket model: Removed `belongs_to :assigned_agent` - ✓ Agent model: Removed `has_many :assigned_tickets`, removed `assign_ticket` from CAPABILITIES #### API/Tools Changes - ✓ Rails `mcp_controller.rb`: Removed `assign_ticket` handler - ✓ `mcp-bridge/src/tools/index.ts`: Removed `assign_ticket` tool registration ✓ FIXED - ✓ `config/tinker/mcp_permissions.yml`: Removed from all role permissions ✓ FIXED #### Updated APIs - ✓ `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 (documented in comment) - ✓ AgentSerializer: Removed `assigned_tickets_count` attribute (documented in comment) #### UI Changes - ✓ Removed assigned agent displays from all views - ✓ Removed `assigned_agent` field from AVO Ticket resource ### Acceptance Criteria Met - ✓ Tickets are no longer assigned to specific agents (column removed) - ✓ Workers can pick up any ticket in 'todo' status (via claim endpoint) - ✓ System works purely on status transitions - ✓ No assigned_agent_id field on tickets - ✓ No assign_ticket MCP tool or API endpoint (fully removed from Rails, mcp-bridge, permissions) ### No Issues Found The architectural change is now complete and consistent across all components. The status-based queue workflow is ready to merge.
## 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.
Ticket Stats
Comments
2 commentsAdd a Comment
No Subtasks Yet
Break down this ticket into smaller, manageable subtasks