You are browsing as a guest. Sign up (or log in) to start making projects!

10h 9m 34s logged

MIRA — Day 13: Backend Bug Cleanup, Test Suite Expansion, and AI Tooling

Today was split between fixing silent backend bugs in MIRA-AI, expanding my test suite to 120 passing tests, and configuring my external AI development tools.


Backend Bug Cleanup

I ran a full diagnostic check across the codebase and resolved 15 specific bugs:

  • Duplicate Camera Service: Found and removed a bug in main.py that was initializing two separate camera service instances on startup.
  • TFLite Tracking Guard: Disabled ByteTrack tracking when running TFLite models in camera_service.py, since TFLite inference doesn’t support ByteTrack tracking.
  • Modern FastAPI Lifecycle: Migrated from deprecated on_event handlers to the modern asynccontextmanager lifespan pattern across my API services.
  • Code Quality: Updated remaining deprecated .dict() calls to .model_dump() for Pydantic v2, fixed an immutable frozenset cleanup bug in my tests, and resolved 183 Ruff linter warnings.

Expanding the Test Suite to 120 Tests

I wrote new unit test suites for previously uncovered backend modules:

  • Dashboard Models & WebSockets: Added 30+ tests covering Pydantic model serialization and boundary conditions, plus 15+ tests for WebSocket event callbacks and metric queuing.
  • Test Isolation: Fixed a bug in test_logger.py where the root logger was leaking state between test runs, and fixed brittle Python version checks in test_serialization.py.
  • Current Status: My test suite is now sitting at 120 out of 120 passing tests with 0 Ruff lint errors.

AI Developer Tooling & DigitalOcean

Outside the core MIRA repository, I spent time configuring my external OpenCode AI setup across multiple providers (OpenRouter, local Docker, Ollama, and GitHub Copilot):

  • Fixed an endpoint URL misconfiguration in my OpenRouter settings and tested connectivity across 23 models.
  • Added handling for “reasoning models” that return output in a reasoning field rather than standard content.
  • Researched how to use my $200 DigitalOcean student credit before it expires on July 31st. Since student credits cannot be applied to GPU Droplets, I plan to deploy a 128 GB Memory-Optimized CPU Droplet to run Ollama with 70B models for offloaded testing.

Next Steps

  • Hardware Benchmarks: Run real-world FPS and latency tests on a Raspberry Pi Zero 2W.
  • Trash Class Data: Collect targeted training data for the general “Trash” class, which remains my weakest class at 7.1% mAP50.
    Also go over the website cause it looks pretty ai generated right now
0
1

Comments 0

No comments yet. Be the first!