IModuleScheduler.CancelPendingModules(bool cancelModuleResultAwaiters = true) defaults to true, but every production call site (three in ModuleExecutor, one in DistributedModuleExecutor) passes false — cancelled modules now get their typed completion sources completed with PipelineTerminated results via RegisterTerminatedResultsForCancelledModules instead of being cancelled. That leaves the entire true-branch machinery dead: ModuleCompletionSourceCanceller (a reflection/expression-compiling cache whose only caller is the unreachable branch at ModuleStateTracker.cs:293) and the public IGeneratedModuleRuntime.CancelCompletionSource member it dispatches to (GeneratedModuleMetadata.cs:211).
This is leftover scaffolding from the pre-fix cancellation strategy and a trap: any future caller using the default true would cancel typed awaiters that the result registrar expects to complete with results.
Fix: remove the parameter, the canceller class, and the generated-runtime hook (coordinate with the source generator since IGeneratedModuleRuntime is public).
Evidence: src/ModularPipelines/Engine/IModuleScheduler.cs:60, src/ModularPipelines/Engine/ModuleStateTracker.cs:288-295, src/ModularPipelines/Engine/ModuleCompletionSourceCanceller.cs:1-58, src/ModularPipelines/Engine/GeneratedModuleMetadata.cs:211, src/ModularPipelines/Engine/ModuleExecutor.cs:161,202,249, src/ModularPipelines/Distributed/Master/DistributedModuleExecutor.cs:185
Raised by the v4 scoping audit round 3 — umbrella #3239.
IModuleScheduler.CancelPendingModules(bool cancelModuleResultAwaiters = true)defaults to true, but every production call site (three in ModuleExecutor, one in DistributedModuleExecutor) passesfalse— cancelled modules now get their typed completion sources completed with PipelineTerminated results viaRegisterTerminatedResultsForCancelledModulesinstead of being cancelled. That leaves the entire true-branch machinery dead:ModuleCompletionSourceCanceller(a reflection/expression-compiling cache whose only caller is the unreachable branch atModuleStateTracker.cs:293) and the publicIGeneratedModuleRuntime.CancelCompletionSourcemember it dispatches to (GeneratedModuleMetadata.cs:211).This is leftover scaffolding from the pre-fix cancellation strategy and a trap: any future caller using the default
truewould cancel typed awaiters that the result registrar expects to complete with results.Fix: remove the parameter, the canceller class, and the generated-runtime hook (coordinate with the source generator since
IGeneratedModuleRuntimeis public).Evidence:
src/ModularPipelines/Engine/IModuleScheduler.cs:60,src/ModularPipelines/Engine/ModuleStateTracker.cs:288-295,src/ModularPipelines/Engine/ModuleCompletionSourceCanceller.cs:1-58,src/ModularPipelines/Engine/GeneratedModuleMetadata.cs:211,src/ModularPipelines/Engine/ModuleExecutor.cs:161,202,249,src/ModularPipelines/Distributed/Master/DistributedModuleExecutor.cs:185Raised by the v4 scoping audit round 3 — umbrella #3239.