Skip to content

Add integration tests for monitoring system (Guardian, Conductor, MonitoringLoop) #84

@kivo360

Description

@kivo360

Problem

The monitoring system — the core "readjustment" pillar of OmoiOS — has zero integration tests:

  • MonitoringLoop — Orchestrates Guardian + Conductor loops
  • IntelligentGuardian — LLM-powered per-agent trajectory analysis
  • ConductorService — System-wide coherence scoring + duplicate detection

These are critical services that determine if agents are drifting from goals.

What to do

Create test files in backend/tests/integration/:

  1. test_monitoring_loop.py: Test the loop starts, runs Guardian/Conductor cycles, and handles errors
  2. test_intelligent_guardian.py: Test trajectory analysis scoring, intervention decisions, mock LLM responses
  3. test_conductor.py: Test coherence scoring, duplicate work detection

Use pytest-asyncio for async tests and mock the LLM service to avoid real API calls.

Reference: ARCHITECTURE.md — Testing Requirements checklist

Difficulty: Medium-Hard | Skill: Python (pytest, async testing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions