Symptom
CI intermittently fails with:
× CodexAdapter > prepareSession > injects skills into .agents/skills/
→ expected '# Catalog version' to contain '# Deploy'
Observed on PR #155 — failed on test (18) and test (20), passed on test (22), passed on rerun. Not reproducible reliably; passes locally.
Root cause
Vitest runs test files in parallel workers. Two adapter test files write skill-source SKILL.md files to shared, non-unique paths under the OS temp dir:
packages/extensions/adapter-codex/tests/codex-adapter.test.ts — createTempDir() makes a unique air-codex-test-<ts>-<rand> dir, but the test then writes its skill source to join(dir, "..", "skills", "deploy") — i.e. a sibling path (<tmpdir>/skills/deploy) that is not unique to the test. It writes # Deploy, then asserts the injected file contains # Deploy.
packages/extensions/adapter-claude/tests/claude-adapter.test.ts:542 writes # Catalog version to its own catalog skill source.
When the two files run concurrently and their skill-source paths overlap (shared <tmpdir> ancestry with a fixed skills/deploy leaf), one worker's # Catalog version clobbers the other's # Deploy between write and read, so the codex assertion sees # Catalog version.
Fix direction
Keep every test's skill-source files inside that test's unique temp dir, never in a shared sibling path. E.g. write skill sources under join(dir, "catalog", "skills", "deploy") (a child of the unique temp dir) instead of join(dir, "..", "skills", "deploy"). Audit both adapter test files (and any others using the join(dir, "..", …) pattern) for the same shared-path issue.
Notes
Pre-existing; surfaced on PR #155 but unrelated to that change (which is scoped to plugin manifest resolution). Low severity (rerun clears it) but recurring CI noise.
Symptom
CI intermittently fails with:
Observed on PR #155 — failed on
test (18)andtest (20), passed ontest (22), passed on rerun. Not reproducible reliably; passes locally.Root cause
Vitest runs test files in parallel workers. Two adapter test files write skill-source
SKILL.mdfiles to shared, non-unique paths under the OS temp dir:packages/extensions/adapter-codex/tests/codex-adapter.test.ts—createTempDir()makes a uniqueair-codex-test-<ts>-<rand>dir, but the test then writes its skill source tojoin(dir, "..", "skills", "deploy")— i.e. a sibling path (<tmpdir>/skills/deploy) that is not unique to the test. It writes# Deploy, then asserts the injected file contains# Deploy.packages/extensions/adapter-claude/tests/claude-adapter.test.ts:542writes# Catalog versionto its own catalog skill source.When the two files run concurrently and their skill-source paths overlap (shared
<tmpdir>ancestry with a fixedskills/deployleaf), one worker's# Catalog versionclobbers the other's# Deploybetween write and read, so the codex assertion sees# Catalog version.Fix direction
Keep every test's skill-source files inside that test's unique temp dir, never in a shared sibling path. E.g. write skill sources under
join(dir, "catalog", "skills", "deploy")(a child of the unique temp dir) instead ofjoin(dir, "..", "skills", "deploy"). Audit both adapter test files (and any others using thejoin(dir, "..", …)pattern) for the same shared-path issue.Notes
Pre-existing; surfaced on PR #155 but unrelated to that change (which is scoped to plugin manifest resolution). Low severity (rerun clears it) but recurring CI noise.