Skip to content

fix: serialize onepassword env-var tests to prevent parallel races#54

Merged
jrandolf merged 1 commit intomainfrom
fix/onepassword-test-race
Feb 24, 2026
Merged

fix: serialize onepassword env-var tests to prevent parallel races#54
jrandolf merged 1 commit intomainfrom
fix/onepassword-test-race

Conversation

@jrandolf
Copy link
Contributor

Summary

  • Four connect_auth_* unit tests in src/secrets/resolvers/onepassword.rs all mutate the same OP_CONNECT_HOST / OP_CONNECT_TOKEN env vars without synchronization
  • When Rust's test runner executes them in parallel, the query-string test clobbers the fragment test's env var (or vice versa), causing connect_auth_rejects_host_with_fragment to see ?foo=bar and fail with "must not include a query string" instead of "must not include a fragment"
  • Added a module-level static ENV_LOCK: std::sync::Mutex<()> and acquire it at the top of each of the four affected tests to force sequential execution

Test plan

  • cargo test --all-targets --all-features passes locally
  • CI Test job passes on this PR

🤖 Generated with Claude Code

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>
@jrandolf jrandolf merged commit 427d689 into main Feb 24, 2026
9 checks passed
@jrandolf jrandolf deleted the fix/onepassword-test-race branch February 24, 2026 19:46
@jrandolf jrandolf mentioned this pull request Feb 24, 2026
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).
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.

1 participant