Explicit test-fixture modes
Harmonia’s model and social-effect legs have explicit development-only fixtures for contract testing. Identity still uses Google sign-in and durable workflow state uses the emulators. With either flag unset, fixture code is unreachable. A fixture run must never be used in a demo, benchmark, provider claim, or authenticated evidence bundle.HARMONIA_MOCK_AI=1
Replaces every Gemini call with deterministic local fixtures that satisfy the exact JSON shapes of the real stages:
- Transcription — segments derived from audio size, plausible startup-podcast text
- Analysis / strategy — Nimi summary and grounded moments/angles, followed by Ryan’s typed strategy proposal and briefs
- Drafting — three ≤280-char X posts referencing moment/angle ids
- Image generation — renders a real PNG locally via ffmpeg lavfi
- Chat intent parsing — keyword rules instead of structured output
- Proactive proposals — deterministic proposals derived from fixture signals; later learning inputs re-enter Ryan through the same strict strategy contract
[MOCK-AI] ...) and persisted modelUsed labels read mock-local (HARMONIA_MOCK_AI) so offline runs are never mistaken for real model calls.
HARMONIA_MOCK_X=1
Independent flag covering the X API client only. Publishing returns a deterministic id derived from the post text hash (mock-<sha256[:12]>), and verification/metrics return small stable payloads. This is useful for development assertions only. Leave it off when testing honest integration failures or collecting real evidence.
What fixture mode still executes locally
Firestore and Pub/Sub run as Google emulators locally; ffmpeg rendering and the local asset store execute real code. Receipts and verification records exercise the real schemas but refer to fixture effects whenHARMONIA_MOCK_X=1. YouTube ingestion through yt-dlp still uses the network and requires source authorization.
Emulator-based workflow
scripts/dev.sh pins both emulators to fixed ports and exports:
Test suites
agent/tests/conftest.py; mock-mode tests exercise the fixture generators and assert their output shapes match the real stages’ contracts.
Useful local endpoints
Internal routes require service authentication plus workspace and brand headers. Dashboard routes require a verified Google session and derive the workspace from server-side membership.
Cloud Storage direct uploads require bucket CORS to permit the deployed web origin to
PUT the allowed content types and expose resumable-upload response headers. The application never sends Cloud Storage credentials to the browser; it returns only the single-object resumable session URL. With GCS_BUCKET unset, the authenticated local upload route stores bytes in .data/artifacts.