Skip to content

Commit 74f6842

Browse files
committed
flow: reset static BodyThrowEdges at startup (CodeRabbit — sticky in-process state)
BodyThrowEdges is static and was only ever SET, so a prior IN-PROCESS invocation with --body-throw-edges could leak into a later run that did not request it (the CLI normally runs as a fresh process, but a static set-once field is fragile if it is ever embedded/tested in-process). Reset it to false before arg parsing. The other config (emitEvents/flowLocals/reportStats) are locals, re-initialized each call, so only this static field needs the reset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED
1 parent 47ef5f8 commit 74f6842

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎frontend/roslyn/OwnSharp.Extractor/Program.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
// harmless MemoryStream/StringWriter dispose-on-throw), so the shipped posture stays low-FP; the
5353
// oracle turns it on to measure full recall. Read deep in InjectThrowEdge via the static
5454
// Program.BodyThrowEdges (declared at end of file) rather than threaded through the flow recursion.
55+
// Reset the static field up front so a flag from a prior IN-PROCESS invocation can't leak into a
56+
// run that did not request it (the other config — emitEvents/flowLocals/reportStats — are locals,
57+
// re-initialized each call, so they need no reset; only this static one does). CodeRabbit.
58+
BodyThrowEdges = false;
5559
for (int i = 0; i < args.Length; i++)
5660
{
5761
if (args[i] == "-o" && i + 1 < args.Length) outPath = args[++i];

0 commit comments

Comments
 (0)