Repository navigation
fix(voice-context): read calls.jsonl from workspace, not repo root - #1228
bassilkhilo-ag2 wants to merge 1 commit into
Conversation
VasiliyRad
left a comment
There was a problem hiding this comment.
Real fix is buried under bundled junk. The actual change is 1 line in src/voice-context.ts + a 178-line test — read calls.jsonl from $SUTANDO_WORKSPACE instead of repo root. That sounds correct and useful.
But this PR bundles the same 4 files I've flagged on #1196/#1194/#1225/#1226/#1227 this session: build_log.md (+114), src/health-check.py (+14/-2), tests/health-check-bridge-multi-pid.test.py (+88), tests/sync-memory-memory-dir.test.sh (+284).
Strip those 4 files and I'll approve immediately — the real fix is good. Reviewing 800+ lines of cruft to find a one-line fix is the exact problem I called out on #1196.
cab6505 to
907b512
Compare
|
Rebased onto origin/main (dropped the 4 local-only commits that were contaminating the diff). The branch now has exactly 1 commit — the actual change. Sorry for the noise. |
|
Branch is now clean — only |
phone-conversation/scripts/conversation-server.ts writes calls to $WORKSPACE/results/calls/calls.jsonl via resolveWorkspace(). voice-context.ts was reading from REPO_DIR/results/calls/calls.jsonl — a path that never exists in production — so RECENT PHONE CALLS was always omitted from voice context. Fixes by reading from WORKSPACE_DIR which resolves identically to what conversation-server writes. Adds tests/voice-context.test.ts (15 tests) covering buildVoiceAgentContext and buildSutandoSystemPrompt with memory files, profile truncation, phone call entries, and frontmatter stripping. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
907b512 to
e60d0c7
Compare
|
Rebased on clean |
|
Closing per owner instruction — autonomous PR creation halted. |
Problem
buildVoiceAgentContext()insrc/voice-context.tsalways omits the RECENT PHONE CALLS section, even after calls have been made. The bug: it reads fromREPO_DIR/results/calls/calls.jsonlbut calls are written toWORKSPACE_DIR/results/calls/calls.jsonlbyskills/phone-conversation/scripts/conversation-server.ts(line 1076) viaresolveWorkspace().Fix
One-line change:
join(REPO_DIR, …)→join(WORKSPACE_DIR, …)onsrc/voice-context.ts:69.WORKSPACE_DIRwas already resolved on line 19 of the same file viaresolveWorkspace().Tests
Adds
tests/voice-context.test.ts(15 tests):buildVoiceAgentContext— no memory files, user profile, profile truncation, phone calls (caller/to/topic/malformed), missing calls filebuildSutandoSystemPrompt— base output, CLAUDE.md inclusion, memory file inclusion, frontmatter strippingAll 15 pass against this fix; 3 were failing against
origin/main.Test plan
npx tsx --test tests/voice-context.test.ts→ 15/15 passcat ~/.sutando/workspace/results/calls/calls.jsonlhas entries;buildVoiceAgentContext()now includes them🤖 Generated with Claude Code