Skip to content

⚡ Bolt: FileSystemArtifactStore I/O 최적화 - #273

Closed
seonghobae wants to merge 1 commit into
mainfrom
bolt-filesystem-artifact-store-optimization-14427118262897014569
Closed

⚡ Bolt: FileSystemArtifactStore I/O 최적화#273
seonghobae wants to merge 1 commit into
mainfrom
bolt-filesystem-artifact-store-optimization-14427118262897014569

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

💡 What: FileSystemArtifactStore.javagetPdf 메서드에서 파일을 읽기 전 호출하던 Files.exists(pdfPath) 체크를 제거하고, 예외 처리(NoSuchFileException)로 대체했습니다.
🎯 Why: 기존 방식은 TOCTOU(Time-Of-Check to Time-Of-Use) 경쟁 조건을 발생시킬 수 있으며, 파일을 성공적으로 읽는 해피 패스(happy path)에서 불필요한 디스크 I/O 체크(stat)를 추가로 발생시켜 성능 저하를 유발했습니다.
📊 Impact: 디스크 I/O 작업 감소 및 파일 읽기 동작 안정성 확보
🔬 Measurement: mvn testcheckstyle 통과 확인 완료.


PR created automatically by Jules for task 14427118262897014569 started by @seonghobae

Summary by CodeRabbit

  • 버그 수정
    • PDF 파일이 존재하지 않는 경우에도 오류를 발생시키지 않고 결과 없음으로 처리하도록 개선했습니다.
    • 파일을 읽는 중 파일이 삭제되거나 접근할 수 없게 된 상황도 안정적으로 처리합니다.

FileSystemArtifactStore.java의 getPdf 메서드에서 파일을 읽기 전 Files.exists()를 호출하던 것을 제거하여 TOCTOU(Time-Of-Check to Time-Of-Use) 경쟁 조건 취약점을 해결하고, I/O 작업을 1회 줄여 성능을 향상시켰습니다. 대신 NoSuchFileException을 캐치하도록 변경했습니다.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5363703b-0e8a-450c-886b-902a54cdb78e

📥 Commits

Reviewing files that changed from the base of the PR and between f3cc09a and 5e81e0d.

📒 Files selected for processing (1)
  • src/main/java/com/clearfolio/viewer/artifact/FileSystemArtifactStore.java

📝 Walkthrough

Walkthrough

FileSystemArtifactStore.getPdf가 파일 존재 여부를 먼저 확인하지 않고 직접 읽도록 변경되었습니다. 읽기 중 NoSuchFileException이 발생하면 빈 Optional을 반환합니다.

Changes

아티팩트 파일 읽기

Layer / File(s) Summary
PDF 직접 읽기 및 누락 파일 처리
src/main/java/com/clearfolio/viewer/artifact/FileSystemArtifactStore.java
getPdf가 파일을 직접 읽습니다. 읽기 중 파일이 없으면 NoSuchFileException을 처리하고 빈 Optional을 반환합니다.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 FileSystemArtifactStore의 I/O 최적화라는 주요 변경 사항을 명확하게 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt-filesystem-artifact-store-optimization-14427118262897014569

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Collaborator Author

Closing as an exact functional duplicate already contained in authoritative parent #270 at exact head 26563218ae42eaa876c784fcf56b27f8cb810080. The parent's FileSystemArtifactStore.getPdf already performs the direct read, catches NoSuchFileException, returns Optional.empty() for a missing artifact, and preserves fail-closed handling for other I/O failures, with the parent's broader exact-head coverage, security, SBOM, privacy, and acceptance evidence. Keeping this one-file PR open would duplicate the same patch and disrupt stack ordering.

@seonghobae seonghobae closed this Aug 5, 2026
@google-labs-jules

Copy link
Copy Markdown

Closing as an exact functional duplicate already contained in authoritative parent #270 at exact head 26563218ae42eaa876c784fcf56b27f8cb810080. The parent's FileSystemArtifactStore.getPdf already performs the direct read, catches NoSuchFileException, returns Optional.empty() for a missing artifact, and preserves fail-closed handling for other I/O failures, with the parent's broader exact-head coverage, security, SBOM, privacy, and acceptance evidence. Keeping this one-file PR open would duplicate the same patch and disrupt stack ordering.

Understood. Acknowledging that this work is an exact functional duplicate of the authoritative parent #270 and is now obsolete. Stopping work on this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant