fix: serialize onepassword env-var tests to prevent parallel races#54
Merged
fix: serialize onepassword env-var tests to prevent parallel races#54
Conversation
Four `connect_auth_*` unit tests all mutate the same `OP_CONNECT_HOST` / `OP_CONNECT_TOKEN` env vars. When the test runner executes them in parallel the query-string test would clobber the fragment test's env var (or vice versa), causing `connect_auth_rejects_host_with_fragment` to see the `?foo=bar` URL and fail with "query string" instead of "fragment". Added a module-level `ENV_LOCK: Mutex<()>` and acquired it at the top of each of the four tests so they run sequentially. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merged
jrandolf
added a commit
that referenced
this pull request
Feb 24, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>0.5.0</summary> ## [0.5.0](https://github.com/brwse/earl/compare/v0.4.1...v0.5.0) (2026-02-24) ### ⚠ BREAKING CHANGES * handle optional params gracefully and validate template args ([#49](https://github.com/brwse/earl/issues/49)) ### Features * add named environments support ([#41](https://github.com/brwse/earl/issues/41)) ([98773b1](https://github.com/brwse/earl/commit/98773b17f44a3a6e7461f66e5cb3d9676e1f62e7)) * **bash:** add memory and CPU resource limits to sandbox ([#39](https://github.com/brwse/earl/issues/39)) ([6f57817](https://github.com/brwse/earl/commit/6f578170cf12b53f7e1d597a74d3546e203aa3c5)) * compiled catalog cache for faster CLI startup ([#34](https://github.com/brwse/earl/issues/34)) ([0349a86](https://github.com/brwse/earl/commit/0349a86973b003a7c532190737e334e4142664ac)) * earl agent skills suite (setup-earl, create-template, migrate-to-earl, troubleshoot-earl, secure-agent) ([#40](https://github.com/brwse/earl/issues/40)) ([c75a399](https://github.com/brwse/earl/commit/c75a399023d2c5072b39c84941660c0a6e7a61ea)) * external secret manager support ([#43](https://github.com/brwse/earl/issues/43)) ([e6afe3c](https://github.com/brwse/earl/commit/e6afe3cef58a65c3bdd62ed7f530eb1ce34b2f69)) * handle optional params gracefully and validate template args ([#49](https://github.com/brwse/earl/issues/49)) ([b0f1654](https://github.com/brwse/earl/commit/b0f1654616c4f19cd7f586904bfe986fee148112)) * recall.ai integration (14-command template + agent skill) ([#44](https://github.com/brwse/earl/issues/44)) ([4fee573](https://github.com/brwse/earl/commit/4fee573dd2ff14801be5453ac7972e7f70ccbe9e)) ### Bug Fixes * serialize onepassword env-var tests to prevent parallel races ([#54](https://github.com/brwse/earl/issues/54)) ([427d689](https://github.com/brwse/earl/commit/427d6892c85f7fcb3631657ec207f1e8895b8afa)) ### Dependencies * The following workspace dependencies were updated * dependencies * earl-core bumped from 0.4.1 to 0.5.0 * earl-protocol-grpc bumped from 0.4.1 to 0.5.0 * earl-protocol-http bumped from 0.4.1 to 0.5.0 * earl-protocol-bash bumped from 0.4.1 to 0.5.0 * earl-protocol-sql bumped from 0.4.1 to 0.5.0 </details> <details><summary>earl-core: 0.5.0</summary> ## [0.5.0](https://github.com/brwse/earl/compare/earl-core-v0.4.1...earl-core-v0.5.0) (2026-02-24) ### ⚠ BREAKING CHANGES * handle optional params gracefully and validate template args ([#49](https://github.com/brwse/earl/issues/49)) ### Features * compiled catalog cache for faster CLI startup ([#34](https://github.com/brwse/earl/issues/34)) ([0349a86](https://github.com/brwse/earl/commit/0349a86973b003a7c532190737e334e4142664ac)) * handle optional params gracefully and validate template args ([#49](https://github.com/brwse/earl/issues/49)) ([b0f1654](https://github.com/brwse/earl/commit/b0f1654616c4f19cd7f586904bfe986fee148112)) </details> <details><summary>earl-protocol-bash: 0.5.0</summary> ## [0.5.0](https://github.com/brwse/earl/compare/earl-protocol-bash-v0.4.1...earl-protocol-bash-v0.5.0) (2026-02-24) ### Features * add named environments support ([#41](https://github.com/brwse/earl/issues/41)) ([98773b1](https://github.com/brwse/earl/commit/98773b17f44a3a6e7461f66e5cb3d9676e1f62e7)) * **bash:** add memory and CPU resource limits to sandbox ([#39](https://github.com/brwse/earl/issues/39)) ([6f57817](https://github.com/brwse/earl/commit/6f578170cf12b53f7e1d597a74d3546e203aa3c5)) * compiled catalog cache for faster CLI startup ([#34](https://github.com/brwse/earl/issues/34)) ([0349a86](https://github.com/brwse/earl/commit/0349a86973b003a7c532190737e334e4142664ac)) ### Dependencies * The following workspace dependencies were updated * dependencies * earl-core bumped from 0.4.1 to 0.5.0 </details> <details><summary>earl-protocol-grpc: 0.5.0</summary> ## [0.5.0](https://github.com/brwse/earl/compare/earl-protocol-grpc-v0.4.1...earl-protocol-grpc-v0.5.0) (2026-02-24) ### Features * compiled catalog cache for faster CLI startup ([#34](https://github.com/brwse/earl/issues/34)) ([0349a86](https://github.com/brwse/earl/commit/0349a86973b003a7c532190737e334e4142664ac)) ### Dependencies * The following workspace dependencies were updated * dependencies * earl-core bumped from 0.4.1 to 0.5.0 </details> <details><summary>earl-protocol-http: 0.5.0</summary> ## [0.5.0](https://github.com/brwse/earl/compare/earl-protocol-http-v0.4.1...earl-protocol-http-v0.5.0) (2026-02-24) ### Features * compiled catalog cache for faster CLI startup ([#34](https://github.com/brwse/earl/issues/34)) ([0349a86](https://github.com/brwse/earl/commit/0349a86973b003a7c532190737e334e4142664ac)) ### Dependencies * The following workspace dependencies were updated * dependencies * earl-core bumped from 0.4.1 to 0.5.0 </details> <details><summary>earl-protocol-sql: 0.5.0</summary> ## [0.5.0](https://github.com/brwse/earl/compare/earl-protocol-sql-v0.4.1...earl-protocol-sql-v0.5.0) (2026-02-24) ### Features * add named environments support ([#41](https://github.com/brwse/earl/issues/41)) ([98773b1](https://github.com/brwse/earl/commit/98773b17f44a3a6e7461f66e5cb3d9676e1f62e7)) * compiled catalog cache for faster CLI startup ([#34](https://github.com/brwse/earl/issues/34)) ([0349a86](https://github.com/brwse/earl/commit/0349a86973b003a7c532190737e334e4142664ac)) ### Dependencies * The following workspace dependencies were updated * dependencies * earl-core bumped from 0.4.1 to 0.5.0 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Summary
connect_auth_*unit tests insrc/secrets/resolvers/onepassword.rsall mutate the sameOP_CONNECT_HOST/OP_CONNECT_TOKENenv vars without synchronizationconnect_auth_rejects_host_with_fragmentto see?foo=barand fail with "must not include a query string" instead of "must not include a fragment"static ENV_LOCK: std::sync::Mutex<()>and acquire it at the top of each of the four affected tests to force sequential executionTest plan
cargo test --all-targets --all-featurespasses locallyTestjob passes on this PR🤖 Generated with Claude Code