Commits
Commits on
dcf123a8823bd55f0a656ce94de6b865f41dc08aFiltered to src/api/__tests__/contract/ai.contract.test.tsClear filter2026-09-18
fix: 🎧 play the finished episode from its job's own audio doorAhmet Kaan Gümüş · 1f37a9a
fix: 🎧 play the finished episode from its job's own audio door
The panel's "ready" player pointed at /api/podcast/audio?path=…, a door the
backend no longer has: the request answers 404 with an empty body, so the
element dies on a format error and shows 0:00 / 0:00 with no sound. The live
contract streams an episode by job id — GET /podcast/jobs/{id}/audio — with
409 not_ready for a job that has not finished, 409 audio_missing for a row
whose blob is gone, and 404 for a job the caller does not own. The helper now
takes the job id, and the panel hands it result().job_id.
Sweeping every hand-built /api URL in src/ against the live OpenAPI paths
turned up a second dead shape: the roster's per-student file download
composed /homework/{id}/submissions/{user}/files/{fid}, which no route
answers (empty 404, where a matched-but-missing route answers a JSON 404).
A teacher reads any file under a homework they manage through
/homework/{id}/submission/files/{fid}, so the roster uses that one helper
and the second URL shape is gone with it. The two SSE stream URLs, the
question/answer image URLs, the note and course-note file URLs, the avatar
URL and both WebSocket rooms all still resolve.
Tests: the audio helper pin moves to the job door, the panel gains a pin
that the element's src is built from job_id (fails if handed audio_id), the
roster's URL pin goes with its helper, and the contract probe now asks the
live door for a job id that is not the caller's instead of the retired path
door.2026-09-17
feat: 🧠 wire the new insights and podcast backend doorsBurak Boduroğlu · ce4dc54
feat: 🧠 wire the new insights and podcast backend doors - new src/api/insights: /insights/me, one student's insight, the detached per-student recompute, the manager-only run ledger and the school-wide refresh; both writes answer 202 with a receipt, never the computed rows - new src/api/podcast: submit a course note for narration, poll the job, read a finished job's artifacts, cancel one, and the same-origin audio URL an <audio src> takes - types for ZEKA's read: the nightly summary with its four module members left unread, the teacher-facing attention list, recommendation cards, the segment profile with its contrast against the student's own level, and one run ledger row - neither domain is a licence module, so both are gated by AI capability alone: the detached writes answer 503 when no service serves them and queue nothing, and the podcast formats past duz_okuma need the service's LLM key - contract fixtures cover both doors in a world with and without an AI service: the reads answer their DTO either way, the writes may refuse with 503 but may not 500 or mint a receipt they did not queue Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>