Module dual_write

Module dual_write 

Source
Expand description

Phase 3a — db_agents dual-write helpers.

Every mutation on db_agent_definitions / db_agent_instances mirrors into db_agents so a later read-migration PR (Phase 3b) can flip readers over with confidence. Dual-write failures LOG + CONTINUE — the old tables remain authoritative until Phase 3b. See docs/specs/SPEC_AGENT_CONCEPT_CONSOLIDATION_2026_05_24.md.

Extracted from store.rs in Phase R.5 of the storage modularization plan (docs/specs/SPEC_STORE_MODULARIZATION_2026_05_27.md). This whole file goes away in Phase 3c when the legacy tables are dropped — keeping it isolated makes that future deletion clean.