Skip to content

Integration: latency optimization + dotenv test hermeticity - #160

Merged
spuentesp merged 4 commits into
masterfrom
integration/cleanup-and-consolidate
Nov 29, 2026
Merged

spuentesp merged 4 commits into
masterfrom
integration/cleanup-and-consolidate

Conversation

@spuentesp

Copy link
Copy Markdown
Owner

Resumen

Consolidación de las dos ramas de trabajo pendientes sobre master:

1. perf/latency-optimization (dfc1c23)

  • SceneLoop.run emite SCENE_TURN_MS por turno y warns past MONITOR_TURN_LATENCY_TARGET_S (default 40s p95)
  • wrap-up router corre pasos independientes en paralelo (asyncio.gather)
  • /gm/lookup/improvise role override (MONITOR_GM_IMPROVISE_ROLE) + GM_LOOKUP_LATENCY logging
  • opt-in narrator skip para turnos simples sin tiradas (MONITOR_NARRATOR_SKIP_SIMPLE_TURNS, off by default)
  • scripts/measure_turn_latency.py para medición live p50/p95
  • docs/architecture/LATENCY_OPTIMIZATION_PLAN.md

2. test/ignore-local-dotenv (b1f6a89)

  • MONITOR_SKIP_DOTENV=1 en conftest para que el .env local del desarrollador no se filtre en unit tests
  • LITELLM_MODE=PRODUCTION para evitar el load_dotenv de litellm
  • Tests nuevos verificando hermeticidad

Verificación

  • ✅ 128 tests targeted pasan (latency + dotenv + wrap-up + gm_table)
  • ✅ 99 tests unitarios pasan
  • ✅ ruff check clean
  • ✅ check_layer_dependencies OK

Archivos tocados

22 archivos, +1017 / −73 líneas

Generated by Mistral Vibe.

Sebastian and others added 4 commits November 26, 2026 16:21
…gress from 2026-11-19)

- SceneLoop.run emits SCENE_TURN_MS per turn and warns TURN_OVER_TARGET past
  MONITOR_TURN_LATENCY_TARGET_S (default 40s, p95 target)
- wrap-up router runs its independent steps concurrently (asyncio.gather)
- /gm/lookup/improvise role override (MONITOR_GM_IMPROVISE_ROLE) and
  GM_LOOKUP_LATENCY logging past the 30s lookup budget
- opt-in narrator skip for simple no-roll Q&A turns
  (MONITOR_NARRATOR_SKIP_SIMPLE_TURNS, off by default)
- scripts/measure_turn_latency.py for live p50/p95 measurement
- docs/architecture/LATENCY_OPTIMIZATION_PLAN.md consolidates the plan

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The repo-root conftest now pins MONITOR_SKIP_DOTENV=1 (and
LITELLM_MODE=PRODUCTION to stop litellm's own load_dotenv), so a
developer's local .env / .env.tokens — e.g. MONITOR_AUTH_DISABLED=true —
can no longer leak into unit tests through pydantic-settings or the
CLI/UI entrypoints.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…-consolidate

Latency target enforcement and first optimizations:
- SceneLoop.run emits SCENE_TURN_MS per turn, warns past MONITOR_TURN_LATENCY_TARGET_S
- wrap-up router runs independent steps concurrently (asyncio.gather)
- /gm/lookup/improvise role override + GM_LOOKUP_LATENCY logging
- opt-in narrator skip for simple no-roll Q&A turns
- scripts/measure_turn_latency.py for live p50/p95 measurement
- docs/architecture/LATENCY_OPTIMIZATION_PLAN.md

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…consolidate

MONITOR_SKIP_DOTENV keeps the developer's local .env out of unit tests.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@spuentesp
spuentesp enabled auto-merge November 29, 2026 17:40
@spuentesp
spuentesp merged commit db6cd4d into master Nov 29, 2026
5 checks passed
@spuentesp
spuentesp deleted the integration/cleanup-and-consolidate branch November 29, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant