Feed and enclosure URLs come from users and third-party feeds. SafeHttp
accepts only http(s) URLs without credentials, resolves names with a
resolver that refuses the whole answer unless every address is public
(loopback, private, CGNAT, link-local, cloud metadata, unique local,
multicast, reserved; IPv4-mapped, NAT64 and 6to4 judged by their IPv4
part), and connects to exactly the checked addresses, so DNS rebinding
cannot swap them. IP literals and every redirect hop are checked; system
proxies, cookies and Referer are off. Loopback is reachable only through a
#[cfg(test)] policy used by the local test server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Received podcast operations and snapshot sections are applied to the
podcast store, this device's snapshots are filled from it, and an
unknown episode position resumes from its progress register. The
relay module is removed; operations, gating and snapshot bounds on the
wire are unchanged. The device-sync Postgres tests now migrate their
database themselves and cover locally emitted podcast operations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PodcastStore implements the music_dht::podcast contract per account:
catalog, feed aliases, episodes with a derived season view, the
subscription, share and progress registers, listening sessions and the
local-only fetch state. Received operations, snapshot records and local
actions share one apply path (materializers plus merge functions) under
a per-account advisory lock. Local actions append their operation to the
device-sync log with the next stamp of the web device and apply exactly
that operation in the same transaction.
Migration m_0056 creates the tables; m_0057 imports the registers that
0.13 kept in furumusic__fed_podcast_relay and the catalog rows of the
episode references in the operation log. The relay table is kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The podcast store resolves episode ids from parsed feeds with the
identity hints of music_dht::podcast::feed, which are part of the id
contract.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ignored device-sync PostgreSQL test now also covers a handoff and a
remote Next onto an episode with an unknown position (the relayed
progress register supplies 1200 s and its generation), and checks that
0.12's operation types fail on a relayed podcast operation and read the
log again after the documented cleanup statement, which the m_0055
backwards operation now shares.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release 0.12 fails a whole sync batch on a podcast operation kind, so
rolling back is only safe after the relayed podcast operations are
removed: document the step in docs/administration.md and run it in the
m_0055 backwards operation.
The typed queue now records the current track id and queue position
written with it, next to the legacy ids. A 0.12 release that only moved
to another track in the same queue no longer leaves a stale typed
position that the next upgrade would restore. Jam placeholders are never
stored in a user's own typed queue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server checked a participant's queue_remove/queue_clear against the
host state of the last report, but the host browser runs its pending
commands in one batch: after a move, a checked index can name a private
item. Participant commands are now stamped `jam_participant`, and the
host browser refuses to remove, clear, add or bring back its private
items for them, judged on the queue it is about to change.
A guest that stops controlling a Jam drops the host's private
placeholders from its own queue, so they are not saved or relayed as
the guest's queue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The web player only knows a podcast episode's position from a handoff or
a seek. When Next, auto-advance, a click or a play command makes an
episode current, it now reports `position_unknown` instead of 0, and the
server takes the resume position (and the register generation) from the
relayed progress register before it hands the state to another device.
Remote Next/Prev/play commands to a device do the same.
Next with repeat all or shuffle wraps past a trailing unplayable item
instead of stopping on it. Prev leaves an unplayable item instead of
"restarting" it, and seeking such an item moves its kept position.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the shared music_dht::device_sync types instead of private copies
(byte-identical for v3 content, checked against the 0.12.x types and a
golden fixture) and announce protocol 4, because every v4 element is
kept:
- podcast operations stay in the operation log and are relayed only to
peers that reported v4; their registers and the podcast snapshot
sections are merged with the shared rules into an opaque relay table
and returned in this server's snapshots (m_0055);
- the browser bridge carries PlaybackTrack.source: items that are not
library tracks keep the verbatim wire item, so podcast episodes and
Jam placeholders survive the round trip; the player labels and skips
them instead of dropping them;
- the typed queue is persisted in queue_items_json next to queue_json,
which is still written for rollback (m_0054).
Peer versions come from self-reports (profile_protocol_version); relayed
profiles only raise them and DeviceProfileSet no longer stores this
server's constant. Invites carry the inviter's version and a
DeviceProfileSet announces v4 once. Handoffs of a podcast queue to a
device below v4 are refused with an update message, and its playback
commands are ignored while the queue has podcast items. Jam guests see
podcast items as private placeholders, which are mapped back on their
commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The podcast contract and device-sync protocol v4 live in music-dht 0.6.
Cargo.lock currently resolves it from a local patch of the frid branch
podcasts/contract and must be regenerated against the published crate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>