Home

giogio / openez-graph

public
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: resolve 11 pre-existing test failures

3 months ago

315c8d1
Authored
asta-nguyen8/7/2026, 3:31:29 AM
- web/sqlite.ts: add better-sqlite3 fallback for Node/test env (was
  hard-crashing on require(bun:sqlite) under vitest)
- workspace-db.ts: create FTS triggers in initializeWorkspaceSchema
  (getFullWorkspaceDdl created chunks_fts table but not the insert/
  delete/update triggers — insertChunks never populated FTS)
- workspace-db.ts: backfill existing chunks into chunks_fts when the
  table is recreated on reopen (was empty after drop+reopen)
- workspace-db.ts: dedup legacy graph_edges before creating unique
  index (CREATE UNIQUE INDEX crashed on pre-existing duplicates)
- repository.ts: export restoreFtsTriggerDefinitions for reuse
- chunking.test.ts: remove stale indexCode test (module never existed,
  expectations did not match codeSearchText implementation)

Result: 133 pass, 0 fail, 1 skip (was 111 pass, 12 fail)

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Parentcbb1fd2

4 files changed
  • apps/web/src/server/sqlite.ts+19−8
  • packages/db/src/sqlite/repository.ts+1−1
  • packages/db/src/sqlite/workspace-db.ts+31−0
  • tests/chunking.test.ts+0−13