fix: time offset flags not persisted on SQLite (#2378)#2379
Conversation
updateNodeTimeOffsetFlagsAsync() had paths for PostgreSQL and MySQL but was missing the SQLite path — it silently returned without writing. This caused: 1. Time offset not displayed in frontend (flag never written to DB) 2. Duplicate log messages every scan cycle (stateChanged always true because wasOffsetIssue was always false/undefined) Closes #2378 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job Code Review CompleteReview Checklist
✅ Review SummaryThis is a solid fix that resolves a clear architectural gap in the multi-database implementation. The change is minimal, consistent, and follows established patterns. Code Quality & Best Practices: EXCELLENTThe fix perfectly follows the established multi-database architecture patterns:
Potential Bugs: NONE IDENTIFIED
Performance: OPTIMAL
Security: SECURE
Test Coverage: ADEQUATE
Architecture Alignment: PERFECTThis fix exemplifies the multi-database architecture principles outlined in
Impact AnalysisRoot Cause: The async version was missing the SQLite code path, causing silent failures where:
Fix Impact:
Recommendation: APPROVE 🟢This is a textbook example of a focused bug fix that:
The implementation quality is excellent and aligns perfectly with the project's multi-database architecture standards. Job run | Branch: |
Summary
Fixes #2378 — time offset detected in backend logs but not displayed in frontend, with duplicate log messages every scan cycle.
Root Cause
updateNodeTimeOffsetFlagsAsync()had UPDATE paths for PostgreSQL and MySQL but no SQLite path — it silently returned without writing. The sync version (updateNodeTimeOffsetFlags) had the SQLite path, but the scheduler calls the async version.Impact
getNodesWithTimeOffsetIssues()queriesWHERE isTimeOffsetIssue = 1but the flag was never setnode.isTimeOffsetIssuefrom DB — always false since it was never written, sostateChangedwas always true and the warning logged every scanFix
Added the missing SQLite UPDATE path to
updateNodeTimeOffsetFlagsAsync(), matching the pattern from the sync version.Files Changed
src/services/database.tsupdateNodeTimeOffsetFlagsAsyncTest plan
🤖 Generated with Claude Code