docs: clarify store transaction boundaries

This commit is contained in:
lda
2026-06-09 20:22:15 +07:00 Verified
parent d0c2153258
commit efe80effbc
7 changed files with 152 additions and 5 deletions
+6 -1
View File
@@ -30,7 +30,12 @@ class RunStore:
class FileRunStore(RunStore):
"""JSON file-backed stopped-run store for local development and tests."""
"""JSON file-backed stopped-run store for local development and tests.
The internal lock protects individual writes inside one process only.
`WorkflowRunApi.resume_run()` owns the same-process read/execute/write
critical section; multi-worker deployments need a transactional store.
"""
def __init__(self, root: Path) -> None:
self.root = root
+6 -1
View File
@@ -56,7 +56,12 @@ class WorkflowArtifactStore:
class FileWorkflowArtifactStore(WorkflowArtifactStore):
"""JSON file-backed artifact store for local development and tests."""
"""JSON file-backed artifact store for local development and tests.
This store validates paths and performs simple file writes/deletes. API
services own multi-step policies such as "do not delete referenced
artifacts"; use a transactional store for multi-process safety.
"""
def __init__(self, root: Path) -> None:
self.root = root