Skip to content

Centralize deployment status constants for lifecycle and diagnostics states #22

Description

@renvoxit

Current status

This issue was created before lifecycle management was implemented.

Deployment statuses now include:

  • pending
  • running
  • success
  • failed
  • stopped
  • deleted

Stage 10 added lifecycle actions. Stage 11 added normalized failure handling. Stage 12 added diagnostics and consistency rules. Hardcoded status strings now carry more risk than when this issue was first created.

Goal

Centralize deployment status values to avoid duplicated hardcoded strings across deploy orchestration, lifecycle routes, cleanup, diagnostics, CRUD, schemas, and tests.

Scope

Introduce a constants module or enum for deployment statuses:

  • pending
  • running
  • success
  • failed
  • stopped
  • deleted

Use it where statuses are set or compared in backend code, especially:

  • deployment creation/orchestration
  • lifecycle endpoints
  • failure handling
  • diagnostics/resource auditor
  • tests where practical

Out of scope

  • Do not change API response values.
  • Do not change database schema.
  • Do not add new lifecycle behavior.
  • Do not change frontend behavior.

Acceptance criteria

  • Status values are defined in one central place.
  • Core backend flow avoids duplicated status literals where practical.
  • API responses remain backward-compatible.
  • Existing tests pass.
  • Diagnostics behavior remains unchanged.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions