Context
No autouse fixture removes leftover temp files/directories at the end of the test session. The main DB fixture already uses sqlite:///:memory:, so the risk is reduced but not eliminated — fixtures like plugins_dir, temp_dir, fake_plugin_dir create real filesystem entries without a guaranteed session-level teardown.
Flagged in reports/technical_debt_remediation_2026-08-10.md (item 6), confirmed still open in reports/technical_debt_remediation_verification_2026-08-11.md.
Task
Add a session-scoped autouse fixture in tests/conftest.py that cleans up any leftover temp SQLite files / temp directories after the full test run.
Acceptance criteria
- New fixture in
tests/conftest.py, session-scoped, autouse=True
- Removes known temp artifacts (e.g.
db.sqlite3, any stray .db files) after the suite completes
- Does not break existing tests (
make test still green)
Files
Context
No
autousefixture removes leftover temp files/directories at the end of the test session. The main DB fixture already usessqlite:///:memory:, so the risk is reduced but not eliminated — fixtures likeplugins_dir,temp_dir,fake_plugin_dircreate real filesystem entries without a guaranteed session-level teardown.Flagged in
reports/technical_debt_remediation_2026-08-10.md(item 6), confirmed still open inreports/technical_debt_remediation_verification_2026-08-11.md.Task
Add a session-scoped
autousefixture intests/conftest.pythat cleans up any leftover temp SQLite files / temp directories after the full test run.Acceptance criteria
tests/conftest.py, session-scoped,autouse=Truedb.sqlite3, any stray.dbfiles) after the suite completesmake teststill green)Files
tests/conftest.py