Skip to content

to-surrealdb#30

Open
woss wants to merge 20 commits into
mainfrom
to-surrealdb
Open

to-surrealdb#30
woss wants to merge 20 commits into
mainfrom
to-surrealdb

Conversation

@woss

@woss woss commented Jul 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

@woss
woss force-pushed the to-surrealdb branch 3 times, most recently from 8179243 to 9e626af Compare July 13, 2026 15:29
woss added 13 commits July 16, 2026 19:34
ui fixes

merge centroids and build-index

centroids in surreal

improvements to mcp calls

fix: test mock keys snake_case, remove old .surql scripts, update migrate.surql
…e handling

- createRecord: type::thing() → type::record() (renamed in 3.x)
- ensureUser: db.update().merge({}) → UPSERT via queryDb (UPDATE only updates existing)
- ensureChat: db.update().merge({...}) → UPSERT via queryDb
- getOrCreateUser: db.update().merge({...}) → UPSERT via queryDb + db.select()
- Verified: SDK CBOR encoding handles new Date() correctly through WebSocket RPC
- All 4 functions tested against SurrealDB 3.1.4
…as_chunks edge traversal

- migrate.surql: remove slug/type from chunks table, add has_chunks edge table (page_posts/page_experience → chunks), add REMOVE TABLE has_chunks to drop list
- build-index.ts: remove slug/type from ChunkRow, call createEdges after upsertChunks to establish parent→chunk edges
- build-index.test.ts: update mocks for upsertChunks (returns string[]) and createEdges, remove row.type assertion

Full re-index required after deployment — existing chunks have no edges.
…, tests, migration doc

- interfaces.ts: remove slug/type from ChunkRecord, add HasChunkEdge, createEdges, StoredChunk JSDoc
- surreal-service.ts: upsertChunks returns string[], createEdges via RELATE in transaction, deleteChunksBySlug cleans edges, searchChunks uses <-has_chunks.in edge traversal
- surreal-service.test.ts: add createEdges tests, update upsertChunks/searchChunks mocks
- db/index.ts: re-export updated types
- rate-limiter.ts: revert to in-memory Map (remove SurrealDB-backed RateLimitRepo)
- rate-limiter.test.ts: update for in-memory implementation
- docs/CHUNK-MIGRATION.md: re-index procedure documentation

Full re-index required after deployment — existing chunks have no edges.
woss added 7 commits July 18, 2026 22:47
Subscribe-first SSE pattern with buffer + ID dedup prevents missed events.
Try/catch + publishLive fallback on publishPersistent. All callers awaited.
- chat-events.ts: try/catch + fallback publishLive
- save-result.ts: 3 publishPersistent calls awaited
- early-gates.ts: 6 publishPersistent calls awaited
- +server.ts: subscribe-first SSE with buffer + seenIds dedup
- Delete skills: blog-writing-guide, copywriting, vitest, frontend-design, frontend-philosophy
- Create src/lib/types.ts with ExperienceEntry, WorkflowFilePlaceholder, WorkflowFileEntry, BlogPost
- Update experience/posts routes to import from $lib/types instead of $content
- Update build-index.ts to import parseMarkdownFrontmatter from $lib/server/markdown.ts
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