Skip to content

feat: dual-instance singleton guard on 6 shared controllers #5

@sparkling

Description

@sparkling

Problem

ControllerRegistry and AgentDBService both construct the same 6 controllers, creating duplicate instances with diverging in-memory caches.

Controllers affected: ReflexionMemory, SkillLibrary, ReasoningBank, CausalMemoryGraph, LearningSystem, ExplainableRecall

Fix

Added module-level singleton guard to each controller. Second `new` returns existing instance instead of creating a duplicate. `_resetSingleton()` for test teardown.

Commit: `c3e7cf5` (ADR-0076 A4)

ADR Reference

ADR-0075 Problem 1, ADR-0076 A4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions