Launch C++ Alexandria from Start/Heal, keep Go as rollback - #127
Conversation
Start and Heal prefer build/cpp_memory_store/Release rag-service and rag-rebuild. Kernel and Librarian resolve memory-store.exe the same way. Live desk now serves C++ rag-service on :8084.
There was a problem hiding this comment.
🟡 Changes recommended
Multiple resolvers assume a multi-config build\cpp_memory_store\Release\... layout and will fail to find C++ binaries under single-config CMake generators (e.g., Ninja), causing unexpected fallback to Go.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR cuts Start/Heal (and related tooling) over to the C++ Alexandria (memory-store / rag-service / rag-rebuild) binaries as the preferred “desk default”, while keeping the existing Go godbrain_core/memory_store implementation as a rollback path. It updates runtime resolution logic across PowerShell, the kernel, and Librarian, and adjusts build/docs to match the new default.
Changes:
- Prefer C++ Alexandria executables from
build/cpp_memory_store/Release(then fall back to Go) in Start/Heal, kernel, and Librarian. - Build the C++ memory store first in
scripts/build_pipeline.ps1, keeping the Go build as rollback. - Update repository documentation (README/ARCHITECTURE/AGENTS + cpp_memory_store README) to reflect the new “desk launch” preference.
File summaries
| File | Description |
|---|---|
| Start-GodBrain.ps1 | Adds Alexandria exe resolver and starts rag-service.exe via preferred C++ path. |
| Heal-GodBrain.ps1 | Adds Alexandria exe resolver and uses it for rag-rebuild.exe allowlisted repair. |
| scripts/Verify-SkillLab.ps1 | Prefers C++ memory-store.exe for recording skill runs, with Go fallback. |
| scripts/build_pipeline.ps1 | Builds C++ memory store first, then Go as rollback, then Librarian. |
| godbrain_core/cpp_tools/librarian.cpp | Updates default memory-store.exe resolution to prefer C++ build output. |
| godbrain_core/cpp_kernel/memory.cpp | Updates kernel-side memory-store.exe resolution candidate order. |
| README.md | Updates status table to reflect C++ store as preferred launch path. |
| ARCHITECTURE.md | Updates listener/process table for :8084 preference order. |
| AGENTS.md | Updates architecture notes to reflect C++ store as desk boundary with Go rollback. |
| godbrain_core/cpp_memory_store/README.md | Updates README to reflect Start/Heal preference and test DB guidance. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| function Resolve-AlexandriaExe([string]$Name) { | ||
| foreach ($p in @( | ||
| (Join-Path $RepoRoot "build\cpp_memory_store\Release\$Name"), | ||
| (Join-Path $RepoRoot "godbrain_core\cpp_memory_store\$Name"), | ||
| (Join-Path $RepoRoot "godbrain_core\memory_store\$Name") | ||
| )) { | ||
| if (Test-Path -LiteralPath $p) { return $p } | ||
| } | ||
| return Join-Path $RepoRoot "godbrain_core\memory_store\$Name" | ||
| } |
| function Resolve-AlexandriaExe([string]$Name) { | ||
| foreach ($p in @( | ||
| (Join-Path $RepoRoot "build\cpp_memory_store\Release\$Name"), | ||
| (Join-Path $RepoRoot "godbrain_core\cpp_memory_store\$Name"), | ||
| (Join-Path $RepoRoot "godbrain_core\memory_store\$Name") | ||
| )) { | ||
| if (Test-Path -LiteralPath $p) { return $p } | ||
| } | ||
| return Join-Path $RepoRoot "godbrain_core\memory_store\$Name" | ||
| } |
| const std::string dir = exe_dir(); | ||
| const std::string candidates[] = { | ||
| dir + "\\..\\..\\build\\cpp_memory_store\\Release\\memory-store.exe", | ||
| dir + "\\..\\cpp_memory_store\\memory-store.exe", | ||
| dir + "\\memory-store.exe", | ||
| dir + "\\..\\memory_store\\memory-store.exe", |
| static std::string resolve_memory_store_exe(const std::string& exe_dir) { | ||
| const std::string candidates[] = { | ||
| exe_dir + "\\..\\..\\build\\cpp_memory_store\\Release\\memory-store.exe", | ||
| exe_dir + "\\..\\cpp_memory_store\\memory-store.exe", | ||
| exe_dir + "\\..\\memory_store\\memory-store.exe", | ||
| }; | ||
| for (const auto& candidate : candidates) { | ||
| if (file_exists_path(candidate)) return candidate; | ||
| } | ||
| return exe_dir + "\\..\\memory_store\\memory-store.exe"; | ||
| } |
| $store = Join-Path $RepoRoot "build\cpp_memory_store\Release\memory-store.exe" | ||
| if (-not (Test-Path -LiteralPath $store)) { | ||
| $store = Join-Path $RepoRoot "godbrain_core\memory_store\memory-store.exe" | ||
| } |
| # 0. C++ store (desk default). Go build below remains rollback. | ||
| Write-Host "Building C++ memory-store / rag-service / rag-rebuild..." | ||
| cmake -S "$RepoRoot\godbrain_core\cpp_memory_store" -B "$RepoRoot\build\cpp_memory_store" -DBUILD_TESTING=ON | ||
| if ($LASTEXITCODE -ne 0) { throw "C++ memory-store cmake failed" } | ||
| cmake --build "$RepoRoot\build\cpp_memory_store" --config Release | ||
| if ($LASTEXITCODE -ne 0) { throw "C++ memory-store build failed" } |
Why
Operator GO to cut Start/Heal over to the C++ sibling. Go
memory_store/stays as rollback.What
Start/Heal/kernel/Librarian prefer
build/cpp_memory_store/Releasethen Go.build_pipeline.ps1builds C++ first.Verified on this host
build\cpp_memory_store\Release\rag-service.exepid 20216/healthready lexical, generationrebuild-46390f68-…/v1/searchverified: 2 hits,citation_status=available,evidence_status=byte_valid/api/status200; llama left running