Expand description
Persistent issue storage — reads and writes .oo/issues.yaml.
This module is the only place in the IDE that performs disk I/O on behalf of the issue system. The crate::issue_registry::IssueRegistry itself is purely in-memory; this module bridges the gap between disk and registry by:
-
Loading at IDE startup: reading
.oo/issues.yaml, converting each record to aNewIssuewithmarker: None(persistent), and sendingcrate::operation::Operation::AddIssueoperations viaop_tx. -
Saving after mutations: whenever a persistent issue changes, the caller (in
apply_operation) callssave_atomicwith a snapshot of all current persistent issues. The write is fire-and-forget inside atokio::task::spawn_blockingclosure.
§File format
format_version: 1
issues:
- source: "user"
severity: "warning"
message: "TODO: improve error handling"
dismissed: false
resolved: false
created_at_secs: 1706745600
# optional fields:
path: "src/main.rs"
range_start_line: 42
range_start_col: 0
range_end_line: 42
range_end_col: 10§Error handling
- Missing file →
Ok(vec![])(first-run friendly). - Unreadable or corrupt YAML →
log::warn!thenOk(vec![])(no crash). - Save failures → the caller logs a warning; the registry state is never rolled back.
Structs§
- Issue
File - Top-level container written to
issues.yaml. - Issue
Record - A single serialisable issue record. All fields that reference internal
types use plain primitives so no extra serde derives are needed on
PositionorSeverity. - Persistent
NewIssue - Input data for creating a new persistent issue via
crate::operation::PersistentIssueOp::Add.
Functions§
- load
- Load persistent issues from
path. - save_
atomic - Atomically write
issuestopath.