Skip to content

feat(sync): accept encrypted seen RSS item marks - #40

Merged
D3SOX merged 1 commit into
mainfrom
seen-rss-items
Nov 3, 2026
Merged

D3SOX merged 1 commit into
mainfrom
seen-rss-items

Conversation

@D3SOX

@D3SOX D3SOX commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

OpenTubeX now marks RSS feed items as new and lets you mark them as seen or unseen, but those marks only stay on the device where you set them. To sync them, clients need a place to store them on the server.

The server now accepts an encrypted seenRssItems collection with a 16 MiB limit, the same as seen-video and seen-post marks, and advertises seen_rss_items: 1 in /health. Like other collections, it is opaque ciphertext and counts toward the account's 128 MiB total. Clients only sync the collection when the capability is present, so they keep working against older servers.

Older clients are unaffected. They ignore the new capability and only download the collections they know, as with externalMediaPositions in #39.

Proof: the collection limit and /health tests now cover the new collection and capability, and all 13 encrypted sync and health tests pass with the environment CI uses. cargo fmt --check and cargo clippy --all-targets are clean. The 6 tests that fetch real YouTube data fail locally without network access, with or without this change. A Docker build of this server advertised seen_rss_items: 1 and passed e2e/tests/network/sync-server.spec.mjs with the client from the companion pull request, OpenTubeX/OpenTubeX#2659, (11 passed, 1 skipped), which now expects the seenRssItems upload.

Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol on high.
Sol verdict: approved

Made by Claude Opus 5.5 in Claude Code (T3 Code).

View guided diff Turn on auto-fix

Clients sync the RSS feed items marked as seen in a separate seenRssItems collection. The seen_rss_items capability tells them the server accepts it; older clients ignore both.
@sourcery-ai

sourcery-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Sorry @D3SOX, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 days and 8 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The sync server now advertises support for seen RSS items, applies the 16 MiB collection limit to seenRssItems, and documents the capability and limit.

Changes: RSS Seen-Item Sync

Layer / File(s) Summary
Advertise and limit seen RSS items
src/dto.rs, src/handlers/encrypted_sync.rs, src/handlers/health.rs, README.md
SyncCapabilities adds seen_rss_items, and the sync capability response sets it to 1. The collection limit includes seenRssItems at 16 MiB. Tests check the capability and limit. The README documents the capability and limit.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: bnyro

Merge Risk: Minimal · up to 64c53

The server capability, RSS seen-item collection handling, size limits, and documentation are aligned, with no remaining actionable merge risk.

Security architecture risk: Minimal · up to 64c53

The new collection uses the existing account-scoped synchronization and storage controls. The review found no material security risk introduced or worsened by this extension.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The added write exposure is another collection within an authenticated user's account, not a new cross-account authority. Its payloads consume the existing account-wide storage allowance rather than increasing that allowance.

Trust Boundaries and Controls

  • observed — Client-supplied collection names and payloads pass through existing collection validation and authenticated-account scoping before persistence. The new allowlist entry does not bypass revision, per-request size or account-quota controls.

Resilience and Maintainability Implications

  • observed — The collection inherits existing cleanup ownership: full replacement clears its appended changes transactionally, and encrypted collection and change rows are covered by account-deletion cascades. No new cleanup lifecycle is introduced.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% 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. Documentat… 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(sync): accept encrypted seen RSS item marks" matches the main change. The changeset adds the encrypted seenRssItems collection with a 16 MiB limit, advertises the seen_rss_items capabi…
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 states that OpenTubeX marks RSS feed items as new and seen or unseen, and that the server now accepts an encrypted seenRssItems collection with a 16 MiB limit and advertises seen_rss_i…
Full details: Title check

Explanation

The title "feat(sync): accept encrypted seen RSS item marks" matches the main change. The changeset adds the encrypted seenRssItems collection with a 16 MiB limit, advertises the seen_rss_items capability, and updates the related tests and docs. The title is specific and concise.

Full details: Description check

Explanation

The description states that OpenTubeX marks RSS feed items as new and seen or unseen, and that the server now accepts an encrypted seenRssItems collection with a 16 MiB limit and advertises seen_rss_items: 1 in /health. It also covers testing and compatibility with older clients. This directly matches the changeset in README.md, dto.rs, encrypted_sync.rs, and health.rs, so the description is on-topic and specific.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% 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 2 functions across 3 files. (1 skipped: 1 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

Some tools did not complete. Review the errors below.

ast-grep (0.51.1)

ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/javascript/security/express-session-hardcoded-secret-javascript.yml

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6ae409f6-2874-46bf-b68c-3ce3c7178fb6
Commits

Reviewing files that changed from the base of the PR and between 9f459ff and 64c5306.

Files selected for processing: 4
  • README.md
  • src/dto.rs
  • src/handlers/encrypted_sync.rs
  • src/handlers/health.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@D3SOX
D3SOX merged commit ab91142 into main Nov 3, 2026
19 checks passed
@D3SOX
D3SOX deleted the seen-rss-items branch November 3, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant