Skip to content

.NET: fix: race concdition in workflow formula state - #8252

Merged
Vincent Biret (baywet) merged 3 commits into
mainfrom
fix/formula-state
Sep 11, 2026
Merged

.NET: fix: race concdition in workflow formula state#8252
Vincent Biret (baywet) merged 3 commits into
mainfrom
fix/formula-state

Conversation

@baywet

Copy link
Copy Markdown
Member

fixes a race condition in the workflow formula state

Copilot AI balanced review requested due to automatic review settings September 10, 2026 14:54
@agent-framework-automation agent-framework-automation Bot added .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Sep 10, 2026
@github-actions github-actions Bot changed the title fix: race concdition in workflow formula state .NET: fix: race concdition in workflow formula state Sep 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall line coverage in commit e6ca55a in the fix/formula-state branch is 84%. Line coverage data for the main branch is not yet available.

Show a line coverage summary of the most covered files.
File main fix/formula-state e6ca55a +/-
/home/runner/wo...valConverter.cs 100%
/home/runner/wo...entsProvider.cs 99%
/home/runner/wo...nticAnalyzer.cs 94%
/home/runner/wo...tClientAgent.cs 91%
/home/runner/wo...putConverter.cs 90%
/home/runner/wo...kflowBuilder.cs 90%
/home/runner/wo...kflowSession.cs 87%
/home/runner/wo...SkillsSource.cs 86%
/home/runner/wo...onExtensions.cs 81%
/home/runner/wo...ctionVisitor.cs 70%

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@baywet
Vincent Biret (baywet) added this pull request to the merge queue Sep 11, 2026
Merged via the queue into main with commit 14b9f1d Sep 11, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants