test(pins): whitelist download_queue_pos on raw media rows (additive widening)

The contract pin caught the §0 item 4 column surfacing on media-list
raw sqlc rows — its job. Widened additively per doctrine: rawRowKeys +
docs/contract_pins.md changelog entry. NULL for scan rows and
never-queued episodes; nothing removed or renamed.
This commit is contained in:
John O'Keefe committed 2026-10-30 10:40:34 -04:00
1 parent 0da8e0cdf9
commit 15f41e6fd4
2 files changed
+13

No files matched your search

+4
View File
@@ -761,6 +761,10 @@ func TestContractPin_MediaListBothBranches(t *testing.T) {
"declared_duration_seconds", "transcript_url", "chapters_url", "declared_duration_seconds", "transcript_url", "chapters_url",
"hosts", "guests", "download_state", "download_error", "hosts", "guests", "download_state", "download_error",
"download_attempts", "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{ resolvedKeys := []string{
"id", "library_id", "title", "subtitle", "author", "authors", "isbn", "description", "id", "library_id", "title", "subtitle", "author", "authors", "isbn", "description",
+9
View File
@@ -459,3 +459,12 @@ resolved unscoped map:
Scan-sourced rows carry the inert defaults ('scan' / NULLs / 'pending'); Scan-sourced rows carry the inert defaults ('scan' / NULLs / 'pending');
raw-row consumers that filter `source='scan'` (scanner paths) are unaffected. raw-row consumers that filter `source='scan'` (scanner paths) are unaffected.
Nothing removed, nothing renamed. 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.