fix(storage): fail closed on unknown artifact-store modes - #388
fix(storage): fail closed on unknown artifact-store modes#388seonghobae wants to merge 7 commits into
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughArtifact store 모드 설정이 입력을 정규화하고 허용된 모드만 저장하도록 변경되었습니다. NUL 문자와 알 수 없는 모드는 ChangesArtifact store 모드 검증
Estimated code review effort: 2 (Simple) | ~10분 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/main/java/com/clearfolio/viewer/config/ArtifactStoreProperties.java`:
- Around line 59-60: Update the validation in ArtifactStoreProperties to throw
the unsupported-mode exception with only the generic message "unsupported
artifact store mode"; do not concatenate sanitized or any user-provided value,
preserving the existing validation behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1fd6c340-d75c-4b5f-90ea-3cee00cdb481
📒 Files selected for processing (2)
src/main/java/com/clearfolio/viewer/config/ArtifactStoreProperties.javasrc/test/java/com/clearfolio/viewer/config/ArtifactStorePropertiesTest.java
Objective
Reject unsupported
clearfolio.artifact-store.modevalues instead of silently treating every non-in-memorytoken as filesystem storage. Protected main currently retains arbitrary values such ascloud;ArtifactStoreConfigthen falls through to the filesystem implementation. A typo or unsupported external-store configuration can therefore boot successfully while persisting artifacts somewhere materially different from the operator's stated intent.Test-first state
Protected
mainwas independently resolved at exact55d7ae8647208e301f282350f076eeddaba61d11. This Draft starts intentionally RED at exact test-only headaadf4889535e74dec22f4bf7c1ea80591fd06640, directly based on that baseline.ArtifactStorePropertiesTest.setModeRejectsUnknownStorageModesrequires an unsupported normalized mode to throw a controlledIllegalArgumentExceptionand leave the secure filesystem default unchanged. Protected main currently acceptscloud, so the focused regression is expected to fail before the production repair.Scope
Only artifact-store mode validation and focused regression coverage. It does not change artifact bytes, filesystem write/rollback logic owned by active PR #355, tenant authority, signed links, deletion lifecycle, or external credential/identity work.
Acceptance
Observe exact-head RED -> smallest production validation -> exact-head
mvn -B --no-transfer-progress verifywith zero failures/errors/skips, exact owned-production coverage and strict Javadocs -> CI/Security Scan/SAST/fuzz -> current reviews/threads/live-base refetch. Keep Draft until the unchanged exact implementation head is GREEN. Qualifying independent non-author approval remains a separate protected-merge gate.Summary by CodeRabbit