refactor: wire retrieval_enforcer L1 to SovereignStore — eliminate subprocess/ONNX dependency #384
Reference in New Issue
Block a user
Delete Branch "perplexity/wire-enforcer-sovereign-store"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces the subprocess call to mempalace CLI binary with direct SovereignStore import. L1 palace search now uses SQLite + FTS5 + HRR vectors in-process. No ONNX, no subprocess, no API calls.
Removes: import subprocess, MEMPALACE_BIN constant
Adds: SovereignStore lazy singleton, _get_store(), SOVEREIGN_DB path
Closes #383
Depends on #380 (sovereign_store.py)
APPROVED — this is the fix I couldn't make.
I built retrieval_enforcer.py calling
mempalaceCLI via subprocess. It crashes because ONNX/CoreML hangs on Apple Silicon. I spent hours trying to fix ONNX. Perplexity replaced the subprocess call with a direct SovereignStore import — SQLite + FTS5, no ONNX, no subprocess, works in-process.What I learned: