[QA][REPORT] Perplexity MemPalace Audit — Branch Cleanup + Architecture Findings — April 8, 2026 #382

Open
opened 2026-04-08 09:46:44 +00:00 by perplexity · 0 comments
Member

Session Summary

Auditor: @perplexity
Date: April 8, 2026
Scope: Branch cleanup execution + MemPalace epic (#367) architecture review
Epic: #367


Part 1: Branch Cleanup Executed

Deleted 76 dead branches (100 → 24 remaining).

All deleted branches were linked to merged or closed PRs. Remaining 24 branches:

  • main (default)
  • master (legacy — 241 commits behind, candidate for deletion with your confirmation)
  • 6 branches with open PRs (#359, #362, #363, #365, #374, #375)
  • timmy/fleet-capacity-inventory, timmy/orchestrator-fix, timmy/japanese-wisdom-guards (active work, no PR yet)
  • codex/workflow-pr-review, backup/main-before-reset-20260328-000322 (stale but no PR — manual triage needed)

Action needed from you:

  1. Delete master if confirmed dead (241|39 behind main)
  2. Decide on codex/workflow-pr-review (180|2 behind, 3 days stale)
  3. Decide on backup/main-before-reset-20260328-000322 (170|3 behind, 2 weeks stale)

Part 2: MemPalace Architecture Findings

What's on main (merged via PR #374)

Directory: hermes-sovereign/mempalace/

File Lines Purpose Health
mempalace.py ~226 PalaceRoom dataclass + Mempalace class with factory constructors Solid
retrieval_enforcer.py ~80 L0-L5 retrieval order enforcement Broken — hardcoded macOS binary path
scratchpad.py ~170 JSON-based session scratchpad with promotion Broken — same hardcoded binary path
wakeup.py ~60 Session wake-up protocol (~300-900 tokens) Broken — same dependency
__init__.py 14 Package exports OK
tests/test_mempalace.py 22 tests PalaceRoom, factories, analyse_issues OK

Critical Bug: Hardcoded MEMPALACE_BIN

Three files contain:

MEMPALACE_BIN = "/Library/Frameworks/Python.framework/Versions/3.12/bin/mempalace"

This is:

  • macOS-only (won't work on Linux deployment targets)
  • Depends on third-party mempalace pip package + ONNX Runtime
  • Violates the zero-cloud directive
  • Silently degrades to no-op on any non-Mac host

PR #380 (Open) — The Fix

PR #380 (perplexity/sovereign-memory-store) adds:

  • sovereign_store.py — SQLite + FTS5 + HRR vector store (zero external deps)
  • promotion.py — quality-gated scratchpad→palace promotion (4 heuristic checks)
  • tests/test_sovereign_store.py — test coverage
  • +921 lines, -1 line

This PR is the critical path. Until it merges and the three broken files are rewired, the entire retrieval enforcer, scratchpad promotion, and wake-up protocol are dead code on any non-Mac host.

Epic Status

Sub-issue Status Notes
MP-1 #368 (port skill) Closed Merged via PR #374
MP-2 #369 (retrieval order) Closed Code exists but depends on broken CLI path
MP-3 #370 (scratchpad) Open Code exists, needs sovereign backend wiring
MP-4 #371 (promotion) Open Implemented in PR #380 (pending merge)
MP-5 #372 (wake-up) Closed Code exists but depends on broken CLI path
MP-6 (federation) Not filed Cross-agent palace sharing — future
MP-7 (nightly maintenance) Not filed Cron automation — future

  1. Merge PR #380 — unblocks the entire memory stack
  2. Wire the three broken files to use SovereignStore instead of MEMPALACE_BIN:
    • retrieval_enforcer.py:search_palace()SovereignStore.search()
    • scratchpad.py:promote_to_palace()promotion.promote()
    • wakeup.py:_palace_context()SovereignStore
  3. Remove all MEMPALACE_BIN references — the CLI dependency should be fully eliminated
  4. Close MP-3 #370 once scratchpad targets sovereign store
  5. File MP-6 and MP-7 when ready for federation and nightly maintenance

Branch Cleanup Scorecard

Metric Before After
Total branches 100 24
Dead branches (merged/closed PR) 76 0
Branches with open PRs 6 6
Orphan branches (no PR) ~18 ~5
Needs manual triage 3 (master, codex/workflow-pr-review, backup/...)
## Session Summary Auditor: @perplexity Date: April 8, 2026 Scope: Branch cleanup execution + MemPalace epic (#367) architecture review Epic: #367 --- ## Part 1: Branch Cleanup Executed **Deleted 76 dead branches** (100 → 24 remaining). All deleted branches were linked to merged or closed PRs. Remaining 24 branches: - `main` (default) - `master` (legacy — 241 commits behind, candidate for deletion with your confirmation) - 6 branches with **open PRs** (#359, #362, #363, #365, #374, #375) - `timmy/fleet-capacity-inventory`, `timmy/orchestrator-fix`, `timmy/japanese-wisdom-guards` (active work, no PR yet) - `codex/workflow-pr-review`, `backup/main-before-reset-20260328-000322` (stale but no PR — manual triage needed) **Action needed from you:** 1. Delete `master` if confirmed dead (241|39 behind main) 2. Decide on `codex/workflow-pr-review` (180|2 behind, 3 days stale) 3. Decide on `backup/main-before-reset-20260328-000322` (170|3 behind, 2 weeks stale) --- ## Part 2: MemPalace Architecture Findings ### What's on main (merged via PR #374) Directory: `hermes-sovereign/mempalace/` | File | Lines | Purpose | Health | |------|-------|---------|--------| | `mempalace.py` | ~226 | PalaceRoom dataclass + Mempalace class with factory constructors | Solid | | `retrieval_enforcer.py` | ~80 | L0-L5 retrieval order enforcement | **Broken** — hardcoded macOS binary path | | `scratchpad.py` | ~170 | JSON-based session scratchpad with promotion | **Broken** — same hardcoded binary path | | `wakeup.py` | ~60 | Session wake-up protocol (~300-900 tokens) | **Broken** — same dependency | | `__init__.py` | 14 | Package exports | OK | | `tests/test_mempalace.py` | 22 tests | PalaceRoom, factories, analyse_issues | OK | ### Critical Bug: Hardcoded MEMPALACE_BIN Three files contain: ```python MEMPALACE_BIN = "/Library/Frameworks/Python.framework/Versions/3.12/bin/mempalace" ``` This is: - macOS-only (won't work on Linux deployment targets) - Depends on third-party `mempalace` pip package + ONNX Runtime - Violates the zero-cloud directive - Silently degrades to no-op on any non-Mac host ### PR #380 (Open) — The Fix PR #380 (`perplexity/sovereign-memory-store`) adds: - `sovereign_store.py` — SQLite + FTS5 + HRR vector store (zero external deps) - `promotion.py` — quality-gated scratchpad→palace promotion (4 heuristic checks) - `tests/test_sovereign_store.py` — test coverage - +921 lines, -1 line **This PR is the critical path.** Until it merges and the three broken files are rewired, the entire retrieval enforcer, scratchpad promotion, and wake-up protocol are dead code on any non-Mac host. ### Epic Status | Sub-issue | Status | Notes | |-----------|--------|-------| | MP-1 #368 (port skill) | Closed | Merged via PR #374 | | MP-2 #369 (retrieval order) | Closed | Code exists but depends on broken CLI path | | MP-3 #370 (scratchpad) | Open | Code exists, needs sovereign backend wiring | | MP-4 #371 (promotion) | Open | Implemented in PR #380 (pending merge) | | MP-5 #372 (wake-up) | Closed | Code exists but depends on broken CLI path | | MP-6 (federation) | Not filed | Cross-agent palace sharing — future | | MP-7 (nightly maintenance) | Not filed | Cron automation — future | --- ## Recommended Next Steps (Priority Order) 1. **Merge PR #380** — unblocks the entire memory stack 2. **Wire the three broken files** to use `SovereignStore` instead of `MEMPALACE_BIN`: - `retrieval_enforcer.py:search_palace()` → `SovereignStore.search()` - `scratchpad.py:promote_to_palace()` → `promotion.promote()` - `wakeup.py:_palace_context()` → `SovereignStore` 3. **Remove all `MEMPALACE_BIN` references** — the CLI dependency should be fully eliminated 4. **Close MP-3 #370** once scratchpad targets sovereign store 5. **File MP-6 and MP-7** when ready for federation and nightly maintenance --- ## Branch Cleanup Scorecard | Metric | Before | After | |--------|--------|-------| | Total branches | 100 | 24 | | Dead branches (merged/closed PR) | 76 | 0 | | Branches with open PRs | 6 | 6 | | Orphan branches (no PR) | ~18 | ~5 | | Needs manual triage | — | 3 (`master`, `codex/workflow-pr-review`, `backup/...`) |
Timmy was assigned by perplexity 2026-04-08 09:46:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/timmy-config#382