Skip to content

Wave B foundation dedup: utils, adapter workers, stable hash#68

Open
snbafana wants to merge 3 commits into
mainfrom
codex/wave-b-foundation-dedup
Open

Wave B foundation dedup: utils, adapter workers, stable hash#68
snbafana wants to merge 3 commits into
mainfrom
codex/wave-b-foundation-dedup

Conversation

@snbafana
Copy link
Copy Markdown
Contributor

@snbafana snbafana commented May 24, 2026

Summary

  • Consolidate copy-pasted Wave B helpers into two utils.ts modules: platforms/core/utils.ts (providerStableHash, stableId, runAdapterWorker) and db/utils.ts (chunkArray, sqlValueList).
  • Route all platform sync dedupe helpers and eight adapter workers through the shared core utils instead of per-file boilerplate.
  • Remove 13 local now() wrappers and call Date.now() directly across daemon, DB, updater, attachments, sync bundles, and realtime sessions.

Test plan

  • pnpm typecheck
  • pnpm test (492 tests)
  • platforms/core/utils.test.ts — stable hash
  • db/utils.test.ts — chunkArray

snbafana and others added 2 commits May 24, 2026 17:59
Extract shared providerStableHash, adapter worker envelope, and SQL batch utilities so platform sync code stops copy-pasting identical mechanics.

Co-authored-by: Cursor <cursoragent@cursor.com>
Consolidate stable-hash and adapter-worker into platforms/core/utils.ts, sql-batch into db/utils.ts, and remove local now() wrappers across daemon, DB, and realtime code.

Co-authored-by: Cursor <cursoragent@cursor.com>
@snbafana snbafana changed the title Wave B foundation dedup: stable hash, adapter worker, SQL batch Wave B foundation dedup: utils, adapter workers, stable hash May 24, 2026
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