forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to src/service/course_note_file.rsClear filter

2026-09-23

✨ feat(podcast): dispatch every attachment as sources, not just the newest PDFAhmet Kaan Gümüş · 979d53f
✨ feat(podcast): dispatch every attachment as sources, not just the newest PDF

The submit door now lists all of the note's attachments (id ASC), stats each
blob, and dispatches the present ones as `sources` — `source_key` rides on as
the first source's key, one-release compat. A blob that is gone is skipped with
a log line; `409 source_missing` now means zero attachments or zero present
blobs, and a note id with any single attachment is a valid job.

`podcast.report` gains additive `sources` (`{key, name, status}`, `ok` or
`skipped:<code>`), stored verbatim into the job row's new JSONB `sources`
column and replayed by `GET /podcast/jobs/{id}/result`. `newest_pdf` is
deleted with its service wrapper — clean cutover.
Local-Gate: fe26c0cd12b31b6a48cacff9a3a6119bd241d89e (1518 passed, 459s)

2026-09-17

🎧 feat(podcast): the submit door resolves the note's PDF and hands the service its blob keyAhmet Kaan Gümüş · 5f9e97c
🎧 feat(podcast): the submit door resolves the note's PDF and hands the service its blob key

`podcast.submit` now carries `source_key` — the blob key of the note's newest
`application/pdf` attachment, resolved by the backend before the job row is
written. The service extracts the source with pymupdf, so it needs the file
itself: a note id alone names nothing it can open.

- `db::course_note_file::newest_pdf` reads the note's newest PDF (UUIDv7 id
  order is mint order), and the key it hands on is the row's own id — the same
  key the attachment's blob is stored under in the school's blob directory.
- `POST /podcast/jobs` refuses `409 source_missing` before anything is written
  when the note has no PDF attachment, or when that attachment's blob is not
  present on this host — instead of queueing a job the service can only fail
  later in its `kaynak` stage.
- The payload keeps `source_id` for the record and the report echo; a report
  now matches the row's note id, never a fixed literal.
- `tests/podcast.rs`: the submitting tests mint a real course note with a PDF
  (teacher cookie, real doors) and witness the dispatch's `source_key`, both
  refusal shapes (no row written, nothing dispatched), and that the newest PDF
  — not the newest file — is the source. Pre-fix those four witnesses fail
  with `202` + a queued row, which is the behaviour this change removes.
- `.sqlx`: one new query entry, regenerated on a scratch prepare DB.
Local-Gate: 5d93323e202eaafb074ee46e3eaa1c0b38229725 (1473 passed, 443s)

2026-09-11