Skip to content

Add PostgreSQL-backed execution recovery - #91

Merged
sfloess merged 36 commits into
mainfrom
postgres-execution-recovery
Oct 20, 2026
Merged

sfloess merged 36 commits into
mainfrom
postgres-execution-recovery

Conversation

@sfloess

@sfloess sfloess commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Implement the existing synchronous ExecutionStateStore port using PostgreSQL JSONB.
  • Persist the complete versioned execution snapshot: intent, state, lifecycle, result, evidence, evaluations, metadata, and provenance.
  • Implement the existing FleetStateStore port using PostgreSQL JSONB so coordinator task snapshots and attempt history can survive a process restart.
  • Enforce create-only identities with primary keys and map duplicate identities to the existing conflict errors.
  • Add optional postgres dependencies and server configuration for FLOSSWARE_LOOM_POSTGRES_DSN / --postgres-dsn and FLOSSWARE_LOOM_FLEET_POSTGRES_DSN / --fleet-postgres-dsn.
  • Keep filesystem adapters available. PostgreSQL schemas/tables are initialized idempotently; connection pools close on normal shutdown and startup failures.
  • Add mocked adapter tests, server configuration tests, and live database recovery acceptance tests/scripts.

The runtime adapters own loom_runtime.execution_states and loom_runtime.fleet_states. They do not change the existing document/chunk corpus schema. The separate FlossWare/storage PR provides document/chunk/embedding and OrientDB provenance adapters; mapping those adapters to the existing knowledge corpus remains a separate host-acceptance requirement.

Validation

  • Security Audit passed on the preceding revision.
  • Python Quality Gate is rerunning after the latest server lifecycle and fleet-state changes.
  • Live PostgreSQL recovery requires disposable databases configured through both DSNs. It is not claimed as passed without a real connection.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ❌ 0 issues
Ruff format ❌
Tests ❌
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ❌ 0 issues
Ruff format ✅
Tests ✅
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ✅ 0 issues
Ruff format ✅
Tests ❌
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ❌ 0 issues
Ruff format ❌
Tests ❌
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ✅ 0 issues
Ruff format ❌
Tests ❌
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ❌ 0 issues
Ruff format ❌
Tests ❌
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ❌ 0 issues
Ruff format ❌
Tests ✅
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ❌ 0 issues
Ruff format ❌
Tests ❌
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ✅ 0 issues
Ruff format ❌
Tests ✅
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ❌ 0 issues
Ruff format ❌
Tests ❌
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ✅ 0 issues
Ruff format ✅
Tests ✅
Imports ✅
Version (X.Y) ✅

✅ All quality gates passed!

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ❌ 0 issues
Ruff format ❌
Tests ❌
Imports ✅
Version (X.Y) ✅

⚠️ Quality gates failed! Fix issues before merging.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
7.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@github-actions

Copy link
Copy Markdown

Quality Gate Report

Check Status
Ruff lint ✅ 0 issues
Ruff format ✅
Tests ✅
Imports ✅
Version (X.Y) ✅

✅ All quality gates passed!

@sfloess
sfloess marked this pull request as ready for review October 20, 2026 07:53
@sfloess
sfloess merged commit d864c30 into main Oct 20, 2026
5 of 6 checks passed
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