CSharpCodeRunnerController (route api/CSharpCodeRunner) is no longer C#-specific. It is the shared code-execution endpoint for the C#, Python, and JavaScript playgrounds — all three frontends POST to /api/CSharpCodeRunner/run and /api/CSharpCodeRunner/lesson and signal their language via metadata.language. The C#-centric name is misleading and was the proximate cause of the recent #280 regression (a dev hardcoded metadata.language = "csharp" in the controller, assuming it only served C#, which broke JS/Python lesson submissions).
Rename the controller, its route, and the related types to a language-agnostic name (suggestion: CodeRunnerController / api/CodeRunner, or CodeExecutionController / api/CodeExecution) so the shared nature is obvious and future contributors don't reintroduce language-specific assumptions.
Note: this is a follow-up to #280 (fix merged separately in spikersoft-backend). This ticket is the cleanup/rename only.
Scope
Backend (spikersoft-backend)
Rename SpikerSoft.Api/Domain/CodeExecution/CSharpCodeRunnerController.cs → language-agnostic controller + class name.
Update the [Route("api/[controller]")] so the public path changes (or keep a back-compat route — see Compatibility below).
Rename the test file SpikerSoft.Tests.Unit/Controllers/CSharpCodeRunnerControllerTests.cs and update references.
Audit CSharpCodeRunnerControllerTests, README.md, and any other backend mentions of CSharpCodeRunner.
Leave the sibling controllers as-is where they are genuinely language-scoped: CCodeRunnerController (api/CCodeRunner, C/C++) and SqlCodeRunnerController (api/SqlCodeRunner). Consider whether CCodeRunner should also be generalized since it serves both C and C++ — optional, lower priority.
Frontend (spikersoft-angular) — all consumers of /CSharpCodeRunner
These three runner services hardcode the controller segment and must be updated to the new path:
x86 and regex runners only hit /Lessons (no code-runner controller).
Compatibility / rollout
The controller route is a public API surface consumed by the deployed SPA. To avoid a hard breakage during deploy skew:
Option A (preferred): Add the new route while keeping api/CSharpCodeRunner as a deprecated alias for one release, ship the frontend pointed at the new route, then remove the alias in a follow-up.
Option B: Coordinate a simultaneous backend + frontend deploy and cut over directly.
Pick one and note it on the PR.
Acceptance criteria
Controller + class + tests renamed to a language-agnostic name.
All three frontend runner services updated to the new path.
No remaining references to CSharpCodeRunner except an intentional back-compat alias (if Option A).
C#, Python, and JavaScript playgrounds verified working for both free-play run and lesson submit after the change.
Low (tech debt / maintainability) — but directly prevents a class of regressions like #280.
## Summary
`CSharpCodeRunnerController` (route `api/CSharpCodeRunner`) is no longer C#-specific. It is the shared code-execution endpoint for the **C#, Python, and JavaScript** playgrounds — all three frontends POST to `/api/CSharpCodeRunner/run` and `/api/CSharpCodeRunner/lesson` and signal their language via `metadata.language`. The C#-centric name is misleading and was the proximate cause of the recent #280 regression (a dev hardcoded `metadata.language = "csharp"` in the controller, assuming it only served C#, which broke JS/Python lesson submissions).
Rename the controller, its route, and the related types to a language-agnostic name (suggestion: `CodeRunnerController` / `api/CodeRunner`, or `CodeExecutionController` / `api/CodeExecution`) so the shared nature is obvious and future contributors don't reintroduce language-specific assumptions.
> Note: this is a follow-up to #280 (fix merged separately in spikersoft-backend). This ticket is the cleanup/rename only.
## Scope
### Backend (`spikersoft-backend`)
- Rename `SpikerSoft.Api/Domain/CodeExecution/CSharpCodeRunnerController.cs` → language-agnostic controller + class name.
- Update the `[Route("api/[controller]")]` so the public path changes (or keep a back-compat route — see Compatibility below).
- Rename the test file `SpikerSoft.Tests.Unit/Controllers/CSharpCodeRunnerControllerTests.cs` and update references.
- Audit `CSharpCodeRunnerControllerTests`, `README.md`, and any other backend mentions of `CSharpCodeRunner`.
- Leave the sibling controllers as-is where they are genuinely language-scoped: `CCodeRunnerController` (`api/CCodeRunner`, C/C++) and `SqlCodeRunnerController` (`api/SqlCodeRunner`). Consider whether `CCodeRunner` should also be generalized since it serves both C and C++ — optional, lower priority.
### Frontend (`spikersoft-angular`) — all consumers of `/CSharpCodeRunner`
These three runner services hardcode the controller segment and must be updated to the new path:
- `libraries/features/dev-tools-csharp-runner/src/lib/csharp-runner.service.ts` (line ~66: `apiUrl = \`${environment.apiUrl}/CSharpCodeRunner\``)
- `libraries/features/dev-tools-javascript-runner/src/lib/javascript-runner.service.ts` (line ~33)
- `libraries/features/dev-tools-python-runner/src/lib/python-runner.service.ts` (line ~41)
Each uses `${apiUrl}/run` and `${apiUrl}/lesson`.
For reference (NOT affected — they use their own controllers, listed so the rename isn't accidentally over-applied):
- C / C++ runners go through `ClangRunnerService` with `apiController: "CCodeRunner"` (`dev-tools-c-runner`, `dev-tools-cpp-runner`).
- SQL runner uses `/SqlCodeRunner` (`dev-tools-sql-runner`).
- x86 and regex runners only hit `/Lessons` (no code-runner controller).
## Compatibility / rollout
The controller route is a public API surface consumed by the deployed SPA. To avoid a hard breakage during deploy skew:
- **Option A (preferred):** Add the new route while keeping `api/CSharpCodeRunner` as a deprecated alias for one release, ship the frontend pointed at the new route, then remove the alias in a follow-up.
- **Option B:** Coordinate a simultaneous backend + frontend deploy and cut over directly.
Pick one and note it on the PR.
## Acceptance criteria
- [ ] Controller + class + tests renamed to a language-agnostic name.
- [ ] All three frontend runner services updated to the new path.
- [ ] No remaining references to `CSharpCodeRunner` except an intentional back-compat alias (if Option A).
- [ ] C#, Python, and JavaScript playgrounds verified working for both free-play `run` and `lesson` submit after the change.
- [ ] Sibling `CCodeRunner` / `SqlCodeRunner` controllers untouched (or generalization tracked separately).
## Severity
Low (tech debt / maintainability) — but directly prevents a class of regressions like #280.
Backend: spikersoft-backend PR #34 — renamed CSharpCodeRunnerController → CodeRunnerController, canonical route api/CodeRunner with api/CSharpCodeRunner retained as a deprecated alias (Option A). Updated all backend references + docs.
Frontend: spikersoft-angular PR #83 — repointed the C#, JavaScript, and Python runner services to api/CodeRunner.
Sibling CCodeRunner / SqlCodeRunner controllers left untouched as intended. Follow-up #286 tracks removing the deprecated api/CSharpCodeRunner alias once the deprecation window passes. Closing.
Resolved — both halves merged to `master`:
- Backend: spikersoft-backend PR #34 — renamed `CSharpCodeRunnerController` → `CodeRunnerController`, canonical route `api/CodeRunner` with `api/CSharpCodeRunner` retained as a deprecated alias (Option A). Updated all backend references + docs.
- Frontend: spikersoft-angular PR #83 — repointed the C#, JavaScript, and Python runner services to `api/CodeRunner`.
Sibling `CCodeRunner` / `SqlCodeRunner` controllers left untouched as intended. Follow-up #286 tracks removing the deprecated `api/CSharpCodeRunner` alias once the deprecation window passes. Closing.
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.
Summary
CSharpCodeRunnerController(routeapi/CSharpCodeRunner) is no longer C#-specific. It is the shared code-execution endpoint for the C#, Python, and JavaScript playgrounds — all three frontends POST to/api/CSharpCodeRunner/runand/api/CSharpCodeRunner/lessonand signal their language viametadata.language. The C#-centric name is misleading and was the proximate cause of the recent #280 regression (a dev hardcodedmetadata.language = "csharp"in the controller, assuming it only served C#, which broke JS/Python lesson submissions).Rename the controller, its route, and the related types to a language-agnostic name (suggestion:
CodeRunnerController/api/CodeRunner, orCodeExecutionController/api/CodeExecution) so the shared nature is obvious and future contributors don't reintroduce language-specific assumptions.Scope
Backend (
spikersoft-backend)SpikerSoft.Api/Domain/CodeExecution/CSharpCodeRunnerController.cs→ language-agnostic controller + class name.[Route("api/[controller]")]so the public path changes (or keep a back-compat route — see Compatibility below).SpikerSoft.Tests.Unit/Controllers/CSharpCodeRunnerControllerTests.csand update references.CSharpCodeRunnerControllerTests,README.md, and any other backend mentions ofCSharpCodeRunner.CCodeRunnerController(api/CCodeRunner, C/C++) andSqlCodeRunnerController(api/SqlCodeRunner). Consider whetherCCodeRunnershould also be generalized since it serves both C and C++ — optional, lower priority.Frontend (
spikersoft-angular) — all consumers of/CSharpCodeRunnerThese three runner services hardcode the controller segment and must be updated to the new path:
libraries/features/dev-tools-csharp-runner/src/lib/csharp-runner.service.ts(line ~66:apiUrl = \${environment.apiUrl}/CSharpCodeRunner``)libraries/features/dev-tools-javascript-runner/src/lib/javascript-runner.service.ts(line ~33)libraries/features/dev-tools-python-runner/src/lib/python-runner.service.ts(line ~41)Each uses
${apiUrl}/runand${apiUrl}/lesson.For reference (NOT affected — they use their own controllers, listed so the rename isn't accidentally over-applied):
ClangRunnerServicewithapiController: "CCodeRunner"(dev-tools-c-runner,dev-tools-cpp-runner)./SqlCodeRunner(dev-tools-sql-runner)./Lessons(no code-runner controller).Compatibility / rollout
The controller route is a public API surface consumed by the deployed SPA. To avoid a hard breakage during deploy skew:
api/CSharpCodeRunneras a deprecated alias for one release, ship the frontend pointed at the new route, then remove the alias in a follow-up.Pick one and note it on the PR.
Acceptance criteria
CSharpCodeRunnerexcept an intentional back-compat alias (if Option A).runandlessonsubmit after the change.CCodeRunner/SqlCodeRunnercontrollers untouched (or generalization tracked separately).Severity
Low (tech debt / maintainability) — but directly prevents a class of regressions like #280.
Resolved — both halves merged to
master:CSharpCodeRunnerController→CodeRunnerController, canonical routeapi/CodeRunnerwithapi/CSharpCodeRunnerretained as a deprecated alias (Option A). Updated all backend references + docs.api/CodeRunner.Sibling
CCodeRunner/SqlCodeRunnercontrollers left untouched as intended. Follow-up #286 tracks removing the deprecatedapi/CSharpCodeRunneralias once the deprecation window passes. Closing.