Skip to content

[codex] Fix workflow creation transaction visibility#237

Merged
mbakgun merged 1 commit into
mainfrom
codex/fix-workflow-create-commit
Jun 20, 2026
Merged

[codex] Fix workflow creation transaction visibility#237
mbakgun merged 1 commit into
mainfrom
codex/fix-workflow-create-commit

Conversation

@mbakgun

@mbakgun mbakgun commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Commit a newly created workflow before returning it from the API.
  • Add a regression test for the immediate create-then-update flow.

Root cause

The JSON import flow creates a workflow and immediately updates it in a separate request. Returning after flush() left a window where the follow-up transaction could not see the new row and returned 404.

Validation

  • SECRET_KEY=test-secret-key-for-tests-only-32-bytes uv run pytest tests/test_workflow_create_commit.py
  • uv run ruff format --check app/api/workflows.py tests/test_workflow_create_commit.py
  • uv run ruff check app/api/workflows.py tests/test_workflow_create_commit.py
  • ./run_e2e.sh (21 passed)

@mbakgun mbakgun merged commit e69804e into main Jun 20, 2026
2 checks passed
@mbakgun mbakgun deleted the codex/fix-workflow-create-commit branch June 20, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant