From 3aeb2670999b31234d43ca9c794a4be427b3f0bd Mon Sep 17 00:00:00 2001 From: Jesse Liberty Date: Mon, 28 Sep 2026 06:14:12 -0400 Subject: [PATCH] fix: improve null check in workflow edge conditions for author revisions --- BlogWorkflow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BlogWorkflow.cs b/BlogWorkflow.cs index 3bb0591..d47d54c 100644 --- a/BlogWorkflow.cs +++ b/BlogWorkflow.cs @@ -47,7 +47,7 @@ public async Task RunAsync( // Review only the initial author pass. A rejected review can route back // to the author once, but the capped revision is terminal output. .AddEdge(authorExecutor, reviewerExecutor, - condition: s => s?.RevisionNumber < ResearchState.MaxRevisions) + condition: s => s is not null && s.RevisionNumber < ResearchState.MaxRevisions) // Bounded revision loop: route back to the author only while the draft // still needs work and the revision cap has not been reached. .AddEdge(reviewerExecutor, authorExecutor, condition: s => s?.NeedsRevision == true)