Source: OCR_ANALYSIS_REPORT.md, OpenCode Review report generated on 2026-08-12.
Findings: M-1, M-2. desktop/src/security/private-file.cjs writes private files atomically, but the OCR report flags two durability/security gaps: parent directories are not fsynced after rename, and existing directories may retain overly broad permissions because mkdirSync(..., mode: 0o700) only applies to newly created directories.
Expected fix:
- After atomic rename, fsync the parent directory where supported.
- Explicitly enforce
0o700 permissions on existing private directories.
- Keep behavior portable across macOS, Linux, and Windows.
- Add tests for pre-existing broad directory permissions and successful durable replacement.
Source: OCR_ANALYSIS_REPORT.md, OpenCode Review report generated on 2026-08-12.
Findings: M-1, M-2.
desktop/src/security/private-file.cjswrites private files atomically, but the OCR report flags two durability/security gaps: parent directories are not fsynced after rename, and existing directories may retain overly broad permissions becausemkdirSync(..., mode: 0o700)only applies to newly created directories.Expected fix:
0o700permissions on existing private directories.