Repository navigation
Closed
Labels
Description
Problem
The same concepts have different names throughout the codebase, causing confusion:
Table Naming
The schedule_executions table stores ALL execution types (manual tasks, public chat, paid chat, MCP calls, scheduled runs) despite its name implying schedules only. The schedule_id column uses "__manual__" as a magic sentinel for non-scheduled executions.
Vocabulary Chaos
| Concept | Names Used | Where |
|---|---|---|
| A headless agent run | "task", "execution", "parallel task", "headless execution" | UI says "Tasks", DB is schedule_executions, service is TaskExecutionService |
| The DB record | "execution", "task_execution", "schedule_execution" | create_task_execution() writes to schedule_executions |
| Execution ID | execution_id, task_execution_id, id (queue), schedule_execution_id |
Different names per router |
| Claude Code session | session_id, resume_session_id, claude_session_id |
Three names, same concept |
| Who started it | triggered_by, source |
Values: schedule, manual, mcp, agent, public, paid |
Required Changes
- Rename table:
schedule_executions→task_executions(with migration) - Make
schedule_idnullable instead of using"__manual__"sentinel - Standardize ID naming: Use
execution_ideverywhere (nottask_execution_id) - Standardize session naming: Use
claude_session_idfor Claude Code sessions,execution_idfor our tracking - Add
execution_typecolumn:chat | task | schedule | public | paidto distinguish execution origins cleanly - Update all references across backend, scheduler, frontend, and MCP server
Impact
- Database migration required (rename + add column)
- All Python code referencing
schedule_executionsmust update - Frontend API calls must update
- Scheduler database layer must update
Files to Change
src/backend/db/schema.py— table rename + migrationsrc/backend/db/schedules.py— all query methodssrc/backend/database.py— delegation methodssrc/scheduler/database.py— scheduler DB layersrc/backend/routers/chat.py— ID referencessrc/backend/routers/schedules.py— execution queriessrc/backend/services/task_execution_service.py— creation callssrc/frontend/src/stores/agents.js— API calls
Activity
vybe commentedon Mar 12, 2026
Closing: Table rename deferred. The vocabulary confusion (#92) was addressed by standardizing TaskExecutionStatus enum. The table remains schedule_executions — a more invasive rename was deemed unnecessary after #92 solved the core status value inconsistency.
rgsaura commentedon Nov 20, 2026
Owner decision on the reviewer-flagged residual (hint-endpoint enumeration differential): accept the small signal in favor of the better hint UX (password-advertising accounts distinguishable from unknown/email-code-only addresses). The uniform-hint alternative is rejected for now; revisit only if enumeration concerns escalate.
#93 remains open until the sign-in preference ships (target v1.7.28) and is verified live.