Skip to content

Treat unreadable project.json files as corrupt entries instead of aborting inventory #376

Description

@kwannoel

Summary

Evidence:

  • src-tauri/src/storage.rs:152-175 records JSON parse failures in corrupt_entries, but it still does fs::read_to_string(&project_file)?; a single unreadable file aborts the entire listing.
  • restore_sessions() depends on list_projects() at src-tauri/src/commands.rs:336-348, so one unreadable project can block startup session restore.
  • MaintainerScheduler::start() also depends on list_projects() at src-tauri/src/maintainer.rs:149-160, so the same error can suppress background maintainer runs for otherwise healthy projects.
  • Existing storage coverage only checks malformed JSON (src-tauri/src/storage.rs:403-421), not unreadable files.

Remediation:

  • Handle read_to_string failures the same way as parse failures: record a CorruptProjectEntry and continue.
  • Add a regression test for unreadable project.json.

Maintainer Metadata

  • Fingerprint: commands|corruption|failure|filesystem|inventory|listing|startup|storage
  • Symptom Type: startup listing failure
  • Affected Files: src-tauri/src/storage.rs, src-tauri/src/commands.rs, src-tauri/src/maintainer.rs
  • Keywords: storage, project-inventory, filesystem, corruption

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions