Commit 006f7d7
committed
fix(test): add env_lock to plugin lifecycle test — closes ROADMAP #24
build_runtime_runs_plugin_lifecycle_init_and_shutdown was the only test
that set/removed ANTHROPIC_API_KEY without holding the env_lock mutex.
Under parallel workspace execution, other tests racing on the same env
var could wipe the key mid-construction, causing a flaky credential error.
Root cause: process-wide env vars are shared mutable state. All other
tests that touch ANTHROPIC_API_KEY already use env_lock(). This test
was the only holdout.
Fix: add let _guard = env_lock(); at the top of the test.1 parent 82baaf3 commit 006f7d7
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10816 | 10816 | | |
10817 | 10817 | | |
10818 | 10818 | | |
| 10819 | + | |
| 10820 | + | |
| 10821 | + | |
10819 | 10822 | | |
10820 | 10823 | | |
10821 | 10824 | | |
| |||
0 commit comments