fix(reliability): roll back partial filesystem artifact writes - #355
fix(reliability): roll back partial filesystem artifact writes#355seonghobae wants to merge 5 commits into
Conversation
|
Warning Review limit reached
Next review available in: 37 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 (2)
📝 WalkthroughWalkthrough
Changes아티팩트 부분 쓰기 처리
Estimated code review effort: 2 (Simple) | ~15 minutes 🚥 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/artifact/FileSystemArtifactStore.java`:
- Around line 116-121: Update rollbackPartialWrite so metadataPath(docId) and
pdfPath(docId) deletion each runs in its own try/catch, adding every IOException
to writeFailure as a suppressed exception while always attempting both
deletions. Add a regression test that makes the metadata path a non-empty
directory, verifies that deletion fails, and confirms the PDF file is still
deleted.
🪄 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: 5bba0ea4-d76d-4fe6-9773-98c479c8930b
📒 Files selected for processing (2)
src/main/java/com/clearfolio/viewer/artifact/FileSystemArtifactStore.javasrc/test/java/com/clearfolio/viewer/artifact/FileSystemArtifactStorePartialWriteTest.java
Objective
Prevent the standalone filesystem artifact store from leaving buyer-visible PDF bytes on disk when the matching metadata sidecar fails to persist. Protected main currently writes the PDF first and, on a later metadata write failure, throws while leaving the PDF readable after restart.
Test-first state
This Draft starts intentionally RED at exact test-only head
f49825645e516a378219af1f328cef7c82441e07.FileSystemArtifactStorePartialWriteTestuses the existing injectable writer seam to persist the PDF and fail only the metadata write, then requires both files to be absent andgetPdfto return empty. Protected main leaves the PDF behind, so this regression must fail before the production repair.Scope
This is a bounded
FileSystemArtifactStoreintegrity/reliability repair. It does not implement durable deletion receipts, lifecycle locking, distributed fencing, Office conversion, credential/OIDC work, viewer JavaScript, or canonical cross-cutting documentation. Stale broad PR #268 also mentions this artifact-store path, but its only file-local delta is already present on protected main; this PR introduces a new current-base partial-write invariant rather than copying stale ancestry.Acceptance
Observe exact-head RED -> smallest production rollback fix -> focused regression GREEN -> exact-head
mvn -B --no-transfer-progress verify, zero missed owned production coverage and public Javadocs -> CI/Security Scan/SAST/fuzz -> current reviews/threads/live-base refetch. Keep Draft until exact-head GREEN evidence exists. Qualifying independent write-authorized approval remains a separate protected-merge gate.Summary by CodeRabbit
버그 수정
테스트