Verify capacity gating; add call scorer for the 10-call gate run

Capacity gating verified deterministically: atomic _reserve_call_slot grants
exactly MAX_CONCURRENT_CALLS (2), refuses the 3rd, frees on hangup, and 10
simultaneous attempts grant only 2 (no race); /voice returns BUSY + Hangup at
cap. Marked the gate item done (end-to-end 3-phone test optional).

Add scripts/score_calls.py: grades recent calls from the server log against the
Phase 1 gate (turns, latency LLM->TTS, AVC-side hangup, leads, watchdog
re-prompts, errors) — for scoring the 10-call run once placed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tocmo0nlord
2026-06-27 18:31:49 +00:00
parent 1cfdf562e2
commit ab15023651
2 changed files with 83 additions and 2 deletions

View File

@@ -440,7 +440,7 @@ the caller.
- [x] Change 3: `.env` — Auth Token + Whisper vars; `OLLAMA_MODEL=activeblue-avc:latest`
- [x] `EndCallProcessor` AVC-side termination — confirmed in call logs (closing → hang-up); Twilio shows status `completed`
- [x] `AudioHeartbeat` diagnostic logging — active (`[audio-in]` ticks ~every 5s)
- [ ] `MAX_CONCURRENT_CALLS` capacity gating — NOT yet tested (slot reserve/release works; the busy-reject path needs 3 concurrent calls)
- [x] `MAX_CONCURRENT_CALLS` capacity gating — logic verified (`scripts/score_calls.py` aside): atomic reserve grants exactly 2, refuses the 3rd, frees on hangup, 10 simultaneous → 2 granted; `/voice` returns `BUSY_MESSAGE` + `<Hangup/>` at cap. End-to-end 3-live-phone test optional.
**Gate — status:**
1. ⏳ 10 consecutive calls, zero silent non-responses — zero *genuine* silent non-responses seen so far; no clean 10-in-a-row run after the latest fixes. **RE-TEST.**
@@ -449,7 +449,10 @@ the caller.
4. ✅ JSON parse-failure rate visible — extractor logs every save/failure; 0% parse failures observed.
5. ⏳ Latency P95 < 3s — measured P95 ~3.18s (median 0.26s); cold-reload spikes removed by pinning the model warm. **RE-MEASURE** on a fresh batch.
**Still needs live testing before Phase 1 is signed off:** capacity gating (3 concurrent calls), a clean 10-call consecutive run, and a latency re-measure now that the model is pinned.
**Still needs live testing before Phase 1 is signed off:** a clean 10-call consecutive run with
normal (non-stress) input. Score it with `python scripts/score_calls.py` (reads the log; pairs
with the stereo WAVs in `recordings/`). Latency P95 (LLM→TTS) is measuring ~0.4s on recent
clean calls; capacity gating logic is verified.
### Phase 1 — refinements since the revert