/Items/Suggestions narrows to the caller where upstream narrows to nobody #138
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream reads no user at all when
userIdis absent, so/Items/Suggestionsanswers the same rows to every account — including rows that account is refused by id. We narrow to the caller.Measured across nine accounts while reviewing #128: upstream returns 29 rows to every one of them, folders and years included, and for
allowkidtwenty of those twenty-nine are items it 404s on by id. Ours returns between 1 and 19 depending on the account.It hits the administrator too, which is what makes it this issue rather than a visibility one: it is the largest single behavioural gap left on that route and it is not about who may see what.
Note the direction. We are stricter than upstream, so closing this loosens a check — a client asking for suggestions gets rows it cannot then open. That is upstream's behaviour and the harness will report the difference either way, so the choice is to reproduce it or to argue the divergence in
DECISIONS.mdwith a reason. The precedent for the second is D13's shape: upstream behaviour judged to have no value to agree with, written down rather than silently diverged from.Where to start
crates/jellyfin-http/src/routes/library/discover.rsfor the route, and upstream'sItemsController.GetSuggestionsfor what it binds — specifically what it does whenuserIdis absent versus present, since the fix is likely to be "read the user only when the request named one".How to know it is done
The route answers the same rows as upstream for an unrestricted and a restricted account alike, or
DECISIONS.mdsays why it does not and the harness carries an entry with a reason and an expiry.House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin; generated artifacts are regenerated, never edited; comments say what the code does, not how it got there. The reference on:8096is read-only — andStudios=,Artists=andAlbums=are writes, because upstream resolves them throughCreateItemByName. Anything needing a write gets its own container from the pinned image over acp -acopy of a snapshot. Kill a server by the PIDss -lntpH 'sport = :NNNN'reports; neverpkill,killall, orpgrep -fwith a pattern your own command line contains.