Commit Graph

2 Commits

Author SHA1 Message Date
Praxis CI fe29bf0422 verify(P01): code review — quality + security
---ci---
phase: 1
milestone: v0.1
status: verify
requirements:
  covered:
    - REQ-VOICE-01
    - REQ-VOICE-02
    - REQ-VOICE-03
    - REQ-VOICE-04
    - REQ-SCEN-01
    - REQ-STATE-01
    - REQ-LLM-01
    - REQ-LLM-02
    - REQ-DEBRIEF-01
    - REQ-ORCH-01
    - REQ-ORCH-02
    - REQ-SCEN-FMT-01
    - REQ-NFR-LAT-01
    - REQ-NFR-SAFE-01
    - REQ-NFR-COST-01
  partial:
    - REQ-VOICE-03 (live latency number pending keys)
    - REQ-LLM-01 (live gemma4:cloud call pending keys)
    - REQ-LLM-02 (live deepseek no-think call pending keys)
lessons:
  - P0 fix applied: renamed misspelled _DEBRIFF_LEGAL_REDIRECT -> _DEBRIEF_LEGAL_REDIRECT in customer_service guardrail (latent safety-trap; worked at runtime via consistent misspelling + call-time global resolution)
  - P0 fix applied: removed dead code line in debrief._load_template (unused 'rel' variable)
  - auto-generated tests/test_pending_keys.py (9 tests) for the 2 key-pending exit criteria; skip cleanly without voice-service keys
  - 73 passed, 9 skipped, 0 failed; e2e smoke passes
---/ci---
2026-08-01 13:26:33 +00:00
Praxis CI 37f5cd4587 feat(P01-05-01,P01-05-02,P01-05-03): coaching debrief + guardrail filter + TTS voice
server/debrief.py — generate_debrief() loads the session turns + branch
outcome + scenario debrief.debrief_focus, calls deepseek-v4-flash:cloud in
no_think mode (D-020, REQ-LLM-02) with the debrief prompt template
(docs/debrief/default.yaml), produces a concise 3-bullet text summary
(what you did well / what to improve / one next step) referencing the
learner's actual turns + branch outcome.

TASK-05-02: the debrief text is routed through the CustomerServiceGuardrail
output filter (debrief role) — legal-action recommendations are blocked and
replaced with a coaching redirect.

TASK-05-03: the debrief is synthesized via the same TTSProvider interface
as the role-play (D-006 one voice) — no separate TTS path (verified by
structural test).

5 tests pass (debrief references turns + branch, no_think mode asserted,
guardrail blocks 'tell the customer to sue', normal coaching passes,
TTSProvider synthesis reuses role-play voice).

---ci---
phase: 1
milestone: v0.1
plan: 05
task: 05-01,05-02,05-03
status: execute
persona: backend-engineer
requirements:
  covered: [REQ-DEBRIEF-01, REQ-LLM-02, REQ-NFR-SAFE-01]
---/ci---
2026-08-01 13:16:38 +00:00