.NET: fix: race concdition in workflow formula state - #8252
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Shared mutable formula state and concurrent reset/restore lifecycle behavior require deeper verification under truly overlapping session execution.
Pull request overview
This PR attempts to prevent declarative workflow formula state from leaking between hosted-agent sessions by snapshotting initialized scopes, resetting executors, and restoring checkpoint state.
Changes:
- Captures and restores initial Power Fx scope values.
- Resets shared executor formula state and restores it after checkpoint recovery.
- Adds explicit- and implicit-session isolation tests with a recording provider.
File summaries
| File | Description |
|---|---|
DeclarativeWorkflowTest.cs |
Adds hosted-agent session-isolation tests and test provider. |
WorkflowFormulaState.cs |
Adds initial-state snapshots and reset/restore behavior. |
DelegateActionExecutor.cs |
Resets formula state during executor reset. |
DeclarativeWorkflowExecutor.cs |
Resets and restores root workflow state. |
DeclarativeActionExecutor.cs |
Resets formula state during action reset. |
DeclarativeWorkflowBuilder.cs |
Captures state after workflow initialization. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): ebbb07fecbf9
Model: gpt-5.6-sol-fast
Overview
No publishable findings were identified in the reviewed scope.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Code Coverage OverviewLanguages: C# C# / code-coverage/dotnetThe overall line coverage in commit e6ca55a in the Show a line coverage summary of the most covered files.
|
There was a problem hiding this comment.
MAF Automated Review — Iteration 2
Result: No findings
Scope: 11 net-new commit(s): d7823b2f3343, b9dbe4f801a8, c37de519ba5c, a6eb2991ddcc, 5a8cef940916, 4d173b24007d, eddccc474c07, 3abfddffc556, e4309e5456c4, dd3714052479, e6ca55ab04f7
Model: gpt-5.6-sol-fast
Overview
No publishable findings were identified in the reviewed scope.
Reviewed the supplied incremental change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
fixes a race condition in the workflow formula state