Skip to content

Persist workflow state transitions to DB, add migration, integration test, and fixes.#1

Merged
jumping2000 merged 2 commits into
masterfrom
feat/persist-workflow-db
May 23, 2026
Merged

Persist workflow state transitions to DB, add migration, integration test, and fixes.#1
jumping2000 merged 2 commits into
masterfrom
feat/persist-workflow-db

Conversation

@jumping2000
Copy link
Copy Markdown
Owner

Summary

Persist workflow state transitions to DB, add migration, integration test, and fixes.

Key changes

  • backend/app/workflows/execution/runner.py — persist states + guard fatal trigger
  • backend/app/api/routes/workflow.py — use DB for start/get/approve/retry
  • backend/app/db/models.pyowner_id made nullable
  • backend/app/db/__init__.py — export session for tests
  • backend/app/tests/test_workflow_persistence.py — integration test + ASGITransport fix
  • backend/alembic/versions/20260523_001_initial_workflows.py — migration skeleton
  • backend/pyproject.toml — hatch build config for editable installs

Verification

  1. From backend/:
uv pip install -r requirements-dev.txt
uv run pytest -q

Expected: 34 passed (full suite)

Notes

  • The branch contains additional test stubs and small fixes to make tests run in an isolated environment.
  • Migration should be reviewed before applying to production Postgres (timestamps/defaults, UUID types).

@jumping2000 jumping2000 merged commit 764ee5a into master May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant