Lessons integration coverage: Phase 3 (authenticated grading loop, skill auto-award, SignalR delivery) shipped #449

Closed
opened 2026-07-07 15:33:29 +00:00 by spikerj · 0 comments
Owner

Tracking ticket for the Lessons + code-execution/grading integration test expansion (see lessons_integration_tests plan and spikersoft-issues#448 for Phase 0-2).

Shipped in spikersoft-backend#175 (merged):

  • Phase 3: authenticated end-to-end grading via the real in-process worker for C# (Roslyn) and SQL (DuckDB) - pass records userLessonProgress and consumes the single-use Redis attempt token, fail records the attempt without completing it; free-play run persists to user-submitted-code; a passing submission satisfying a skill's auto-award criteria surfaces the award via CheckAutoAwardsCommand; progress/batch distinguishes server-reverified verified from client-trusted unverified; one real SignalR HubConnection smoke test against /codeExecutionHub proves async delivery end-to-end.

Bug found and fixed along the way: every SQL lesson submission (POST /api/SqlCodeRunner/lesson) was 500ing in production - CodeExecutionValidator had no language == "sql" dispatch branch, so the { query, theme } envelope fell through to the C# Roslyn syntax validator and failed on the leading {. Fixed with an IsSqlLanguage bypass mirroring the existing C/C++ bypass, plus a regression test.

Still to come (follow-up PRs, same plan):

  • Phase 4: tutorial completion (Tutorial vs Challenge, idempotent expired-but-complete) + anti-spoof (expired/foreign token rejected).
  • Phase 5: capability-gated Python/Node/C/C++ grading loop with controller-level 202+publish fallback.

Definition of green: full integration suite passes locally (Docker up), no regressions to the pre-existing tests.

Tracking ticket for the Lessons + code-execution/grading integration test expansion (see `lessons_integration_tests` plan and spikersoft-issues#448 for Phase 0-2). **Shipped** in spikersoft-backend#175 (merged): - Phase 3: authenticated end-to-end grading via the real in-process worker for C# (Roslyn) and SQL (DuckDB) - pass records `userLessonProgress` and consumes the single-use Redis attempt token, fail records the attempt without completing it; free-play run persists to `user-submitted-code`; a passing submission satisfying a skill's auto-award criteria surfaces the award via `CheckAutoAwardsCommand`; `progress/batch` distinguishes server-reverified `verified` from client-trusted `unverified`; one real SignalR `HubConnection` smoke test against `/codeExecutionHub` proves async delivery end-to-end. **Bug found and fixed along the way**: every SQL lesson submission (`POST /api/SqlCodeRunner/lesson`) was 500ing in production - `CodeExecutionValidator` had no `language == "sql"` dispatch branch, so the `{ query, theme }` envelope fell through to the C# Roslyn syntax validator and failed on the leading `{`. Fixed with an `IsSqlLanguage` bypass mirroring the existing C/C++ bypass, plus a regression test. **Still to come** (follow-up PRs, same plan): - Phase 4: tutorial completion (Tutorial vs Challenge, idempotent expired-but-complete) + anti-spoof (expired/foreign token rejected). - Phase 5: capability-gated Python/Node/C/C++ grading loop with controller-level 202+publish fallback. Definition of green: full integration suite passes locally (Docker up), no regressions to the pre-existing tests.
Sign in to join this conversation.