Controller builds ExecuteCodeCommand without options
Handler builds the RabbitMQ CodeExecutionRequest without Options
Worker's CompileAndExecuteAsync calls _roslynExecutor.ExecuteFreePlayAsync(code, "UserSubmission", cancellationToken) -- no options
Result: server-side C# always uses defaults regardless of client toggle. Non-C# ExecuteNonCsharpFreePlayAsync does map options correctly; only C# is broken. WASM path also works.
Threaded CodeExecutionOptions end-to-end on the C# server path:
ExecuteCodeCommand -- added Options property
CSharpCodeRunnerController.Run -- now copies request.Options into the command
ExecuteCodeCommandHandler -- includes Options when serializing the queue payload
CodeExecutionWorkerService.ExecuteGeneralCodeAsync -- maps options via the existing MapCodeExecutionOptions helper and passes them to CompileAndExecuteAsync
CompileAndExecuteAsync -- new FreePlayCodeOptions? parameter; forwarded to _roslynExecutor.ExecuteFreePlayAsync(useImplicitUsings, useTopLevelStatements, ...)
**Resolved.**
Threaded `CodeExecutionOptions` end-to-end on the C# server path:
1. `ExecuteCodeCommand` -- added `Options` property
2. `CSharpCodeRunnerController.Run` -- now copies `request.Options` into the command
3. `ExecuteCodeCommandHandler` -- includes `Options` when serializing the queue payload
4. `CodeExecutionWorkerService.ExecuteGeneralCodeAsync` -- maps options via the existing `MapCodeExecutionOptions` helper and passes them to `CompileAndExecuteAsync`
5. `CompileAndExecuteAsync` -- new `FreePlayCodeOptions?` parameter; forwarded to `_roslynExecutor.ExecuteFreePlayAsync(useImplicitUsings, useTopLevelStatements, ...)`
Files changed:
- `SpikerSoft.Business/Domain/CodeExecution/Commands/ExecuteCode/ExecuteCodeCommand.cs`
- `SpikerSoft.Business/Domain/CodeExecution/Commands/ExecuteCode/ExecuteCodeCommandHandler.cs`
- `SpikerSoft.Api/Domain/CodeExecution/CSharpCodeRunnerController.cs`
- `SpikerSoft.EventHandlers.CodeExecution/Services/CodeExecutionWorkerService.cs`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: High (functionality)
Files:
SpikerSoft.Api/Domain/CodeExecution/CSharpCodeRunnerController.cs(~83-90)SpikerSoft.Business/Domain/CodeExecution/Commands/ExecuteCode/ExecuteCodeCommand.csSpikerSoft.Business/Domain/CodeExecution/Commands/ExecuteCode/ExecuteCodeCommandHandler.cs(~87-97)SpikerSoft.EventHandlers.CodeExecution/Services/CodeExecutionWorkerService.csCompileAndExecuteAsync(~724-733)Problem: Client sends
CodeExecutionRequest.Options(e.g.useImplicitUsings), but:ExecuteCodeCommandwithout optionsCodeExecutionRequestwithoutOptionsCompileAndExecuteAsynccalls_roslynExecutor.ExecuteFreePlayAsync(code, "UserSubmission", cancellationToken)-- no optionsResult: server-side C# always uses defaults regardless of client toggle. Non-C#
ExecuteNonCsharpFreePlayAsyncdoes map options correctly; only C# is broken. WASM path also works.Fix: Thread
Optionsthrough the entire chain: Controller -> Command -> Handler -> Queue payload -> Worker ->ExecuteFreePlayAsync(code, name, options, ct).Acceptance criteria:
useImplicitUsings: falsefrom client respected on server pathResolved.
Threaded
CodeExecutionOptionsend-to-end on the C# server path:ExecuteCodeCommand-- addedOptionspropertyCSharpCodeRunnerController.Run-- now copiesrequest.Optionsinto the commandExecuteCodeCommandHandler-- includesOptionswhen serializing the queue payloadCodeExecutionWorkerService.ExecuteGeneralCodeAsync-- maps options via the existingMapCodeExecutionOptionshelper and passes them toCompileAndExecuteAsyncCompileAndExecuteAsync-- newFreePlayCodeOptions?parameter; forwarded to_roslynExecutor.ExecuteFreePlayAsync(useImplicitUsings, useTopLevelStatements, ...)Files changed:
SpikerSoft.Business/Domain/CodeExecution/Commands/ExecuteCode/ExecuteCodeCommand.csSpikerSoft.Business/Domain/CodeExecution/Commands/ExecuteCode/ExecuteCodeCommandHandler.csSpikerSoft.Api/Domain/CodeExecution/CSharpCodeRunnerController.csSpikerSoft.EventHandlers.CodeExecution/Services/CodeExecutionWorkerService.cs