Skip to content

fix(drive): reject ambient fixture config - #95

Merged
kitlangton merged 1 commit into
mainfrom
fixture-isolation
Sep 18, 2026
Merged

kitlangton merged 1 commit into
mainfrom
fixture-isolation

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why

Drive places isolated projects under TMPDIR. If that directory has an ancestor .opencode, .claude, .agents, or direct OpenCode config, V2 intentionally discovers it and silently injects ambient skills, plugins, and instructions into the fixture (#84).

What Changes

Before creating an instance, Drive now scans the artifact-root ancestry for OpenCode configuration sources. It refuses contaminated roots with the exact source path and tells the caller to use a neutral TMPDIR, preventing a test or recording from silently using host configuration.

Isolation boundary

The generated project's own .opencode directory remains the fixture-owned configuration source. Only ancestors outside the generated artifact root are rejected.

Scope

This does not change OpenCode's intentional upward discovery behavior or Drive's artifact layout. It makes the existing isolation contract fail closed when the selected temporary ancestry cannot satisfy it.

Verification

cd packages/drive
bun run check
bun run test
  • Live current-V2 repro previously loaded the external ambient skill; the fixed build refuses that same root before launch and names the ancestor .opencode directory.
  • 274 Effect tests and 61 CLI integration tests pass.

@kitlangton
kitlangton merged commit bcce802 into main Sep 18, 2026
1 check passed
@kitlangton
kitlangton deleted the fixture-isolation branch September 18, 2026 06:17
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