Files
poimen-memory/crates
rock 3f83c1b015
CI / CI (pull_request) Failing after 21m18s
refactor: complete SOLID fixes + RAII guards + enhanced test assertions
ISP (Interface Segregation Principle):
  - Add JobStatusStore trait for database persistence
  - Implement PgJobStatusStore for PostgreSQL
  - Add MockJobStatusStore for unit testing
  - IngestWorker::with_job_store() enables dependency injection
  - Job status updates now via trait (testable, mockable)

Resource Management (RAII):
  - Add PortForwardGuard struct with Drop impl
  - Ensures port-forward process killed even if test panics
  - Prevents resource leaks in integration tests

Test Assertions (Verification):
  - Enhanced unit tests verify entity names, not just counts
  - Verify edges connect correct entity pairs
  - Verify both source and target entities exist
  - Batch processing verifies expected entities extracted
  - Entity deduplication test across multiple records

All 9 issues now fixed:
   DRY: Removed wrapper function
   CRAP: Extracted save_*_with_logging() helpers
   OCP: Added JobStatus enum
   SRP: Real-time logging, no error accumulation
   ISP: JobStatusStore trait + mocking
   Logging: IngestLogContext struct
   RAII: PortForwardGuard for cleanup
   Error handling: Real-time logging at point of failure
   Test assertions: Verify names + connections

Verification: cargo check -p mem-cli ✓
2026-09-15 13:30:19 +09:00
..