Repository navigation
Conversation
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The Suggested fix: change Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Quick104
left a comment
There was a problem hiding this comment.
Review of 4bd5709. The fix is sound: every deletion path now runs the existing move-then-delete transaction, and I found no concurrency or rollback gap. Locking the source row FOR UPDATE makes a concurrent assignment into the group either land before the move or fail its foreign key check after the delete.
Two low-severity cleanups are inline. I'm fixing both in a commit on this branch, so there's no need to change them yourself.
One PR-body correction, also mine to make: the Validation tasks: line says changes #1196 C1, but C1's recorded checks read the effective policy of accounts in groups that already exist. None of them deletes a group, and this diff doesn't touch policy resolution, so the line should be Validation tasks: none. The Macroscope comment above says the same thing.
Delete and DeleteConditional now both move members to the default group, so DeleteMovingMembers and the v2 service's dispatch between the two methods no longer chose anything. The transaction now lives in DeleteConditional, the service calls it directly, and the handler test that pinned which method ran is gone. The no-default test asserts ErrGroupDestinationRequired, the error that selects its 409 message. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Review summaryFit: 9/10 · Readiness: 9/10 — ready (assuming CI is green) Reviewed head: Deleting a group through the frozen v1 route left its members with no group, which gives them the permissive no-group policy. That is a privilege widening, and fixing it fits what the API contract allows on the v1 bridge: critical fixes only. The change reuses the move-then-delete transaction that v2 already ran, so every delete path now does the same thing. It adds no setting and no new operation; the only contract change is declaring the 409 that v2 already returned for the default group. Addressed in this review (both low severity, fixed in
Verification of the follow-up commit. The
The existing evidence page covers Remaining issues: none blocking. Two things predate this PR and are outside its scope. Both handlers read the member list for the recommendations rebuild before the delete transaction, so an account assigned to the group in that gap is moved but its recommendations are not rebuilt; reads still apply the current policy. The v2 create and update operations can return 409 but do not declare it in the OpenAPI document. Validated features: none affected. I couldn't list passed cases from the v1.0 board because the token lacks User manual: unaffected. The Access and Accounts pages on siloserver.org don't describe group deletion. Apple and Android: no change needed. Neither app calls the access-group delete route, and the web admin uses v2. Cross-provider round: Codex ( Reviewed by Claude Code ( |
Problem
Related issue: #1402
Validation tasks: none
Deleting an access group through v1 clears its members' group assignments. Members without overrides then inherit the permissive no-group policy, which can silently grant permissions the deleted group denied. This fix moves them to the administrator's default group, matching v2's existing transfer behavior.
This partially repairs #1402. A destination picker, explicit no-group selection and existing ungrouped accounts remain outside this PR.
Approach
All store deletion entry points use the existing atomic transfer transaction. It advances affected accounts' policy revisions and preserves their overrides and sign-ins. If a populated group has no default destination, both APIs return the existing 409 conflict code without changing state. Empty non-default groups can still be deleted.
This is a critical security correction to the frozen v1 bridge. No request or response fields change; v2's OpenAPI now declares its existing DELETE conflict response. The API documentation describes both versions. Apple and Android need no caller changes; Jellyfin uses the same policy resolver. The Access and Accounts manual pages remain accurate.
Validation
read:projectscope; these tasks were read directly.4282c064efolds the move intoDeleteConditionalwith no behavior change. Its access DB tests pass, and a local server built from it repeated the v1/v2 transfer, default-group 409, missing-default 409 (state unchanged) and empty-group deletion checks with synthetic accounts.Evidence
Live API/database observations, correlated request logs and failing/passing regression output cover base
365e3d436and head4bd570974. The later refactor commit4282c064echanges no behavior; its checks are listed under Validation. Development build metadata has no VCS revision; synchronized source hashes and rebuilt binary hashes are recorded separately.Evidence: https://evidence.siloserver.org/r/silo-server/issue-1402-delete-policy/
Risks
The default group's policy intentionally replaces the source group's inherited policy. Deleting a populated group in an invalid legacy state without a default now requires setting a destination first. No migration is needed.
Checklist
AI Disclosure
delegate_task; Claude provider for cross-provider review.gpt-6.1-solimplementation and code review;claude-opus-5-5plan and adversarial review.922191dedwith no candidates. Claude PR review at4bd570974checked the full diff, deletion callers, concurrency, rollback and contracts, and independently repeated the failing/passing database tests. It found no actionable defects and posted nothing./siloreview mode, Claude Code withclaude-opus-5-5, Codexgpt-6.1-solcross-provider round) at4bd570974found two low-severity cleanups, fixed in4282c064e: a redundant delete dispatch left after both store methods began moving members, and a test asserting the parent sentinel instead ofErrGroupDestinationRequired.Note
Fix access-group deletion to move members to the default group
GroupStore.DeleteConditionalnow moves members of a non-default group to the default group in the same transaction, increments their policy revisions, then deletes the source group (group_store.go)ErrGroupDestinationRequired, returned as HTTP 409 by both the v1 and v2 handlers; empty groups stay deletable and default-group deletion stays rejectedmemberMovingGroupStoreinterface andDeleteMovingMemberspath from the handler layer; all deletion now goes throughDeleteConditionalMacroscope summarized 4282c06.