Repository navigation
Bound Dapper save retries under sustained ownership-preserving churn - #287
Conversation
sfmskywalker
left a comment
There was a problem hiding this comment.
Elsa 3 Code Review: APPROVE + HIGH @ a24de29
Independent review by core_integration_qa, reported by the integrating lead. No findings in the committed two-file change. Five attempts terminate sustained same-owner delete/reinsert churn with a descriptive exception instead of false success or an ownership/insert fallback. Scoped writes, ordinary success/missing-row cases, duplicate retry, and cancellation priority remain unchanged.
The regression uses actual SQLite/PostgreSQL deletes before UPDATE and inserts before SELECT. Its distinct safety exception bounds the pre-fix failure and cannot satisfy the production exception assertion. Independently parsed raw TRX: both red cases failed as expected; ownership 28/28 and complete source persistence 100/100 passed, zero failures/skips. Committed head matches, worktree is clean, and whitespace checks pass.
Hosted source CI remains a separate merge requirement and was still running at review time.
A repeated same-tenant delete/reinsert race can keep a Dapper key-value save retrying indefinitely when the caller does not supply cancellation. Limit the owned-update retry loop to five attempts, then throw a descriptive concurrency failure without claiming that the requested value was saved.
The regression uses actual SQLite/PostgreSQL deletes and inserts around missed updates. It verifies termination and retained ownership/value; a test-only safety guard makes the previous unbounded implementation fail promptly. Existing normal updates, equal-value saves, insertion races, foreign ownership rejection, and cancellation behavior remain covered.
Validation: both SQLite/PostgreSQL regressions failed before the fix; the complete source persistence Dapper suite passed 100/100 afterward, including all 28 ownership cases, with zero skips. Independent code review found no issues. This is the final review follow-up for Core #8624 and is mapped into Core alongside the source change.
No schema, package, public API, version, or publishing-workflow change. Merge with a merge commit and
[skip ci]in the subject to suppress automatic source publication.Refs elsa-workflows/elsa-core#8623, elsa-workflows/elsa-core#8624.