Skip to content

[BUG] Broken Config Repair debug section missing from --debug session log #904

@kokkil

Description

@kokkil

Describe the bug

When running mo optimize --debug, the terminal output reports ✓ Repaired 2 corrupted preference files, but the === Broken Config Repair === section is completely absent from the debug session log file (~/Library/Logs/mole/mole_debug_session.log).

This makes it impossible to verify which files were repaired, what method was used, or whether the repair was genuinely performed. All other optimization sections produce structured === Section Name === debug output — Broken Config Repair appears to be the only section where debug logging is not implemented.

Steps to reproduce

  1. Run command: mo optimize --debug
  2. Observe terminal output: ✓ Repaired 2 corrupted preference files
  3. Open ~/Library/Logs/mole/mole_debug_session.log
  4. Search for Broken Config Repair or corrupted or preference — no matching section found

Expected behavior

The debug log should include a === Broken Config Repair === section listing the files inspected and repaired (with full paths), consistent with how other sections such as === Font Cache Rebuild === or === Database Optimization === are logged.

Debug logs

Debug output
All other sections have structured === Section === blocks in the log.
The only preference-related entries found were two WARNING lines
appearing under a different section (App Saved State Cleanup):

[2026-05-15 21:42:41] WARNING: Path validation: protected path skipped:
  /Users/jong/Library/Preferences/com.adobe.Photoshop.uxp_com.adobe.ccx.start.plist
[2026-05-15 21:42:41] WARNING: Path validation: protected path skipped:
  /Users/jong/Library/Preferences/com.adobe.Photoshop.uxp_com.adobe.ccx.lrimporter.plist

No === Broken Config Repair === section exists anywhere in the log.

Environment

Mole version 1.39.0
macOS: 26.5
Architecture: arm64
Kernel: 25.5.0
SIP: Enabled
Disk Free: 269Gi
Install: Homebrew
Shell: /bin/zsh

Additional context

It is also unclear whether the two WARNING: protected path skipped entries above are related to the reported "2 repaired" count — the skipped files were not repaired, yet they are the only preference-related log entries present. This ambiguity suggests either a logging gap or a possible miscounting issue in the repair result summary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions