Skip to content

fix: extract DB_NAME constant, add edge case tests, improve coverage - #52

Merged
Cipher208 merged 1 commit into
masterfrom
fix/constants-and-tests
Jul 5, 2026
Merged

Cipher208 merged 1 commit into
masterfrom
fix/constants-and-tests

Conversation

@Cipher208

Copy link
Copy Markdown
Owner

Changes

String deduplication

  • Added shared/constants.py with DB_NAME constant
  • Replaced 121 occurrences of 'memory.db' with DB_NAME across 20 files

New tests (+21)

  • 9 edge case tests for rag/engine.py: empty query, dedup, no results, count pages/chunks, file ingest, auto strategy, relations, search limit
  • 9 tests for shared/connection.py: get, reuse, execute, fetchone, fetchall, executemany, executescript, rollback, stale reopen
  • 3 tests for lifecycle/forgetting.py: cleanup, decay, archive

Metrics

  • Total: 393 tests (was 372, +21)
  • Quality issues: 410 → 393 (-17 from DB_NAME dedup)
  • Repowise Hotspot: 4.28 → 4.33

- Add shared/constants.py with DB_NAME constant
- Replace 121 occurrences of 'memory.db' with DB_NAME
- Add 9 edge case tests for rag/engine.py (empty query, dedup, no results, count, file ingest, auto strategy, relations, limit)
- Add 9 tests for shared/connection.py (get, reuse, execute, fetchone, fetchall, executemany, executescript, rollback, stale reopen)
- Add 3 tests for lifecycle/forgetting.py (cleanup, decay, archive)
- Total: 393 tests (was 372, +21 new)
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 79.68750% with 26 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mcp_server/tools_ops.py 20.00% 4 Missing ⚠️
graph/temporal.py 57.14% 3 Missing ⚠️
mcp_server/tools_layer.py 25.00% 3 Missing ⚠️
core/episodic.py 71.42% 2 Missing ⚠️
features/audit_trail.py 71.42% 2 Missing ⚠️
features/compression.py 33.33% 2 Missing ⚠️
shared/archived_memories.py 60.00% 2 Missing ⚠️
core/memory.py 87.50% 1 Missing ⚠️
core/session.py 80.00% 1 Missing ⚠️
features/import_export.py 80.00% 1 Missing ⚠️
... and 5 more

📢 Thoughts on this report? Let us know!

@Cipher208
Cipher208 merged commit 69d197c into master Jul 5, 2026
18 checks passed
@Cipher208
Cipher208 deleted the fix/constants-and-tests branch July 5, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants