MemoryProxy.service.test.js was an integration test masquerading as a unit
test — all 26 tests required a real MongoDB connection and failed with
authentication timeouts in CI and local environments without credentials.
Replaced with comprehensive in-memory mocks for GovernanceRule and AuditLog
models that faithfully replicate the Mongoose interface: bulkWrite with
upsert, findActive, findByRuleId, findByQuadrant, findByPersistence,
deleteMany with regex/filter matching, chainable queries with .lean(),
and constructor-based AuditLog with .save(). All 26 tests now pass in
0.37s (down from 260s of timeouts).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>