Skip to content

Add workflow state rehydration diagnostics - #7899

Merged
sfmskywalker merged 1 commit into
release/3.8.0from
codex/7772-state-rehydration-diagnostics
Jul 30, 2026
Merged

Add workflow state rehydration diagnostics#7899
sfmskywalker merged 1 commit into
release/3.8.0from
codex/7772-state-rehydration-diagnostics

Conversation

@sfmskywalker

Copy link
Copy Markdown
Member

Summary

  • log structured warnings when workflow-state rehydration cannot resolve an activity execution context
  • log structured warnings when completion callback owners or child nodes cannot be resolved
  • classify skips as migration-compatible or unexpected by comparing persisted and target definition version IDs
  • include workflow, definition, context, owner, and child identifiers for querying and alerting

Root cause

WorkflowStateExtractor intentionally skipped unresolved references to preserve workflow migration compatibility, but those paths emitted no diagnostics. The same silent behavior also concealed stale or inconsistent same-version state.

Impact

Existing skip behavior remains unchanged, including intentional migration scenarios. Operators now receive structured warnings that distinguish expected migration cleanup from potentially inconsistent persisted state.

Validation

  • dotnet test test/unit/Elsa.Workflows.Core.UnitTests/Elsa.Workflows.Core.UnitTests.csproj --no-restore — 202 passed
  • dotnet build src/modules/Elsa.Workflows.Core/Elsa.Workflows.Core.csproj --no-restore — succeeded for net8.0, net9.0, and net10.0 with 0 warnings/errors
  • git diff --check

Fixes #7772

@sfmskywalker
sfmskywalker merged commit edb5f7c into release/3.8.0 Jul 30, 2026
2 of 4 checks passed
@sfmskywalker
sfmskywalker deleted the codex/7772-state-rehydration-diagnostics branch July 30, 2026 00:28
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