Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72zack

Relationships

#3255 rollbackOnFailure methods fail when run as a workflow step

Opened by stack72 · 10/11/2026· Shipped 10/13/2026

Summary

A model method that declares rollbackOnFailure: true fails whenever it runs as a workflow step, with:

rollbackVersions is not supported in composite repository

(or saveDeferred / advanceLatestMarkers is not supported in composite repository).

Cause

Workflow steps write through a CompositeUnifiedDataRepository (persistent repo plus the run's ephemeral store), built in DefaultStepExecutor.buildDeps and the WorkflowExecutionService constructor in src/domain/workflows/execution_service.ts. Every workflow entry point (swamp workflow run, workflow resume, swamp serve) passes an ephemeral store, so the composite is always used. Its saveDeferred, finalizeVersionDeferred, advanceLatestMarkers and rollbackVersions all throw (src/domain/data/composite_data_repository.ts). InProcessExecutor uses those for rollbackOnFailure methods (deferred writes promoted on success, rolled back on failure). This has been the case since rollbackOnFailure was added in 760b15b7.

Direct swamp model method run works because it uses the plain filesystem repository.

Reproduction

Register or install a model whose method declares rollbackOnFailure: true and writes a resource, then run it from a workflow step. The step fails with the error above. Found while writing integration/workflow_auto_gc_test.ts for swamp-club#3251.

Expected

Deferred writes in a workflow step route to the repository that owns the data (persistent or ephemeral by lifetime), as save does, so rollbackOnFailure methods work in workflows.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 22 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/13/2026, 6:57:59 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/12/2026, 1:53:24 AM
zack assigned zack10/13/2026, 5:32:02 PM

Sign in to post a ripple.