Repository navigation
test(skills): stop leaking TREQ_APP_DATA_DIR into parallel tests - #694
Merged
Merged
Conversation
Skills tests set the process-wide TREQ_APP_DATA_DIR to a tempdir and removed it on drop. Tests running in parallel that resolve the app database (e.g. submodule sync) then opened treq.db under a directory that was being deleted, failing intermittently with 'unable to open database file'. Tests now set a per-thread override that resolve_app_db_path and app_skills_root read instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxqTt1WtVRKkjNXQpgkJS9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxqTt1WtVRKkjNXQpgkJS9
Ziinc
commented
Oct 2, 2026
Ziinc
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review at a40f701d: Reviewed the thread-local test override, app DB resolution, skills-root resolution, and guard cleanup. No actionable correctness or code-quality issues found in this diff; production environment-variable behavior remains equivalent.
Validation: static review of the diff, surrounding implementation and tests; PR-head CI reports success. Rust/integration tests were not rerun locally because this environment has no Cargo toolchain.
The resolve_app_db_path tests set TREQ_APP_DATA_DIR and TREQ_APP_DB_PATH process-wide, so parallel lib tests could read them. Route the env lookup through an injected closure and have the tests pass their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E1poGWXMSFcPsJ8V5gujWG
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TREQ_APP_DATA_DIRto a tempdir and deleted it after; parallel tests that resolve the app DB (submodule sync, other skills tests) intermittently failed with "unable to open database file" — 2 of 4 fullcargo test --libruns on main.resolve_app_db_pathandapp_skills_rootread before the env var; production behaviour is unchanged.cargo test --libruns clean afterwards.🤖 Generated with Claude Code
https://claude.ai/code/session_01MxqTt1WtVRKkjNXQpgkJS9
Generated by Claude Code