Skip to content

refactor(types): consolidate 15+ *Status enums sharing pending/running/completed/failed/cancelled #6973

Closed

Description

@mrveiss

Discovery

A grep over autobot-backend/ for class .+Status.*Enum.*: returns 15+ separate status enums, most of which share the canonical job-lifecycle values pending/running/completed/failed/cancelled:

File Enum
project_state_manager.py ValidationStatus
enterprise_feature_manager.py FeatureStatus
async_chat_workflow.py KnowledgeStatus
phase_progression_manager.py PhasePromotionStatus
temporal_knowledge_manager.py FreshnessStatus
integrations/base.py IntegrationStatus
workflow_scheduler.py WorkflowStatus
orchestrator.py WorkflowStatus ← defined twice
enhanced_memory_manager_async.py TaskStatus
planner/types.py StepStatus, PlanStatus
utils/todowrite_optimizer.py TodoStatus
utils/service_registry.py ServiceStatus
utils/task_queue.py TaskStatus ← also defined twice (different from memory_manager one)
utils/monitoring_alerts.py AlertStatus

Two separate WorkflowStatus and two separate TaskStatus are independent definitions that drift over time. The ARC Prize plugin design surfaced this when picking the status enum for Run and SolverExecution — there is no canonical JobStatus to reuse.

Proposed change

Mirror the approach in #6689 (Severity / RiskLevel consolidation):

  1. Define autobot_shared/constants/status_enums.py:JobStatus with the canonical lifecycle: PENDING, RUNNING, SUCCEEDED, FAILED, TIMEOUT, CANCELLED, COMPLETED
  2. Audit the 15+ existing enums — for each, decide:
    • Reuse JobStatus directly (likely most cases)
    • Extend via class <Specific>Status(str, Enum) reusing canonical values + adding domain-specific ones (e.g., IntegrationStatus.CONFIGURED doesn't fit lifecycle)
    • Keep if genuinely orthogonal (e.g., FreshnessStatus is data-age semantics, not lifecycle)
  3. Resolve the two WorkflowStatus and two TaskStatus duplicates — pick one canonical, migrate callers, delete the other.
  4. Add a pre-commit lint rule rejecting new *Status(Enum) definitions outside constants/status_enums.py unless explicitly whitelisted.

Acceptance criteria

  • Per-enum classification document (reuse / extend / keep)
  • JobStatus defined in autobot_shared/constants/
  • Reusable enums migrated; callers updated
  • Two duplicates (WorkflowStatus × 2, TaskStatus × 2) resolved
  • Pre-commit rule blocking new ad-hoc Status enums
  • No call-site regressions (grep pre-/post for each removed name)

Related

Activity

  1. github-actions commented on May 8, 2026

    @github-actions
    Contributor

    PR #7266 (merged to Dev_new_gui) references this issue with a close keyword.

    *refactor(types): consolidate Workflow/Job Status enums + add lint rule (closes #6973)

    If this issue is fully resolved, close it manually. If work remains, no action is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions