Tech
SolOS Full Code Review — Phase 2 (2026-09-17)
Baseline vs 2026-09-16 review. Note: Sol's team moved overnight — serving-path files
(core/agent_loop.py, agent_app.py) touched 2026-09-16 23:04–23:06, and a NEW
core/memory_plane.py (129 lines) already landed. Git repo now exists (last commit b9c7998, Sep 16).
SolOS Full Code Review — Phase 2 (2026-09-17)
Baseline vs 2026-09-16 review. Note: Sol's team moved overnight — serving-path files
(core/agent_loop.py, agent_app.py) touched 2026-09-16 23:04–23:06, and a NEW
core/memory_plane.py (129 lines) already landed. Git repo now exists (last commit b9c7998, Sep 16).
PART A — Prior-10 resolution status
| # | Item | Status | Evidence |
|---|---|---|---|
| 1 | Memory orphaned | ✅ RESOLVED | memory_plane.py builds durable+facts+episodes block; injected every turn (agent_loop.py:385–400, "TAM-MEM-01"); episodes recorded post-turn (agent_app.py:397–407); graceful degradation all 3 layers |
| 2 | Silent session wipes | ◐ PARTIAL | 3-cap eviction now logs (agent_app.py:320–324); DB restore 50→100 msgs (:335). BUT age-out (120min) + 1000-turn caps still wipe with NO summarization (:358–363) |
| 3 | history-20: window | ✅ RESOLVED | agent_loop.py:403 → history-50: |
| 4 | Fleet/cross-agent memory | ✗ NOT-RESOLVED | memory_plane strictly agent-keyed (memory_plane.py:45,60,75); zero cross-agent/fleet/shared hits |
| 5 | task_ref ghost schema bug | ✗ NOT-RESOLVED | CREATE TABLE (dispatch_tracker.py:47–60) still lacks task_ref; ghost-purge :154 still joins, still bare except:pass (:109–110) — dead code, stuck rows forever |
| 6 | Gateway triad (thread-ids, canned reply, dedupe) | ✗ NOT-RESOLVED (all 3) | session_id f"chat{chat_id}-{chat_type}" only (gateway_loop.py:244); canned "Done. Ask me anything…" (:291); zero dedupe hits in file |
| 7 | Backup sprawl / git | ◐ PARTIAL | git repo live with real commits; but core/agent_app.py.backup{,2,3,.fixed.backup} + ~15 more (config/, backups/, frontend/*.bak) still present |
| 8 | chat_messages unread | ✗ NOT-RESOLVED | written, never read by any SolOS code |
| 9 | "(max turns reached)" final | ◐ PARTIAL | max_turns 10→50 (agent_app.py:375) softens it; literal string remains (agent_loop.py:477); still no task-level retry (gateway separately got quota/timeout classification — different path) |
| 10 | CostGov/registry integration | ◐ PARTIAL | All loopback-only (good surface). No auth headers on call sites; 15+ files hardcode localhost URLs in 8 variants; plaintext credential FILES at config/ paths (paths only) |
Score: 2 resolved, 4 partial, 4 not-resolved of the original 10.
PART B — NEW findings (ranked)
- SECURITY, HIGH Plaintext credential files in the git-tracked config/ tree:
laptop_ctrl_key (SSH private key, duplicated), mcp_token, credential_pools.json.backup.keys,
tpp_credentials.json, opencode_canonical_keys.json. Verify
git ls-files config/shows none tracked; if any tracked in history → history is compromised for those items and needs filter-repo. Effort: low / Impact: HIGH. - CORRECTNESS, HIGH Ghost auto-resolve dead code (= item 5): cancelled parent tasks never resolve; tracker rows stuck forever. 1-line ALTER + backfill or drop the join.
- COST, MED Gateway reports a FICTIONAL cost per TG turn:
_report_cost(agent, 0.001)(gateway_loop.py:253) regardless of real tokens — poisons the CostGov ledger that Young runs monthly on. Route true token counts or drop fake entries. - RELIABILITY, MED a2a_dispatch retry: single retry, no backoff/jitter (a2a_dispatch.py:13, 190–239) → simultaneous retry bursts on loopback.
- RELIABILITY, MED _extract_reply 6-branch shape-guessing (gateway_loop.py:165–216): any novel reply shape → "no reply" → canned "Done.". Suggest per-agent adapter map from registry agent ids.
- THREAD-SAFETY/DB, LOW-MED dispatch_tracker + a2a_dispatch open sqlite per call, timeout=5, no WAL → "database is locked" escalates with fleet growth. One-line PRAGMA journal_mode=WAL per conn.
- SEC OBS Registry :8432 loopback + no auth: any local process can mutate routing. Unix socket or token check if box ever shared.
- OPS Zero TODO/FIXME left in tree (clean); crontab clean.
- SCHEMA GOVERNANCE No migration runner — both drift sites (task_ref, chat_messages) came from hand-maintained schema. Suggest a tiny migrations table.
PART C — Feed to Sol (priority order)
- Credential quarantine: chmod-600
config/secure-refs/+ verify git ls-files; history scrub if any tracked. (also closes the per-citizen token-rotation pre-req from Young's hardening list) - dispatch_tracker schema fix (task_ref) — unblocks stuck-row auto-resolve.
- Gateway hygiene bundle: thread-id in session ids + message_id dedupe + kill canned "Done." (three item-6 complaints in one pass).
- CostGov truth-in-ledger: stop
_report_cost(0.001)fiction; wire real token counts. - Memory growth: cross-agent read (
include_shared=Truereading agent='' records) + summarize-on-eviction for age-out/turn-cap wipes.
Provenance
Read-only ssh (grep/sed/find/ls/git log). No writes to target. No credential values surfaced. Live evidence marked TAM-MEM-01/02 comes from Sol's own tagged comments in code — the memory plane ship was responded to our review overnight (well done).

