Repository navigation
Explain refused Circles ownership transfers - #84
Conversation
Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesCircle ownership transfer
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The ownership-transfer error handling has no identified issue that needs correction before merge. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change explains a known server refusal without adding a write path or relaxing permissions. The no-change message depends on the server’s rollback behavior, which the available test checks for the two ownership levels but not for all server state. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #84 +/- ##
=======================================
Coverage 97.40% 97.41%
=======================================
Files 33 33
Lines 4819 4828 +9
=======================================
+ Hits 4694 4703 +9
Misses 125 125
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Making someone the owner of a circle fails on many servers with a raw database error. When Circles transfers ownership, it locks the member rows with a
SELECT ... FOR UPDATEover a left join. SQLite cannot build that query ("Operation 'FOR UPDATE' is not supported by platform"). PostgreSQL refuses it ("FOR UPDATE cannot be applied to the nullable side of an outer join"). Circles fixed this in nextcloud/circles#2916 and #2917 (stable34 and stable35, merged 2026-09-18). Nextcloud 35.0.1 has the fix. 34.0.4, 35.0.0 and the current 32 and 33 images do not, and MySQL was never affected. Moving CI to PostgreSQL (#82) exposed it: the owner-transfer test still skipped on thenextcloud:34image, with a skip message that blamed SQLite.update_circle_member_levelnow explains such a refusal:The match needs "FOR UPDATE" together with "not supported" or "outer join". Other errors, and the same error for any other level, pass through unchanged. The docstring mentions it in one sentence.
Tested on the official Nextcloud 34 image with PostgreSQL 17, where the transfer is refused. The integration test now checks that the owner and the member kept their levels before it skips, and the skip names the Circles fix. The Circles tests pass on the local MySQL servers for Nextcloud 34 and 35. Unit tests cover the PostgreSQL and SQLite refusals, an unrelated FOR UPDATE error and non-owner levels.
Summary by CodeRabbit