feat(tooling): add TOOL_USAGE_COLLECTION_DB_PATH env var to override SQLite DB path#28926
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1de2c1b. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|




Description
The SQLite database path in
scripts/tooling/db.tswas hardcoded to~/.tool-usage-collection/events.db, making it impossible to redirect the database without modifying source code.This PR introduces the
TOOL_USAGE_COLLECTION_DB_PATHenvironment variable as an optional override. When set,openDb()uses that path; when absent, it falls back to the existing default.A
scripts/tooling/README.mdis also added documenting the database location, the env var, the CLI, and the three collection paths.Part of MCWP-448 — sub-task MCWP-539.
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-539
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an examplePre-merge reviewer checklist