diff --git a/cmd/server/tests/contract_pins_test.go b/cmd/server/tests/contract_pins_test.go index 8f9fd76a..a870d1b7 100644 --- a/cmd/server/tests/contract_pins_test.go +++ b/cmd/server/tests/contract_pins_test.go @@ -761,6 +761,10 @@ func TestContractPin_MediaListBothBranches(t *testing.T) { "declared_duration_seconds", "transcript_url", "chapters_url", "hosts", "guests", "download_state", "download_error", "download_attempts", + // §0 item 4 (2026-10-30 additive widening): the download pool's + // queue ticket — SEQUENCE-stamped at enqueue, NULL for scan rows + // and never-queued episodes. See docs/contract_pins.md changelog. + "download_queue_pos", } resolvedKeys := []string{ "id", "library_id", "title", "subtitle", "author", "authors", "isbn", "description", diff --git a/docs/contract_pins.md b/docs/contract_pins.md index 3f84a72a..804f96e1 100644 --- a/docs/contract_pins.md +++ b/docs/contract_pins.md @@ -459,3 +459,12 @@ resolved unscoped map: Scan-sourced rows carry the inert defaults ('scan' / NULLs / 'pending'); raw-row consumers that filter `source='scan'` (scanner paths) are unaffected. Nothing removed, nothing renamed. + +## 2026-10-30 — download_queue_pos joins media_items (additive widening) + +§0 item 4 of podcast-integration.md: the download pool's monotonic +queue ticket. `download_queue_pos BIGINT` (NULL for scan rows and +never-queued episodes) is stamped from the `podcast_queue_seq` SEQUENCE +at enqueue time so claim order = enqueue order (the effective listening +order). Raw-row pins (TestContractPin_MediaListBothBranches → +rawRowKeys) whitelist the key. Nothing removed, nothing renamed.