Skip to content

[codex] Fix HTTP workflow and activity fallback guards#7723

Draft
sfmskywalker wants to merge 1 commit into
release/3.8.0from
codex/http-middleware-and-converter-fixes
Draft

[codex] Fix HTTP workflow and activity fallback guards#7723
sfmskywalker wants to merge 1 commit into
release/3.8.0from
codex/http-middleware-and-converter-fixes

Conversation

@sfmskywalker

Copy link
Copy Markdown
Member

Summary

  • move the Elsa base-path gate ahead of route matching so non-Elsa requests skip route resolution
  • always restore HttpContext.RequestAborted in the timeout wrapper, including exception and cancellation paths
  • fall back to the in-memory workflow state when fault handling cannot reload the workflow instance
  • replace the NotFoundActivity null-forgiving fallback with an explicit guard and clear deserialization error

Root Cause

  • the middleware resolved routes before confirming the request was even under the Elsa base path
  • the timeout helper restored RequestAborted only on the success path
  • fault handling assumed workflow-instance reload would always succeed
  • activity deserialization assumed the NotFoundActivity descriptor was always registered

Validation

  • dotnet test test/unit/Elsa.Http.UnitTests/Elsa.Http.UnitTests.csproj --filter FullyQualifiedName~HttpWorkflowsMiddlewareTests
  • dotnet test test/unit/Elsa.Workflows.Core.UnitTests/Elsa.Workflows.Core.UnitTests.csproj --filter FullyQualifiedName~ActivityJsonConverterTests /p:CollectCoverage=false

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant