>_
.issue.db
/highway
Dashboard
Issues
Memory
Lessons
Audit Log
New Issue
Edit Issue #1017
Update issue details
Title *
Description
EARS: When any pytest run collects tests/unit/api or tests/, no test or hook shall write to highway_db_v2 unless HIGHWAY_DB_TESTS=1 and the target DB is a scratch database. Found during #1012: tests/unit/api/test_rate_limit_api.py (inserts/deletes highway.tool_rate_limits via db.get_db_manager().create_direct_connection) and tests/unit/api/test_gateway.py (psycopg.connect to DB_NAME default highway_db_v2, creates approval tokens) are not under tests/unit/db and are not guarded. tests/conftest.py pytest_sessionfinish runs 'UPDATE jumper.t_highway_internal ... cancelled' and 'UPDATE jumper.r_highway_internal ...' through psql against DB_NAME (default highway_db_v2); psql exists in highway-api (/usr/bin/psql), so any pytest run under tests/ inside highway-api performs these writes. Recommend: move both test modules under tests/unit/db (guarded) and gate the conftest cleanup on the same HIGHWAY_DB_TESTS + non-highway_db_v2 check.
Priority
Low
Medium
High
Critical
Status
Open
In Progress
Closed
Won't Do
Due Date (YYYY-MM-DD)
Tags (comma separated)
Related Issues (IDs)
Enter IDs of issues related to this one. They will be linked as 'related'.
Update Issue
Cancel