Skip to content

Isolated projects inherit ancestor configuration when TMPDIR is under a configured directory #84

Description

@kitlangton

Drive 2.1.0, Bun 1.4.0, macOS arm64, OpenCode V2 97303c39dd153b64d7036249b279490201820b19 via opencode.dev.

An isolated Drive project inherits ancestor .opencode/skills when TMPDIR is inside a configured repository/home ancestry. OPENCODE_TEST_HOME and the pinned OPENCODE_CONFIG_DIR isolate home/global config, but V2 separately discovers project config directories up to the filesystem root. project: { git: true } does not stop that discovery. This is expected OpenCode discovery behavior, but a surprising hole in Drive's fixture isolation.

Minimal reproduction:

  1. Create an otherwise empty directory containing .opencode/skills/ambient/SKILL.md, with a description and benign marker.
  2. Create a tmp directory below it and set TMPDIR to that absolute path.
  3. Run a fully provided OpenCodeDriver.use program with project: { git: true } and read opencode.skill.list() or submit one scripted model request.
  4. The isolated run discovers ambient from outside its own generated project/home. Logs show that ancestor source being watched and loaded.

Expected: the isolated project sees fixture-defined sources and built-ins, or Drive warns that the chosen artifact root allows ancestor configuration inheritance.

Actual: the surrounding catalog appears in prepared model context and skill-list snapshots. No explicit fixture configuration requested it. This can contaminate tests and recordings, not just change startup time.

Recovery verified: run from a neutral temporary ancestry, keep media in the desired repository output directory, and copy retained artifacts back after shutdown. A baseline assertion that every skill location starts with /builtin/ then passes. No runtime or global configuration changes were needed.

Please consider an explicit artifact-root/isolation option or a preflight ancestor-config warning. This report intentionally omits real ambient catalog contents and machine-specific paths.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions