fix(windows): resolve DB path isolation, WebSocket fatal classification, and OCR backfill lag#8442
fix(windows): resolve DB path isolation, WebSocket fatal classification, and OCR backfill lag#8442thesohamdatta wants to merge 8 commits into
Conversation
Cause: getReadonly() hardcoded app.getPath('userData')/omi.db, ignoring
OMI_DB_PATH. In bench/sandbox mode the write connection used the throwaway
DB while agent SQL queries read production data.
Tests that execSafeSelect resolves the database list correctly under different OMI_DB_PATH settings by checking the main DB filename.
…s only Cause: ws.readyState !== OPEN is always true inside the 'error' handler (socket is already CLOSING/CLOSED). Introduced session.connected tracking so fatal=true only fires when the error occurs before the socket ever opened. Post-connect errors resolve via the existing 'close' handler.
…s macOS Cause: readFileSync blocked the main event loop for 10-50ms per JPEG every 4 seconds. Added await readFile (async), powerMonitor.isOnBatteryPower() gate (mirrors macOS PowerMonitor), 100ms inter-frame sleep, batch bumped to 10 to match macOS batchSize.
…ixes Summarizes DB path isolation, WebSocket fatal connection fix, and OCR backfill optimization for Windows.
Avoids loading electron binary directly, resolving loading errors in non-packaged Node test runs.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Thanks @thesohamdatta — nice set of Windows bug fixes here. Static review of all five changed files looks solid. A few notes before this lands: What looks good
Wants a closer look before merge
Labels added: Not approving formally yet — this is a first-time contribution touching WebSocket connection lifecycle and DB path resolution, and the bundled CHANGELOG reformatting inflates the diff. Leaving for a maintainer to make the final call. Appreciate the work on these. |
|
Addressed all three points. WebSocket fatal test. Pulled Test command. Worth flagging: the postinstall step compiles CHANGELOG. Reverted entirely. Diff is now 4 files, all under LMK if anything broke |
|
Thanks @thesohamdatta — all three points are cleanly addressed:
Static review of the changed files looks solid: Leaving this for a maintainer to give the final approval — it's a first-time contribution touching WebSocket connection lifecycle and DB path resolution, and the only check on this path is the cubic bot, so I'd want a human sign-off before merge. The work here is good. |
Summary
Test Plan
pm test\ inside \desktop/windows\ to verify that all 517 tests pass green.