Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ClawFlow currently persists execution state only as JSON files. This adds explicit SQLite and PostgreSQL backends for checkpoints, memoized outputs, traces, running-step state and pending approvals, while keeping JSON as the default.
storage.backend: "sqlite"(Node 22.13+, built-in SQLite/WAL) or"postgres"withconnectionStringEnvand a stable namespace. Initialization is lazy and versioned; a database failure never falls back to files.listSubRuns) with actual IDs and authenticated HTTP run reads/approval actions. Approval acknowledges only after its durable claim; SQL storage errors return 503.includeOldest: true/include_oldest=1returns the oldest matching checkpoint ID/timestamp before pagination. SQL count, metadata and page share one read transaction; child runs are excluded from root diagnostics.createStateStoreandimportJsonState; provide an explicit offline JSON migration command that preserves source files and rejects conflicts. README covers configuration, migration, backup, permissions and boundaries.Validation: build and all 302 tests passed on Node 22.22.3 and Node 24.22.2 with native SQLite and an isolated real PostgreSQL 15 instance. The current head passes CI on both majors with PostgreSQL 16. Includes restart/resume, concurrent mutations/resumes, transaction rollback, nested retries, pagination, retention, migration, plugin reads, cancellation races, event isolation and database-unavailable behavior. The documented migration CLI was exercised and its result read through built exports. CI now provisions PostgreSQL 16 and runs the same suite.
Rollout: this does not switch installations, change the Clawnify pin or deploy anything. Flow definitions, versions, trigger schedules and memory files remain in the workspace. Managed hook/CAP/sleep integration is reviewed in https://github.com/clawnify/clawnify/pull/2814; enabling SQL still requires that integration and a backup/restore canary. Execution storage remains separate from central history. PostgreSQL namespaces isolate keys, not permissions; operators must use database roles/schema grants for security isolation.
Dependency audit still reports the unchanged baseline optional
openclaw@0.0.1and developmentesbuild@0.27.4advisories; no new PostgreSQL driver advisory was reported.