Refinement Implementation — Cycle 2

Summary

This cycle fixes one production security gap and two desktop reliability bugs. I expanded the CSP hook so packaged file:// renderer responses receive the app CSP, hardened crash-marker creation for fresh profiles, and made Word document creation stay successful when the optional shell.openPath follow-up throws after the file already exists.

Implementation Details

Finding Status Files Changed Notes
C1: CSP registration skips packaged file:// renderer responses Fixed src/main/security/csp.ts, tests/main/csp.test.ts Added an explicit file-scheme URL filter and updated the test to assert the real registration filter.
I1: Crash marker writes can fail on a fresh profile before the userData folder exists Fixed src/main/app/crashGuard.ts, tests/main/crashGuard.test.ts PREVIOUS_CRASH now creates the userData directory first, preserving the next-launch recovery signal.
I2: shell.openPath rejection turns a completed Word save into a reported failure Fixed src/main/services/word/WordDocumentService.ts, tests/main/wordDocumentService.test.ts shell.openPath failures are now logged as warnings after file verification instead of flipping the overall result to failure.

Changes Summary

  • Files modified: 6
  • Files created: 0
  • Findings addressed: 3 of 3
  • Findings skipped: 0 (with reasons above)

IMPLEMENTATION_COMPLETE