Batches pending path-status annotations in configure, view assembly, and refresh retry fanout so each set commits in one IMMEDIATE transaction instead of one sync per path.
Fails atomically: errors, panics, or process exit roll back the whole batch rather than leaving a partial prefix.
Reuses the existing age-preserving upsert and leaves synchronous=FULL durability unchanged.
Confidence Score: 5/5
This PR appears safe to merge; no actionable issues were found.
Summary
This PR saves pending path statuses in batches instead of committing each path separately.
Pending path marks now share one SQLite transaction per batch.
No actionable issues were found. Tests were inspected but not run.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Configuration] --> D[mark_pending_many]
B[View assembly] --> D
C[Refresh retry] --> D
D --> E{Any paths?}
E -- No --> F[Return without a transaction]
E -- Yes --> G[Begin immediate transaction]
G --> H[Write each pending status]
H --> I[Commit once]
H -- Error or unwind --> J[Roll back]