Skip to content

[Bug] Preserve EF workflow snapshot state during atomic document updates #8300

Description

@sfmskywalker

Program: #8194
Parent: #8286
Related: #8292, #8287

Evidence and scope

The actual SQLite-backed BPMN caller proof for #8292 found that EFCoreWorkflowDefinitionStore.TryUpdateLatestAsync loads with AsNoTracking, losing the shadow Data column before OnLoadAsync. An unchanged persisted definition therefore fails the full snapshot precondition. Root reproduced 7 passing / 1 failing caller tests, then 8 passing after tracking the load and detaching before the callback.

This task owns the EF-specific correction separately from the caller contract in #8292. Keep changes bounded to correctness exercised by SQLite-backed document updates.

Acceptance

  • Load and compare persisted shadow metadata correctly; detach before executing the mutation callback so a new draft cannot implicitly alter its published predecessor.
  • Persist notification-handler name/description and serialized metadata changes on a successful same-row edit.
  • Prove concurrent document and metadata winners survive and the stale caller is rejected, using independent scopes and fresh reads of a real SQLite database.
  • Cover both editing a draft and creating a draft from a published definition.
  • Run the full BPMN integration suite and relevant provider build checks. Do not represent SQLite coverage as proof for other databases or production migrations.
  • Deliver a focused reviewed PR. Package publication and cutover are outside this task.

Activity

  1. sfmskywalker commented on Sep 23, 2026

    @sfmskywalker
    MemberAuthor

    PR #8303 supplies the actual SQLite-backed caller proof and the bounded EF provider correction. Root reproduced both shadow-state loss and dropped handler names, then verified 127/127 BPMN integration tests (zero skips) and EF builds for net8/net9/net10. The PR is open; checks/review must pass before delivery is accepted. The synthetic tests do not prove production migrations or simultaneous SQL transactions.

  2. sfmskywalker commented on Sep 23, 2026

    @sfmskywalker
    MemberAuthor

    Accepted delivery: PR #8303 merged as bd379e12fa463576f2fe81ef1e9bf206ea3067ab from reviewed head 90a212392a20a7d6fb557574ec55a6907d3adae3. The complete BPMN integration suite passed 127/127 (zero skips), including SQLite-backed competing writers against both draft and published definitions. The final path-only change passed all four SQLite cases; current-head CI and 5/5 review passed, with all review threads resolved. EF builds passed net8/net9/net10. The persistence-backed gate is now delivered; database upgrade and broader provider/consolidated compatibility remain separate gates. Merge publication was suppressed with [skip ci]; observed merge-head runs are dynamic code-quality checks, not package publishing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions