Fix large Move imports stalling after all photos are imported #1537
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 218 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.322
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1537"
general
weight: 0.35
qwts
Closes #1535.
Motivation
A 16,341-photo Move import left Overlook spinning after the file counter reached its total. The macOS spindump shows synchronous SQLite writes dominating Electron’s main thread. The Move completion handler recorded one Undo command per photo and repeatedly scanned and rewrote discarded history.
Description
Record the batch in the activity transaction. Use the command stack index to check byte usage and prune active records. Discard each old command once, release its retention hold, and redact expired Move paths once per batch. Preserve the 100-command Undo limit, byte admission order, and sensitive path expiry.
On Linux, recording 2,000 synthetic Move history records took 45.8 seconds on 0.79.1 and 0.32 seconds with the fix. The patched history step took 2.3 seconds for 16,341 synthetic records.
Documentation and changeset
The retention and custody rules in ADR-0025 still apply. A patch changeset records the performance fix.
Testing
The signed commit’s tree matches the tree tested locally. The checks below passed.
npm run lintandnpm run format:checknpm run typecheck,npm run test:compile, andnpm run test:dom:compilenpm run test:run(2,909 unit tests, 149 DOM tests, and the 200K paging benchmark)npm run check:interop-acceptanceandnpm run docs:govManual testing
On macOS, import a large folder of unique disposable photos in Move mode. Verify the completion summary appears, the photos are visible in the library, and Undo can restore a recently moved source while its lease is valid. Older commands should fall outside the 100-command limit.
<!-- agent-bot-write: ghw_69f1fb11d74c55f2 session=f601b21bf418 bot=trueline-codex-agent[bot] -->