Skip to content

Rust ORM Phase 1: Route observability collections through Rust data-daemon worker#263

Open
joelteply wants to merge 2 commits intofeature/coding-capabilitiesfrom
feature/rust-orm-migration
Open

Rust ORM Phase 1: Route observability collections through Rust data-daemon worker#263
joelteply wants to merge 2 commits intofeature/coding-capabilitiesfrom
feature/rust-orm-migration

Conversation

@joelteply
Copy link
Contributor

Summary

  • Wire the existing Rust data-daemon worker (2,292 lines, Unix socket IPC, per-connection threading) into DataDaemon's per-collection adapter routing
  • 10 write-heavy observability collections now route through Rust instead of TypeScript SQLite: cognition_state_snapshots, cognition_plan_records, cognition_plan_step_executions, cognition_self_state_updates, cognition_memory_operations, cognition_plan_replans, adapter_decision_logs, adapter_reasoning_logs, response_generation_logs, tool_execution_logs
  • Rust worker's data_create/data_update now filter columns via PRAGMA table_info before INSERT/UPDATE (fixes 57 write errors from TypeScript entities with fields that don't map to SQL columns)
  • No fallback: process.exit(1) if Rust worker socket not available at startup; writes fail hard if worker dies mid-operation (proven by killing worker and observing ECONNREFUSED errors)

Verified

  • 1,113 Rust worker requests, 779 creates, 0 errors
  • Killed Rust worker → writes to routed collections fail with ECONNREFUSED (no silent fallback to TypeScript SQLite)
  • Non-routed collections (users, chat_messages) continue through TypeScript SQLite unaffected
  • ping, data/list, chat/send all functional

Rollback

Remove await this.connectRustDataWorker(); from DataDaemonServer.initializeDeferred(). One line.

Test plan

  • TypeScript + Rust compile clean
  • 0 write errors in Rust timing log across 779 creates
  • Kill-test: Rust worker death causes write failures (no fallback)
  • Non-routed collections still work through TypeScript SQLite
  • System ping, chat, data operations all functional

DeepSeek Assistant and others added 2 commits February 5, 2026 10:18
…njection

- New workspace/list command: scans .git/continuum-worktrees/ on disk, merges
  WorkspaceStrategy in-memory state, returns git status per workspace. Supports
  --personaId filter. Generated via CommandGenerator.

- ProjectContextSource RAG fix: falls back to main repo when no persona-specific
  workspace exists (solves chicken-and-egg — personas now see codebase context
  before first code/* tool use). Distinguishes "Shared Repository" vs "Your
  Workspace" with bootstrapping hint.

- SentinelAutoConfig: auto-detects build/test/lint commands from code/shell/execute
  and injects sentinel classification rules. Wired into PersonaToolExecutor as
  fire-and-forget after shell execution starts.

- Git cleanup: removed 39 stale undefined/* branches, 2 stale session worktrees,
  fast-forwarded 3 valid ai/ worktrees to HEAD.
…aemon worker

Wire the existing Rust data-daemon worker (Unix socket IPC) into the
DataDaemon's per-collection adapter routing. 10 write-heavy observability
collections now go through Rust instead of TypeScript SQLite.

Key changes:
- DataDaemonServer: connectRustDataWorker() waits for socket, registers
  RustWorkerStorageAdapter for 10 collections, process.exit(1) if worker
  not available (no silent fallback)
- DatabaseHandleRegistry: re-enable RustWorkerStorageAdapter import and
  'rust' case in open()
- DefaultStorageAdapterFactory: 'rust' case returns RustWorkerStorageAdapter
- Rust data-daemon worker: PRAGMA table_info column filtering in
  data_create/data_update (and timed variants) to handle TypeScript entities
  with fields that don't map to SQL columns

Verified: 1113 requests, 779 creates, 0 errors. Killing the Rust worker
causes writes to fail (no fallback to TypeScript SQLite).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant