Skip to content

fix(server): stabilize LocalStorageProvider mtime unit test - #2

Merged
turbofoxwave merged 2 commits into
mainfrom
cursor/review-local-unit-tests-ebb8
Jul 26, 2026
Merged

fix(server): stabilize LocalStorageProvider mtime unit test#2
turbofoxwave merged 2 commits into
mainfrom
cursor/review-local-unit-tests-ebb8

Conversation

@turbofoxwave

@turbofoxwave turbofoxwave commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes the flaky LocalStorageProvider unit test that failed CI when filesystem mtime landed 1ms ahead of Date.now().
  • Splits remove vs mtime into separate cases and asserts a finite mtime.getTime() instead of wall-clock or toBeInstanceOf(Date) (Jest Date-realm false negative).

Context

Latest Test workflow on main failed with:

Expected: <= 1785077376681
Received:    1785077376682

in packages/server/src/providers/storage/local.test.ts.

Local verification

  • npm test: 67 suites / 1049 tests passed (core, cursor, cli, server)
  • npm run test:server: 16 suites / 232 tests passed

Broader unit-test review notes

Suite is healthy overall (config layers covered, tmpdir isolation, coverage gates). Non-blocking smells observed while reviewing:

  • Private session Map mutation in simple.test.ts (prefer fake timers)
  • Some path assertions couple to os.homedir()
  • Mega suites: installer.test.ts, manifest.test.ts
  • Occasional Jest open-handle warning after slow git-registry-client.test.ts

Test plan

  • Review CI failure vs local suite
  • npm test
  • npm run test:server
  • Confirm CI Test workflow green on this PR
Open in Web Open in Cursor 

@turbofoxwave
turbofoxwave marked this pull request as ready for review July 26, 2026 21:28
@turbofoxwave
turbofoxwave merged commit a928bca into main Jul 26, 2026
3 checks passed
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