[ORCH-008] Kill Authority Implementation #114

Closed
opened 2026-01-30 03:04:49 +00:00 by jason.woltje · 0 comments
Owner

Safety Critical: Kill Authority

Mosaic Stack MUST retain the ability to terminate any Orchestrator service (`apps/orchestrator/`) operation.

If the Orchestrator swarm goes rogue, Mosaic Stack can terminate everything.

Endpoints

Endpoint Purpose Auth
POST /api/orchestrator/tasks/:id/kill Kill single task Workspace member
POST /api/orchestrator/workspaces/:id/kill-all Kill all tasks in workspace Workspace admin
POST /api/orchestrator/emergency-stop Global emergency stop Super admin
DELETE /api/orchestrator/backends/:id Revoke backend entirely Super admin

Requirements

Hard Termination

• No graceful shutdown — immediate kill signal
• Orchestrator must honor kill within seconds
• Timeout + force if Orchestrator unresponsive

Audit Trail

All kill operations logged with:

[ ] Who initiated the kill
[ ] What was terminated (task IDs, session IDs)
[ ] Why (required reason field)
[ ] Timestamp
[ ] Task state at termination

UI Controls

[ ] Kill button per task (confirmation required)
[ ] Kill All button in workspace admin panel
[ ] Emergency Stop in super admin panel
[ ] Visual indicator for killed tasks

RBAC

• Workspace members can kill their own tasks
• Workspace admins can kill any task in workspace
• Super admin can emergency stop everything

Deliverables

[ ] Kill endpoint implementations
[ ] RBAC enforcement
[ ] Audit logging
[ ] UI integration (see #101)
[ ] Orchestrator kill signal implementation (see #102)

Dependencies

#99 Task Dispatcher Service
#102 Gateway Integration

#95 Agent Orchestration EPIC
#101 Task Progress UI
• ORCH-117 (Killswitch implementation in Orchestrator)

## Safety Critical: Kill Authority **Mosaic Stack MUST retain the ability to terminate any Orchestrator service (\`apps/orchestrator/\`) operation.** If the Orchestrator swarm goes rogue, Mosaic Stack can terminate everything. ## Endpoints | Endpoint | Purpose | Auth | |----------|---------|------| | POST /api/orchestrator/tasks/:id/kill | Kill single task | Workspace member | | POST /api/orchestrator/workspaces/:id/kill-all | Kill all tasks in workspace | Workspace admin | | POST /api/orchestrator/emergency-stop | Global emergency stop | Super admin | | DELETE /api/orchestrator/backends/:id | Revoke backend entirely | Super admin | ## Requirements ### Hard Termination • No graceful shutdown — immediate kill signal • Orchestrator must honor kill within seconds • Timeout + force if Orchestrator unresponsive ### Audit Trail All kill operations logged with: [ ] Who initiated the kill [ ] What was terminated (task IDs, session IDs) [ ] Why (required reason field) [ ] Timestamp [ ] Task state at termination ### UI Controls [ ] Kill button per task (confirmation required) [ ] Kill All button in workspace admin panel [ ] Emergency Stop in super admin panel [ ] Visual indicator for killed tasks ### RBAC • Workspace members can kill their own tasks • Workspace admins can kill any task in workspace • Super admin can emergency stop everything ## Deliverables [ ] Kill endpoint implementations [ ] RBAC enforcement [ ] Audit logging [ ] UI integration (see #101) [ ] Orchestrator kill signal implementation (see #102) ## Dependencies • #99 Task Dispatcher Service • #102 Gateway Integration ## Related • #95 Agent Orchestration EPIC • #101 Task Progress UI • ORCH-117 (Killswitch implementation in Orchestrator)
jason.woltje added this to the M6-AgentOrchestration (0.0.6) milestone 2026-01-30 03:05:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#114