46b46479caeccc471ef3c648c636e2afa0c2959b
- TASK-06-01 __main__.py: SessionMiddleware (signed cookies, D-056) added
AFTER CORS so it is outermost. slowapi limiter state + 429 exception
handler registered. The lifespan (TASK-01-03) now also runs the VC key
migration on first boot.
- TASK-06-02 __main__.py: auth_router mounted (POST /api/operator/login,
POST /api/operator/logout, GET /api/operator/me) BEFORE the StaticFiles
mount (routes-before-static constraint). Auth routes use app.state.pg_store
(503 if no Postgres).
- TASK-06-03 __main__.py: /vc/verify swapped to the two-store path (G-011):
pg_store for key lookup (active + superseded), SQLite fallback for v0.3
credentials, SQLite-only if no Postgres. _maybe_migrate_issuer_keys()
runs once in the lifespan (idempotent, G-027 first-boot, non-fatal on
failure — v0.3 path intact).
- TASK-06-04 tests/test_p1_auth_integration.py: 4 e2e tests (skip if no
Postgres) — full auth flow, /me without cookie 401, wrong password 401,
learner voice loop unaffected (REQ-NFR-MT-01).
- TASK-06-05 tests/test_p1_vc_migration_e2e.py: 5 e2e tests (skip if no
Postgres) — R-VC-MIG-01 critical (v0.3 VC verifies against archived
superseded key in Postgres), idempotent migration, G-027 first-boot,
v0.04 VC verifies, tamper detection.
Graceful degradation verified: server starts without Postgres (pg_pool/
pg_store are None; voice loop works; auth routes return 503).
---ci---
project: praxis
phase: 1
milestone: v0.4
status: execute
persona: backend-engineer
task: 06-01,06-02,06-03,06-04,06-05
requirements:
covered: [REQ-MT-01, REQ-AUTH-01, REQ-NFR-AUTH-01, REQ-NFR-MT-01]
grill:
- G-011 (two-store fallback wired in /vc/verify)
risks:
- R-VC-MIG-01 (e2e test: v0.3 VC verifies against archived superseded key in Postgres)
---/ci---
Praxis — v0.1 Foundation
Voice-first AI apprenticeship platform. v0.1 is a tech-validation harness (per G-008) for the minimal viable voice loop: a single learner speaks to an AI tutor playing a Customer Service role-play scenario, hears a <600ms-latency response, receives an end-of-session coaching debrief, and has the session logged to SQLite.
Status
Phase 1 (minimal viable voice loop) — code-complete, pending live API keys for runtime verification.
Stack
- Orchestration: Pipecat (D-017) with Silero VAD + interruptibility
- ASR: Deepgram Nova-3 streaming (D-013)
- LLM: Ollama Cloud direct API (D-020) —
gemma4:cloud(role-play) +deepseek-v4-flash:cloudno-think (debrief) - TTS: Cartesia Sonic (primary, D-014) / Piper (self-hosted, R4 mitigation) — behind an interface
- Client: React + Vite + WebRTC (Pipecat client SDK, D-015)
- State: SQLite
praxis.db(D-007, single hardcoded learner, no auth)
Layout
server/ Pipecat pipeline, services (TTS/LLM/Guardrail interfaces), scenario runtime, adapters
client/ React + Vite + WebRTC learner surface
scenarios/ YAML scenario definitions (D-018)
db/ SQLite schema, migrations, async store
scripts/ Latency probes (R1-R4), e2e smoke
tests/ Unit + e2e
docs/ Latency report, debrief templates
Quickstart
- Copy
.env.example→.env, fill inDEEPGRAM_API_KEY,CARTESIA_API_KEY,OLLAMA_API_KEY. - Install server deps:
pip install -e ".[dev]" - Install client deps:
cd client && npm install - Run probes:
python scripts/probe_deepgram.py(etc.) - Run server:
python -m server - Run client:
cd client && npm run dev
See docs/latency-report.md for the R1-R4 spike status and TTS decision.
Description
Releases
15
Languages
Python
81.4%
Shell
13.8%
TypeScript
4.3%
CSS
0.3%
Dockerfile
0.2%