Document fair publication limits, share states and moved feeds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sanapachandClaude Opus 5.5 committed 2026-11-20 15:12:52 +02:00
1 parent 12617a6d52
commit 4b45aa5805
3 files changed
+93 -29

No files matched your search

+41 -16
View File
@@ -233,21 +233,39 @@ only while the overlay runs.
account's catalog fetch URL as `feed_url`, the origin URL as `id_feed_url`
and the feed's episode count and newest date.
- `load_shared` reads active accounts only (`furumusic__user.is_active`).
An `(account, podcast)` whose stored data does not decode (a URL, the
register JSON, an id) is left out and counted (`unreadable`): only a
failing connection or query skips the round, so revocation stays
fail-safe for each podcast on its own.
- `aggregate_share_states` keeps the accounts for which `effective_share`
holds and whose card has no privacy warnings or a matching confirmation,
and builds one `PodcastShareState` per podcast (representative: no
warnings first, then the smallest account id) with
`privacy_confirmed = true`; at most 192 podcasts (replicas keep 256
records per publisher, tombstones included). `PodcastDht::sync_shares`
publishes them and tombstones everything else.
and builds one `PodcastShareState` per podcast with
`privacy_confirmed = true`. Representative: no warnings, then a catalog
from the server's own fetch (`meta_from_feed`), then the previous
round's representative (kept in memory), then the smallest account id.
- At most 192 podcasts (replicas keep 256 records per publisher, tombstones
included), allocated round-robin over the sharing accounts (`allocate`):
each account's queue holds its podcasts the node already publishes
first, then by its own share time; in every round each account takes its
next podcast not taken yet, published ones first inside a round. An
account's share times therefore only order its own podcasts.
`PodcastDht::sync_shares` publishes the result and tombstones everything
else. The podcasts left out (`over_limit`) and those `sync_shares`
reported as failed are kept in memory for `ShareView.held`.
- `furumusic__podcast_share_confirmation` (`m_0058`) is the client-held
`privacy_confirmed`: per account and podcast, bound to the share
register's `op_id` and the exact card URLs. Never synced.
- The reconciler runs on `discovery::request_reconcile()` (after local share,
subscribe and unsubscribe actions, received subscription/share/alias
operations and snapshot sections, refreshes of shared podcasts; 2 s
debounce) and every five minutes. Database errors skip a round. Only
counts are logged.
debounce) and every five minutes. Connection and query errors skip a
round. Only counts are logged.
- `ShareView` (in `GET /api/podcasts/feeds/{id}` and the share response):
`discovery` is `running`, `unavailable` (the node runs, the overlay did
not start; `Federation::podcast_discovery_unavailable`) or `off`;
`published` is this server node's own active card only; `held` is
`over_limit` or `failed` after the last round. An unreadable overlay
cache degrades to `published: false` instead of failing the page.
- `POST /api/podcasts/feeds/{id}/share` requires a JSON body
(`{"shared": bool, "confirm"?: {"feed_url", "id_feed_url"}}`); a card with
warnings is shared only with `confirm` naming exactly its current URLs
@@ -266,17 +284,24 @@ Search and subscription from a card (`src/podcasts/search.rs`):
with the music items, and the searching account's `subscribed` /
`local_podcast_id` (by id, or a known feed URL or alias through
`resolve_podcast_id`). `search.completed` adds `podcast_discovery`
(`running`, `off`, `failed`); a failed podcast search never fails the
music search.
(`running`, `off`, `failed`); a failed podcast search, or a failure to
prepare its hits for the account (`Federation::podcast_search_events`
never fails), only drops the podcast hits and reports `failed`.
- `POST /api/podcasts/discovery/preview` and `/discovery/subscribe` take
`{"podcast_id", "feed_url"}` from a hit and refuse a URL the id does not
hash from (422). The preview fetches the feed through the SSRF-guarded
fetcher and returns the channel, season counts and the newest 50 episodes
without storing anything; subscribe runs `runner::subscribe_url` with the
origin URL (fetch first, then a private subscription with the card's id,
or the account's existing podcast for a known URL), and writes nothing
when the account is already subscribed. Both share the "add RSS" request
limits.
hash from (422). The preview (optional `"season"`: a number as a
string, `"none"` or `"all"`) fetches the feed through the SSRF-guarded
fetcher and returns the channel, season counts, `listed_count` and the
newest 50 episodes of the season, without storing anything; subscribe
fetches the origin URL, then `runner::subscribe_fetched` writes a
private subscription with the card's id, or the account's existing
podcast for the first known URL of `runner::document_urls` (the origin,
the end of a permanent redirect chain, the feed's `itunes:new-feed-url`;
also used by "add RSS"). Nothing is written when the account is already
subscribed, by id or known URL, before or after the fetch. Both share
the "add RSS" request limits; the browser aborts a preview it no longer
shows (`AbortController`), so a closed card frees its slot once the
server sees the connection close.
- The browser keeps only expected, typed card fields (`podcasts.foundHit`):
ids must look like podcast ids, URLs must be absolute `http(s)` without
credentials (artwork: `https` only), and texts render with `x-text`.