Skip to content

fix: refresh local db state before writes#80

Open
omribz156 wants to merge 1 commit into
mondaycom:masterfrom
omribz156:codex/local-db-refresh-before-write
Open

fix: refresh local db state before writes#80
omribz156 wants to merge 1 commit into
mondaycom:masterfrom
omribz156:codex/local-db-refresh-before-write

Conversation

@omribz156

Copy link
Copy Markdown

Summary

  • refresh LocalDb from disk immediately before set and delete
  • add regression coverage for two LocalDb instances writing/deleting against the same backing file

This addresses #71. Previously, a LocalDb instance could keep a stale in-memory snapshot from construction time and then overwrite keys written by another instance when it later saved its own snapshot.

Verification

  • yarn install --frozen-lockfile --ignore-scripts
  • yarn test tests/utils/local-db.test.ts --runInBand
  • npx prettier --check lib/utils/local-db.ts tests/utils/local-db.test.ts
  • npx eslint lib/utils/local-db.ts tests/utils/local-db.test.ts --ext .ts --config .eslintrc.json
  • yarn build:esm
  • yarn build:cjs
  • git diff --check

Notes: ESLint reports the existing no-explicit-any warnings in lib/utils/local-db.ts; there are no lint errors from this change. git diff --check only reported local CRLF warnings on Windows.

This was implemented with Codex assistance, with the final diff manually reviewed and kept focused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant