Skip to content

fix: isolate prepare tools test state - #10504

Merged
lifeizhou-ap merged 1 commit into
mainfrom
lifei/fixed-flaky-prepare_tools-test
Jul 16, 2026
Merged

fix: isolate prepare tools test state#10504
lifeizhou-ap merged 1 commit into
mainfrom
lifei/fixed-flaky-prepare_tools-test

Conversation

@lifeizhou-ap

Copy link
Copy Markdown
Collaborator

Summary

  • give prepare_tools_returns_sorted_tools_including_frontend isolated temporary session and permission storage
  • avoid the process-global session database initialized by Agent::new()

Root cause

The test created its session through the global SessionManager. Parallel tests temporarily change GOOSE_PATH_ROOT, so the lazy global SQLite pool could be initialized inside a temporary directory that was deleted before this test opened sessions.db. This produced SQLite error 14 (unable to open database file) in the native-TLS CI job.

Testing

  • cargo fmt --check
  • cargo test -p goose --no-default-features --features native-tls,code-mode agents::reply_parts::tests::prepare_tools_returns_sorted_tools_including_frontend -- --exact
  • cargo test -p goose --no-default-features --features native-tls,code-mode --lib — the fixed test passed in the parallel suite; 1394 tests passed and four unrelated local environment-sensitive plugin discovery/Ollama tests failed

@lifeizhou-ap
lifeizhou-ap marked this pull request as ready for review July 16, 2026 06:36
@lifeizhou-ap
lifeizhou-ap added this pull request to the merge queue Jul 16, 2026
Merged via the queue into main with commit 8419e05 Jul 16, 2026
38 of 41 checks passed
@lifeizhou-ap
lifeizhou-ap deleted the lifei/fixed-flaky-prepare_tools-test branch July 16, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants