Repository navigation
Conversation
An unknown visibility value reached the library_collections CHECK constraint and surfaced as a 500. Validate it in the handler and return a visibility field error instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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 |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
The PR body is missing the required Please add: Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
… visible Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Silo's pull request guidance changed today (#2016). A PR that changes what a user sees now needs before-and-after evidence in its Evidence section, and a PR with no visible change says Missing here: Needs the line 'Evidence: none, no user-visible change'. The rules are in Show visible changes, and the PR template shows the Evidence section layout. I've converted this PR to draft for now. Mark it ready for review once the Evidence section is filled in. Generated by Claude Code |
|
Thanks for the pointer to the updated guidance. Evidence for this one: Evidence: none, no user-visible change The change only affects how the admin collections create/update endpoints answer an unknown |
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:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review summaryReviewed head: Fit: 9/10 · Readiness: 9/10 — ready I found no defects in the code. It closes #1650 as filed.
PR body changeI corrected the first line under Risks. It said the change returns A note for maintainers, not a blockerOn update, an explicit Pre-existing defect, filed separately
Validated featuresNothing changes. On the Collections server task (#193), the passed cases S1–S3, S5, and the passed parts of S4 and S6 cover admin authorization, reads, and personal collections. Requests with Other checks
Review by Claude Code (claude-opus-5-5) with a Codex (gpt-6.1-sol) cross-check. |
Problem
Closes #1650
Related issue: N/A
Validation tasks: none
Creating or updating an admin collection with a
visibilityvalue other thanvisibleorhiddenreturned500 internal_error. The handler passed the string straight to the repository, where it violatedlibrary_collections_visibility_check. This change rejects unknown values with a 400 field error before any database access.Approach
Admin create and update now validate
visibilityfirst. Unknown values return avisibilityfield error that names the allowed values. On create, an empty value still defaults tovisible. On update, an omitted field leaves visibility unchanged and an explicit empty value is normalized tovisible, since passing an empty string through would hit the same constraint. The v1 bridge routes share these handlers, so they get the same validation.Validation
go testlocally because the package needs libvips (bimg cgo) and it would not build on my machine.gofmt: clean.Evidence: none, no user-visible change
Risks
visibility:422 validation_failedatbody.visibilityon/api/v2, which is what the issue asked for, and400 bad_requeston the v1 bridge routes.visibilityon update now sets the collection tovisibleinstead of getting a 500.Checklist
AI Disclosure
"visibility": ""still passed validation and would hit the constraint. Fixed by normalizing an explicit empty value tovisibleon update; Kody confirmed the approach. CodeRabbit hit its review limit and did not review this PR.🤖 Generated with Claude Code
Note
Reject unknown visibility values on admin collection create and update
validateCollectionVisibilityand ahiddenconstant; only empty,visible, andhiddenare accepted, and other values return a visibility field error in admin_collections_service.go.visible) vianormalizeCollectionVisibilityUpdate.createAdminCollectionandupdateAdminCollectionfor any callers relying on the old passthrough behavior.Macroscope summarized 792e885.