Skip to content

tmp: snapshot of ~/projects/research/codegraph-rust (2026-05-04)#1

Draft
sashml wants to merge 4 commits into
mainfrom
tmp/projects-snapshot-20260504
Draft

tmp: snapshot of ~/projects/research/codegraph-rust (2026-05-04)#1
sashml wants to merge 4 commits into
mainfrom
tmp/projects-snapshot-20260504

Conversation

@sashml
Copy link
Copy Markdown
Owner

@sashml sashml commented May 4, 2026

Purpose

Preservation snapshot of dirty working tree from ~/projects/research/codegraph-rust before Side B cleanup.

DO NOT MERGE until reconciliation decision is made.

Context

Captured via cbi snapshot (svaiml/codebase-intelligence) as part of cross-workspace drift audit.

Field Value
Original branch surrealdb-3x-migration
Upstream Jakedismo/codegraph-rust (third party)
Fork sashml/codegraph-rust
Dirty files staged 8

Dirty file notes

  • codegraph-mcp.sh — MCP launch script; API key redacted (REDACTED_OPENROUTER_API_KEY) before push
  • history.txt / schema/history.txt — local query history files
  • patches/objc_exception/ — local patch for macOS ObjC exception handling
  • setup-surrealdb-service.sh — local SurrealDB setup script

⚠️ Secret redacted

codegraph-mcp.sh:23 contained a live OpenRouter API key — redacted to REDACTED_OPENROUTER_API_KEY before push. Rotate that key at openrouter.ai if it was still active.

Next steps

  • Rotate OpenRouter API key (it was exposed in local file)
  • Decide if surrealdb-3x-migration branch work should move to zombocrafteco
  • Delete ~/projects/research/codegraph-rust once confirmed

sashml added 4 commits March 25, 2026 13:46
Breaking API changes from 2.x to 3.x required updates across
graph storage, graph functions, migrations, and schema files.

Changes:
- Bump surrealdb dep to "3" in codegraph-graph and codegraph-mcp Cargo.toml
- Replace all `type::thing(...)` with `type::record(...)` in SurrealQL
  strings and schema files (renamed in 3.x)
- Remove `surrealdb::Value` / `surrealdb::sql` usage (removed in 3.x);
  replace surreal_to_json/sql_value_to_json with json_decompress_walk
  that operates on native serde_json::Value
- Fix `.take::<T>()` calls: use Vec<serde_json::Value> or
  Option<serde_json::Value> intermediaries (SurrealValue trait requirement)
- Fix `.bind()` / `.content()`: convert custom structs via
  serde_json::to_value() since only SurrealValue types are accepted
- Add strip_nulls() helper: SurrealDB 3.x distinguishes NULL from NONE;
  option<T> fields reject JSON null — strip nulls before every bind/content
- Fix auth structs Root/Database: fields are now String not &str
- Fix RecordIdKey: use .as_str() instead of &String references
- Add avg_coverage_score field to project_metadata table in schema
- Update Cargo.lock for surrealdb 3.0.4 dependency tree
…ngs-onnx feature chain

- EmbeddingGenerator::with_config() now initializes AdvancedEmbeddingGenerator
  when provider = "onnx", loading model from CODEGRAPH_LOCAL_MODEL env var
- Add embeddings-onnx feature to codegraph-mcp and codegraph-mcp-server,
  enabling the full feature chain: server -> mcp -> vector/onnx
- Enables local BAAI/bge-small-en-v1.5 embeddings (384-dim) without any
  external API calls via ORT_DYLIB_PATH + ort crate
… (TASK-13..16)

- TASK-13: Add Language::FreePascal enum variant to codegraph-core/types.rs
- TASK-14: Register tree-sitter-pascal 0.10.2 grammar in LanguageRegistry
  with extensions: .pas .pp .lpr .lrs .inc (ABI version compatible)
- TASK-15: Add freepascal/pascal/fpc aliases to file_collect.rs extension map
  and universal auto-detection extension list
- TASK-16: Implement FreePascalExtractor in languages/freepascal.rs
  Extracts: Module (unit/program/library), Function (defProc/defFunc),
  Struct (record), Class (class with Extends edges), Interface,
  Import (uses clause with Imports edges), Calls edges (exprCall)
  5/5 unit tests pass including node extraction and language detection
…degraph-rust (20260504)

Automated preservation before Side B cleanup.
Original branch: surrealdb-3x-migration
Files staged: 8
Source: cbi snapshot (codebase-intelligence)
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