Skip to content

Commit f9a87c5

Browse files
test(agents): lock env in uninstall memory-digest tests (#263)
Two sync uninstall tests set TRACEDECAY_DATA_DIR via EnvVarGuard without taking PROCESS_ENV_LOCK, racing every env-guarded test in the same binary under plain parallel cargo test — most visibly test_codex_install_exports_active_managed_skills, whose install read a foreign profile root and exported no managed skills. nextest (one process per test) never hits it, so CI stayed green while local runs flaked. Take the lock like every other env-mutating test. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 41bb533 commit f9a87c5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/agent_suite/agent_test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4147,6 +4147,7 @@ fn test_claude_install_then_uninstall() {
41474147

41484148
#[test]
41494149
fn test_claude_uninstall_unrecords_memory_digest_target() {
4150+
let _env_lock = AGENT_ENV_LOCK.blocking_lock();
41504151
let dir = TempDir::new().unwrap();
41514152
let home = dir.path();
41524153
let profile_root = home.join(".tracedecay");
@@ -4270,6 +4271,7 @@ fn test_codex_install_then_uninstall() {
42704271

42714272
#[test]
42724273
fn test_codex_local_uninstall_unrecords_legacy_repo_memory_digest_target() {
4274+
let _env_lock = AGENT_ENV_LOCK.blocking_lock();
42734275
let home = TempDir::new().unwrap();
42744276
let project = TempDir::new().unwrap();
42754277
let mut ctx = make_install_ctx(home.path());

0 commit comments

Comments
 (0)