Skip to content

Collections — Server #193

Closed
Closed

Description

@zZebrahz

Validate the Server/API surface of Collections for Silo 1.0. Parent: Collections, silo-server #192.

The parent owns the complete product criteria and cross-client acceptance. This task owns AC2–AC6; use its Collections acceptance v1 criteria revision and pinned milestone source. These are validation cases, not a claim the current build passes.

Cases

  • S1: List/detail/member APIs expose shared collections according to access and private collections only to their owner. Test another profile on the same account and another account, including direct requests.
  • S2: Create a private collection for an authorized profile; member add/remove and edits persist. Reject another profile’s reads and mutations.
  • S3: Reject restricted-library members on read and mutation, including direct item/stream access checks. UI hiding is not sufficient.
  • S4: Smart rules populate members and reflect changes to rules/library contents; zero matches return a usable empty result.
  • S5: Shared/smart administrative mutations require an admin; a regular user cannot perform them by calling the API directly.
  • S6: Collection ordering and assigned artwork remain available after reload; confirm native clients can resolve returned artwork references with the relevant client task.
  • S7: Personal collection sharing (#1615): only the owner can change a collection, including its order. With Show to other profiles on, every profile on the same login can read it and no other login can. Each viewer sees only titles both the owner and the viewer can access, in listings, member pages and counts. When the owner loses access, members are hidden, not deleted.

Coverage results

Case Server/API
S1 Pass (automated API checks perms.py, written by the agent and run by the maintainer on 2026-11-10 against a local sandbox of build 2141 · 30a6abd19; 105 of 105 checks pass): private collections answer 404 to every other profile, the other login and the admin, and are absent from their lists; a shared collection is readable on the same login only; 401 without credentials. Earlier: pass (agent API testing, build 927).
S2 Pass (automated API checks perms.py, written by the agent and run by the maintainer on 2026-11-10 against a local sandbox of build 2141 · 30a6abd19; 105 of 105 checks pass): create, add, remove, rename and reorder persist with the right item_count; every read and change from another profile or login answers 404 and leaves it unchanged. Earlier: pass on build 1012 after #1552.
S3 Pass (automated API checks perms.py, written by the agent and run by the maintainer on 2026-11-10 against a local sandbox of build 2141 · 30a6abd19; 105 of 105 checks pass): restricted adds and direct opens answer 404 for the PG profile and for titles in hidden libraries; members are filtered per viewer.
S4 Pass (automated API checks perms.py, written by the agent and run by the maintainer on 2026-11-10 against a local sandbox of build 2141 · 30a6abd19; 105 of 105 checks pass): a zero-match rule answers 200 with an empty list and stays listed; a rule change fills and empties it; titles added to and removed from a library join and leave smart collections. The library-contents part was Not run before. The stale admin count found by human validation (#3697) is fixed by PR #3707 and verified in Web #195 W4.
S5 Pass (automated API checks perms.py, written by the agent and run by the maintainer on 2026-11-10 against a local sandbox of build 2141 · 30a6abd19; 105 of 105 checks pass): the regular user and the PG profile get 403 creating, renaming, adding to, reordering, deleting and uploading artwork for a server collection, and nothing changes.
S6 Pass (automated API checks perms.py, written by the agent and run by the maintainer on 2026-11-10 against a local sandbox of build 2141 · 30a6abd19; 105 of 105 checks pass): a profile's own order persists without changing another profile's (the #1616 failure is gone); the admin order holds; uploaded posters load without a login. Native clients loading the artwork is checked in the client tasks.
S7 Pass (automated API checks perms.py, written by the agent and run by the maintainer on 2026-11-10 against a local sandbox of build 2141 · 30a6abd19; 105 of 105 checks pass): another profile can't put the owner's collection in its order (422) or change it (403); a shared collection shows the PG profile only the PG subset and another login nothing; with the owner limited or its library access removed, members are hidden and the stored members remain. Human validation of the same behaviour in the web app: Web #195 W7 pass.

Agent API testing, 27 Sep 2026

Build 927 · 66f6a52a, through /api/v2. Accounts: a regular user limited to the TV library, with an unrestricted profile and a PG profile on the same account, and a separate admin account. Test collections are named zz-test-192 …. No human acceptance is recorded yet.

  • S1: the user's shared collections exactly match the admin's for the TV library. Listing collections in, or reading items from, any of the six hidden libraries returns 404, including when the request names the TV library instead. Private collections are listed only for their owner. Every direct read from the other profile or the other account returns 404; with no token it's 401.
  • S2: create, rename, add, remove and reorder all persist after a reload (saving an edit needs If-Match). Eight read and write routes called from the other profile, and five from the other account, all return 404, and the collection is unchanged. Failure: item_count stays 0 (Personal collections always report item_count 0 #1552).
  • S3: adding a hidden-library movie is refused (404), and so are TV-MA and TV-14 titles from the PG profile; TV-PG is accepted. On a 175-title shared collection, the PG profile gets 48, none above PG, and each one opens directly. In a collection shared with the PG profile, it sees only the TV-PG member and can't edit it (403). A smart collection spanning a movie library and the TV library shows the user only series, and the PG profile nothing above PG. Starting playback of a TV-MA episode as the PG profile, or of a hidden-library movie, returns 404; a control start of a TV-PG episode returns 201.
  • S4: an admin smart collection filled with 641 titles. After its rule was changed, its members were all TV-MA and the PG profile saw 0 of them. A rule matching nothing returns 200 with an empty list for every profile, and the collection still appears in the list. A personal smart collection works too. Not run: a change in library contents, which needs new media to be scanned.
  • S5: 20 admin collection routes (create, update, delete, sync, items, order, image, imports, template bundles, groups) return 403 to the regular user. The target collection is unchanged and nothing was created.
  • S6: a changed admin collection order shows up for users in both library and server collection lists; the original order was restored afterwards. Manual member order and personal collection order persist. Uploaded posters for admin and personal collections return presigned links that load without a login (200, image/webp). A non-image upload returns 500 (Collection artwork upload returns 500 for files that aren't images #1553). The single-collection editor responses leave poster_url empty on purpose; the list responses carry the link.

Agent API testing, 27 Sep 2026, build 941

Build 941 · 82b5b39e, through /api/v2, on one login with an unrestricted profile (A) and a PG profile (B).

  • S6 (order across profiles): A created a private collection and two collections shared with B; B created a private one. B reversed its own collection order (200). In A's list, the two shared collections moved from positions 4 and 5 to 3 and 1, and A's private collection from 3 to last. The original order was restored afterwards. Filed as #1616.

Agent API testing, 28 Sep 2026, build 1012

Build 1012 · 19e81846, through /api/v2, same login and profiles.

  • S2 (#1552 retest): item_count matches the members each profile can see, in both the collection list and the collection itself: a private manual collection (3), the PG profile's own collection (1), a collection shared with the PG profile (3 for the owner, 1 for the PG profile), and a personal smart collection (641). A new collection counts 0, then 2 after two adds, then 1 after a removal. In the library Collections tab (include_in_server_collections turned on for the test, then restored), the shared collection counts 3 for the owner and 1 for the PG profile. 18 of 18 checks pass. The owner's access limit on shared collections is not part of this fix; it's covered by #1615.

Related bugs

silo-server #1552 failed S2; fixed, agent retest passed on build 1012. #1616 fails S6 and blocks this task. #1615 is needed for S7 and blocks this task. #1618 (generated collection posters show titles the profile can't access) relates to S3 and S6 and blocks this task. silo-server #1553 relates to S6 (not blocking). silo-server #935 relates to S6. silo-server #1131 concerns artwork maintenance; assess its impact without treating it as an automatic feature blocker. #3697 (admins and other unrestricted accounts see a stale smart collection count after a scan adds or removes titles) relates to S4 and blocks this task (maintainer decision, 2026-11-09; found during human validation on a local sandbox of build 2072 · 4018816da).

Record a bug’s exact failed case and current-build reproduction before marking it blocking. Keep bugs in their owning repositories; do not create duplicates. Results on unaffected cases can continue.

Accepted by the maintainer on 15 November 2026: S1–S7 on build 2141 · 30a6abd19 (automated API checks run by the maintainer on a local sandbox). #1615 no longer blocks this task (maintainer decision, 15 November 2026, recorded on #192).


AI-assisted tracking update using OpenAI Codex and GitHub CLI, at the maintainer’s direction. No runtime validation or acceptance is claimed. The 2026-11-09 update, made with Claude Code (claude-opus-5-5) and GitHub CLI, records blocking finding #3697. The 2026-11-10 update records S1–S7 from the maintainer's run of the agent's automated API checks on build 2141. A 2026-11-15 update, made with Claude Code (claude-opus-5-5) and GitHub CLI at the maintainer's direction, ticks the passed cases and records the maintainer's acceptance of them.

Activity

  1. added theissue type on Jun 25, 2026
  2. added
    v1.0
    on Sep 19, 2026
  3. added this to the v1.0 milestone on Sep 19, 2026
  4. moved this from Todo to In Progress in Silo v1.0.0on Sep 19, 2026
  5. moved this from In Progress to Todo in Silo v1.0.0on Sep 19, 2026
  6. added
    triaged
    and removed
    triaged
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Validationv1.0

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions