chore: remove 86 MagicMock database files from repo root (pytest leak) #145

Open
opened 2026-05-25 14:00:03 -07:00 by pyr0ball · 0 comments
Owner

Problem

86 files with names like <MagicMock name='mock.db' id='123397702202192'> exist in the kiwi repo root, totalling ~32MB.

These are SQLite databases created when kiwi.db was mocked during pytest runs — the mock's str() representation was used as a filename when the test infrastructure tried to open/create a DB file.

Fix

  1. Delete all files matching <MagicMock name='mock.db'*> from repo root
  2. Add .gitignore entry to prevent future recurrence: <MagicMock*
  3. Audit tests/conftest.py — ensure kiwi.db mock never leaks a real file open with the mock's str repr
  4. Check if tmp_path fixture should be used for test DB paths instead of the repo root path

Cleanup command

cd /Library/Development/CircuitForge/kiwi
find . -maxdepth 1 -name "<MagicMock*" -delete
echo "<MagicMock*" >> .gitignore

Labels

bug chore

## Problem 86 files with names like `<MagicMock name='mock.db' id='123397702202192'>` exist in the kiwi repo root, totalling ~32MB. These are SQLite databases created when `kiwi.db` was mocked during pytest runs — the mock's `str()` representation was used as a filename when the test infrastructure tried to open/create a DB file. ## Fix 1. Delete all files matching `<MagicMock name='mock.db'*>` from repo root 2. Add `.gitignore` entry to prevent future recurrence: `<MagicMock*` 3. Audit `tests/conftest.py` — ensure `kiwi.db` mock never leaks a real file open with the mock's str repr 4. Check if `tmp_path` fixture should be used for test DB paths instead of the repo root path ## Cleanup command ```bash cd /Library/Development/CircuitForge/kiwi find . -maxdepth 1 -name "<MagicMock*" -delete echo "<MagicMock*" >> .gitignore ``` ## Labels `bug` `chore`
pyr0ball added the
bug
label 2026-06-01 12:11:30 -07:00
pyr0ball added this to the Post-Launch milestone 2026-06-01 12:11:30 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/kiwi#145
No description provided.