Skip to content

feat(access): let a household allow titles above a profile's rating limit - #3562

Merged
Quick104 merged 35 commits into
mainfrom
feat/profile-title-allowances
Nov 6, 2026
Merged

Quick104 merged 35 commits into
mainfrom
feat/profile-title-allowances

Conversation

@Quick104

@Quick104 Quick104 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #2173
Validation tasks: changes #1180 C2; changes #1181 C1, C4; changes Silo-Server/silo-apple#322 C1, C4; changes Silo-Server/silo-apple#323 C1, C4; changes Silo-Server/silo-android#332 C1, C4; changes Silo-Server/silo-android#333 C1, C4

These cases change only for a profile that has an allowance; a profile without one behaves as before, and an allowance never lifts library restrictions.

A rating limit allows every title at a rating or none of them. A parent who is fine with one particular R movie for a PG profile has to raise the whole profile's limit, or the child can't watch it. Silo has no way to make an exception for a single title or a hand-picked list, so households with children between rating bands end up loosening limits they want to keep.

This lets the household's primary profile allow a limited profile specific movies and series above its rating or advisory-age limit: from the title's page, from the profile editor, or through a collection. The title keeps its rating, other profiles are unaffected, and a limited profile never sees anything it was not allowed.

Approach

  • Rule. A title passes a profile's limits when it is within them or allowed. catalog.ApplyMaturityLimits renders (limits) OR content_id = ANY(allowed), and episode rows key on their series, so a series allowance covers its seasons and episodes. Library restrictions still apply, and so do two stricter limits: a custom scope policy's rating override and a Jellyfin client's narrower MaxOfficialRating.
  • Where the list comes from. The allowed IDs load in the same statement as the profile row and travel in access.MaturityLimits.AllowedTitleIDs. Catalog reads, shared cache keys, v2 cursors and the Jellyfin surface already copy those limits, so they pick allowances up without per-surface code. A path that builds limits without the list hides allowed titles; it never shows extra ones. Every request a profile makes reads the list, so the read stops at 10,000 titles; past that, the rest stay hidden.
  • Collections. A manual personal collection the primary profile created can be allowed live: titles added to it later are allowed too, and only its movies and series count. Any other personal collection is copied as individual allowances of the titles the parent sees in it, in libraries the target profile can reach. For another profile's shared collection that is only titles its owner can access too, and for a smart collection it is what its query matches for the parent now. One copy allows at most 10,000 titles.
  • API. Nine /api/v2 operations behind GET /api/v2/capabilities/title-allowances, for the verified primary profile only. Allowing an episode or season, allowing for a profile with no limit, or allowing a title outside the profile's libraries answers 422. Each write rechecks the acting primary profile's PIN revision in its transaction, like other household writes, and is audited as profile.updated on the target profile.
  • Storage. Two tables in a new migration, removed with their profile, title or collection. Writes go through their own Postgres store rather than optional methods on the user store, which the notifications wrapper would hide. On the SQLite user store the capability reports unsupported and no allowance applies.
  • Other paths. Allowances follow title merges like favorites do. A full backup restore carries them, and the restore authority check treats an allowance the live server lacks as a loosening; a backup older than this change reads as having none. Single-account restore and profile export leave them out. A change to a profile's allowances rebuilds its cached recommendations, as a change to its limits does.
  • Web. "Allow for…" in the title page's ⋯ menu, "Allowed titles" and "Allowed collections" in the profile editor, and "Allow for…" on the Collections page.

Follow-up for silo-apple and silo-android: the title action and the profile list. Allowed titles already show and play there with no client change. The user manual needs a section on this too. Those issues will be filed separately.

Validation

  • Go: build, vet, gofmt, make lint-changed (0 issues) and the suites of every touched package pass, including their database tests against a fresh migrated PostgreSQL. A new DB contract test follows allowances from the rows to what the catalog admits (in scripts/ci/db-contracts.txt); a handler test covers who may allow what; table rows cover the SQL predicate, shared-collection intersection, the override and the Jellyfin clamp.
  • make test-go (run before the review fixes and the last rebase; every package changed since was re-run): everything passes except TestRunStatsWithRealFFmpeg and TestCopyRemuxSubtitleRenditionRealFFmpeg, which fail the same way on main with this machine's ffmpeg.
  • DB pins list (scripts/ci/db-pins.txt) on a fresh migrated database: passes.
  • make test-db-contracts on a fresh database: the same two failures as main on a fresh database (TestAdminAPIKeyCreationHoldsOwnerRulesAgainstPromotionDB, TestMergeKeepsTheSourceEmbeddingPostgres); none added.
  • Web: lint, format, build, budget and make test-web (862 files) pass.
  • Contracts and hygiene: OpenAPI, web types, fixtures, contract diff, migration ledger, route inventory, settings bindings, playback fixtures, scenario catalogs, offline routes, size ratchet, bidi, migrations, v1 route freeze, local paths and case collisions pass. Not run: actionlint, shellcheck and the Prometheus rules check; this PR changes no workflow, shell script or rule.
  • Isolated sandbox built from this branch: 36/36 API checks (hidden before, visible after across item, list, search and episodes; refusals; live collection additions and removals; smart copy), a Jellyfin client signed in as the limited profile sees 10 movies with the allowance and 9 without, the limited profile plays the allowed movie in the web player, and audit rows land for each change.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3562/

Surface and build: web app, desktop and phone width, sandbox build of this branch.

Risks

  • Every single-profile read now runs one more subquery for the allowed IDs. It is indexed by profile and empty for most profiles.
  • Scope fingerprints and shared cache keys gain a field. Existing in-memory cache entries miss once after deploy; profiles without allowances keep their socket-ticket and progress fingerprints because the field is omitted when empty.
  • A migration adds two tables; no existing table changes.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code with subagents; an isolated server sandbox and a browser preview for validation
  • Model(s): claude-opus-5-5
  • Involvement: AI-assisted
  • Adversarial review: a separate agent reviewed the full diff read-only for leaks to limited profiles, authority bypass, SQL and cache correctness, backup restores and the web requests. It found no leak or authority hole and five issues: allowances lifted a custom scope-override ceiling, copying a smart collection copied nothing, title merges dropped allowances, allowance changes were not audited, and a Jellyfin client's stricter rating did not hide allowed titles. All five are fixed in this PR, with tests where they apply. Bot reviews on the PR (Codex, Kody) raised five more that are fixed here: two Jellyfin browse paths that bypassed the client-ceiling rule, collection copies that ignored the parent's access, non-title items in live collections, a missing PIN recheck inside writes, and a search refresh error state. One watch-count suggestion was answered without a change.

🤖 Generated with Claude Code

Note

Add household title allowances above a profile's rating limit

  • Introduces per-profile title and collection allowances via new tables (migration), v2 API endpoints, and PostgreSQL store (allowances.go). A household manager can allow a movie or series for a maturity-limited profile, either as a live allowance or by copying a collection's titles.
  • Allowed titles pass maturity filtering across browse, search, episode catalogs, recommendations, and preview queries (access_filter.go). Episode rows use their series ID as the allowance key. Access-scope cache keys and viewer-scope digests now include the allowed-title list.
  • Web UI adds an "Allow for…" action on item detail pages and collections, with dialogs to toggle allowances per profile (AllowTitleDialog.tsx, AllowCollectionDialog.tsx) and a paginated allowed-titles section in the profile editor.
  • Backup restore compares allowance lists in profileLimits.looserThan and excludes the allowance tables from single-user restore/import. Media-item merges transfer source allowances to the destination content ID.
  • Behavioral Change: policies that override a profile's rating ceiling or advisory-age limit drop its allowances (maturityOverridden in viewer_resolver.go), and Jellyfin clients that narrow the rating ceiling have allowances cleared (clampMaturityLimits in content_direct.go). Collection-derived titles count only from live manual collections created by a primary profile, capped at MaxAllowedTitles (10,000).

Macroscope summarized dea8150.

…imit

The household's primary profile can allow a limited profile specific
movies and series above its content-rating or advisory-age limit, one
by one or through a manual personal collection it created (titles added
later are allowed too). Other collections, smart ones included, can be
copied as individual allowances. A series allowance covers its seasons
and episodes. Library restrictions, a custom scope policy's rating
override and a stricter Jellyfin MaxOfficialRating still win.

Enforcement extends the shared maturity predicate to "within limits OR
allowed": the allowed IDs load with the profile row and travel in
access.MaturityLimits, so catalog reads, cache keys, cursors and the
Jellyfin surface pick them up. Allowances have their own Postgres store,
follow title merges, are audited as profile.updated, and are covered by
the backup authority check and table classification.

Adds nine /api/v2 operations behind a capability, the web title-page
"Allow for…" dialog, the profile editor's allowed titles and
collections, and the collection "Allow for…" action. Clears the merged
#3402 breaking-change approvals and carries the one-line jellycompat
test fix from #3552 so the package compiles.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Nov 5, 2026
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Walkthrough

This change adds profile-specific movie and series allowances that can pass active maturity limits. It adds persistent storage, access checks, API operations, and web controls for managing title and collection allowances. It also updates backup handling, item merges, cache and cursor identity, and API documentation.

Changes: Profile Title Allowances

Layer / File(s) Summary
Allowance persistence and profile data
migrations/sql/*, internal/userstore/allowances.go, internal/userstore/pgstore/allowances.go, internal/userstore/pgstore/profiles.go, internal/userstore/types.go, internal/userstore/pgstore/allowances_test.go, scripts/ci/db-contracts.txt
Adds title and collection allowance tables and PostgreSQL operations. Profile reads combine direct title allowances with qualifying manual collections, up to the configured limit. Writes update the access-policy revision and audit record when rows change.
Maturity-limit access enforcement
internal/access/*, internal/policy/*, internal/catalog/*, internal/jellycompat/*, internal/recommendations/*
Adds allowed title IDs to maturity scopes and applies them to item and episode queries. Shared-collection access intersects allowances when both sides have limits. Cache keys and cursor digests include allowance IDs. Narrower rating overrides clear allowances.
Allowance API and authorization
internal/api/handlers/title_allowances.go, internal/apiv2/title_allowances.go, internal/api/router.go, internal/apiv2/router.go, internal/apiv2/document.go, internal/api/testdata/media_routes.txt, web/src/api/v2/operations.ts, internal/contractledger/ledger_test.go, docs/admin-api.md, docs/catalog-api.md
Adds capability, listing, mutation, status, and collection-copy operations. Writes require household management authorization and validate title, profile, and library access. Collection copies filter accessible titles and enforce copy and scan limits.
Allowance lifecycle and restore handling
internal/catalog/reattribute/reattribute.go, internal/metadata/provider_id_integrity.go, internal/backup/*, docs/architecture/title-allowances.md
Moves title allowances during item merges. Full restores include allowance data and compare allowance changes; account restores and profile imports exclude it. Adds architecture documentation for allowance scope and limits.
Web allowance controls
web/src/hooks/queries/titleAllowances.*, web/src/components/profiles/*, web/src/components/collections/CollectionActionsMenu.tsx, web/src/pages/Collections.tsx, web/src/pages/ItemDetail/components/*, web/src/components/profiles/ProfileEditorDialog.test.tsx
Adds profile-editor controls, title and collection dialogs, and collection and item action-menu entries. Query and mutation hooks load allowance status and update or copy allowances.

Breaking API approval update

Layer / File(s) Summary
Remove backup-list approval records
contracts/api/v2/breaking-approvals.json
Removes both listAdminBackups approval records, leaving the approvals array empty.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AllowTitleDialog
  participant allowTitle
  participant TitleAllowanceHandler
  participant TitleAllowances
  participant PostgreSQL
  AllowTitleDialog->>allowTitle: Submit title allowance
  allowTitle->>TitleAllowanceHandler: Send profile-scoped request
  TitleAllowanceHandler->>TitleAllowances: Validate and set allowance
  TitleAllowances->>PostgreSQL: Store allowance and update policy revision
  PostgreSQL-->>TitleAllowances: Return transaction result
  TitleAllowances-->>TitleAllowanceHandler: Return write result
  TitleAllowanceHandler-->>allowTitle: Return API response
  allowTitle-->>AllowTitleDialog: Return allowance result
Loading

Possibly related issues

  • Silo-Server/silo-server#2173: Adds title-specific exceptions to maturity limits for movies and series.
  • Silo-Server/silo-server#1245: Applies title allowances through shared access checks, though the issue’s compatibility validation remains incomplete.
  • Silo-Server/silo-server#1140: Changes which restricted-profile titles pass shared maturity access checks, but does not change curated-row configuration.

Suggested labels: api-v2, needs-review, impact: usability, evidence-required

Suggested reviewers: rhainland

Security architecture risk: Moderate · up to 05d12

Restoring data can preserve credentials despite broader restored profile allowances when allowance sets exceed the read limit. This requires a restore and an oversized allowance set; normal management authorization and library restrictions remain in place.

Retained concerns

  • High · security · inferred: The new restore-authority comparison reuses a catalog read capped at 10,000 unordered rows. When direct and collection allowance rows exceed that bound, including duplicates, a restored-only allowance can be omitted from comparison and later enter the effective read window. Eligible live credentials may therefore survive restoration of broader profile authority. The catalog bound is intentionally fail-closed for an individual read, but it is not a complete or stable authority representation.
Security review details

Security Blast Radius

  • inferred — The restore concern affects eligible live credentials belonging to a misclassified account. A credential holder must already possess a retained credential; the defect does not itself mint one. A full restore can evaluate multiple affected accounts, but subsequent access remains constrained by credential grants, profile verification, and library authorization. The effective allowance read is bounded to 10,000 rows, although one series ID can cover many episodes.

Security Findings and Attack Paths

  • inferred — The retained authorization finding follows restored allowance state through the capped SQL read into looserThan and carried_owners. An omitted restored-only title can escape the widening check, allowing credential carry; later selection or membership changes can make that allowance effective. This is a static, conditional attack path, not a demonstrated immediate bypass. The separate complete collection-ID comparison catches newly allowed collections but does not recover omitted direct titles or all membership differences.

Trust Boundaries and Controls

  • observed — The scoped allowance operations preserve the household-primary management boundary. Actor identity comes from authenticated context; locked-primary management requires current, non-skipped verification. Profile tokens are bound to account, session, profile, expiry, and PIN revision, and storage rechecks the manager revision during mutation. Remote-playback identities are rejected.
  • observed — Live collection allowances require a manual collection created by the acting primary profile, and reads recheck that its creator remains primary. Collection membership mutation rejects non-creators, so sharing a collection does not by itself delegate authority to change the titles it allows.

Resilience and Maintainability Implications

  • inferred — Restore transactionality contains partial failures but cannot repair a successfully committed authority misclassification. Independently sampled, unordered subsets can also make equal logical allowance sets appear different and unnecessarily discard an account's eligible credentials. Sorting the returned IDs does not stabilize which rows were selected.

Hardening Proposals

  • proposed — Separate restore-authority comparison from the bounded catalog read. Compare complete relevant authority, or conservatively refuse credential carry when completeness cannot be established. Validate the invariant with oversized sets, duplicate collection membership, differing physical row order, and restored collection-content changes.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 73.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed

Check name Status Explanation
Title check Passed The title "feat(access): let a household allow titles above a profile's rating limit" matches the main change: per-profile title allowances that let a limited profile view specific titles or collectio…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is specific and on-topic. It explains that household primary profiles can allow individual titles or personal collections above a limited profile's rating or advisory-age limit. It als…
Full details: Title check

Explanation

The title "feat(access): let a household allow titles above a profile's rating limit" matches the main change: per-profile title allowances that let a limited profile view specific titles or collections above its maturity limit. The changeset adds the storage, catalog filtering, v2 API, and web UI for this feature, so the title describes the primary change. It is clear, specific, and under one sentence.

Full details: Description check

Explanation

The description is specific and on-topic. It explains that household primary profiles can allow individual titles or personal collections above a limited profile's rating or advisory-age limit. It also covers the rule, the API and storage changes, the other code paths touched, web UI entry points, validation, risks, and AI disclosure. This matches the changeset summary, which spans migrations, the userstore and pgstore, catalog access filters, the v2 API, the web UI, backups, and Jellyfin compatibility.

Full details: Docstring Coverage

Explanation

Docstring coverage is 73.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 45 functions across 49 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Review coverage is incomplete: 2 files could not be fully reviewed. Findings from completed review steps are included; see review info for details.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T22:26:53.270462Z dea8150 New commits
🔒 Security Review ✅ Completed 2026-11-05T22:32:13.191167Z dea8150 New commits

Security findings

Advisory findings (6)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@silo-triage silo-triage Bot added enhancement New feature or request go Pull requests that update go code javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish labels Nov 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0aa2e2b56c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/jellycompat/content_direct.go Resolved
Comment thread internal/userstore/pgstore/profiles.go Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 0aa2e2b56c

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

- Jellyfin Latest and episode browsing now drop allowances when a
  client's MaxOfficialRating narrows the ceiling, like item browsing.
- Copying a collection copies only titles the household manager may
  see, for stored and smart collections alike.
- A live-allowed collection allows only the movies and series it holds.
- A failed search refresh in the profile editor keeps its results and
  offers a retry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Allowance writes are authorized before their transaction, so a PIN
change in between left revoked proof able to finish a pending write.
Each write now locks the acting primary profile and refuses with the
household 403 when its PIN revision changed, as profile writes do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae25fd2014

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@macroscopeapp

macroscopeapp Bot commented Nov 5, 2026

Copy link
Copy Markdown

Native validation tasks also warrant listing: ViewerResolver carries allowed title IDs into the shared catalog and item-access filters, which native clients use for kids filtering and playback. The PR notes that allowed titles already show and play in those clients, but the Validation tasks: line omits the native Multi-profile cases C1 and C4. Please add them, or explicitly scope those cases to profiles without allowances. Those native cases are all currently Not run, so no recorded pass is being challenged.

Suggested line:

Validation tasks: changes #1180 C2; changes #1181 C1, C4; changes Silo-Server/silo-apple#322 C1, C4; changes Silo-Server/silo-apple#323 C1, C4; changes Silo-Server/silo-android#332 C1, C4; changes Silo-Server/silo-android#333 C1, C4 (only when a profile has an allowance; profiles without allowances behave as before)

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

… writes

Allowance writes locked the acting profile and then updated the users
row, the reverse of account deletion and audited profile writes, so
they could deadlock with either. They now take the audit actor locks
and the account row first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

A full restore reads account authority from the backup's own schema
before it migrates. A backup older than title allowances has neither
table, so the read failed and the restore fell back to dropping every
carried credential. Such a backup's profiles now read as allowing
nothing above their limits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Quick104

Quick104 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Added the native Multi-profile tasks to the Validation tasks: line (silo-apple#322 and #323, silo-android#332 and #333, C1 and C4), scoped to profiles that have an allowance. Allowed titles reach those clients through the server's access filter, so their kids-filtering cases see the change too.

🤖 Claude Code (claude-opus-5-5)

…ion and cascade

profile_title_allowances.content_id references media_items, so it takes
COLLATE "C" and ON UPDATE CASCADE like every other content ID reference,
keeping the online re-id working with allowance rows present.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@macroscopeapp

macroscopeapp Bot commented Nov 5, 2026

Copy link
Copy Markdown

The Validation tasks line omits native-client cases affected by the server-side access change. The multi-profile parent also lists iOS, tvOS, Android, and Android TV tasks; their C1 (kids filtering) and C4 (restricted deep links, search, person pages, and playback) use the server access paths this PR changes. Those task results are currently Not run, so there is no prior result to invalidate, but the changed behavior should be tracked.

Suggested line:

Validation tasks: changes #1180 C2; changes #1181 C1, C4; changes Silo-Server/silo-apple#322 C1, C4; changes Silo-Server/silo-apple#323 C1, C4; changes Silo-Server/silo-android#332 C1, C4; changes Silo-Server/silo-android#333 C1, C4 (only for profiles with title allowances; profiles without them behave as before)

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Reading another profile's collection when both profiles have allowances
compared every viewer allowance with every owner allowance, up to 10^8
comparisons at the 10,000-title bound. A set of the owner's allowances
makes it linear.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 6c2528e43d

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Repeated collection copies can give a profile any number of direct
allowances, and listAllowedTitles read and rendered all of them in one
response. It now pages by keyset (created_at, content_id), newest first,
with the standard limit and cursor, over a matching index; the cursor is
bound to the account, both profiles and the viewer policy. A title's
per-profile standing checks its one allowance instead of listing every
allowance of each profile. The profile editor loads the list a page at a
time with "Show more".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

…empty state honest

An allowance change invalidated the paged list, which refetches every
loaded page in turn; it now resets that profile's list to its first page
and refreshes the other allowance queries. Cards the acting profile can't
see are dropped from each page, so an empty page shows "No titles allowed
yet" only when no page follows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 4e74b2506f

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread internal/userstore/pgstore/profiles.go Resolved
The read deduplicated live-collection titles before its LIMIT, so heavily
overlapping collections made every request of the profile scan their whole
membership. It now reads at most 50,000 whole-title entries of the live
collections (five times the 10,000-title bound) and deduplicates within
them, so overlap up to five times over still yields every distinct title,
and past that the rest stay hidden rather than costing every request more.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Comment thread internal/userstore/pgstore/profiles.go Resolved
The restore authority check compared a profile's resolved allowed titles,
which the bounded allowance read caps, so a restored live collection could
carry members past the bound that later become effective unchecked. It now
also compares every member of the profile's allowed collections, uncapped,
as it already compares every direct allowance; the comparisons use a set
rather than a search per ID.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 613f0b623f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/access/resolver.go Resolved
Account restore's preview and apply filter a profile's items with
access.ProfileMaturity, which left out the profile's allowances that
Resolve added separately, so restoring into a limited profile skipped the
history, progress and other data of titles it is allowed. ProfileMaturity
now carries them, and Resolve takes them from it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase enhancement New feature or request evidence-required Needs before-and-after evidence before the Evidence check passes go Pull requests that update go code impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P2 Limited scope, workaround exists, or polish size/XXXL 3000+ added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant