Canonicalize the artifact root (realpath) so isolated projects avoid symlinked temp paths
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start in instance.ts, where the artifact root is resolved from os.tmpdir(), then trace how that path is passed to --dev, project files, and OPENCODE_CONFIG_DIR. Run test/manual/tui-regressions/plugin-registry.ts without TMPDIR and compare the watcher and plugin-loading logs. Done means the root uses one canonical realpath and the isolated project no longer starts duplicate watchers or fails with Duplicate plugin ID.
Written by the indexing model from the issue text.
Description
Drive 2.0.0 (464f9a3), OpenCode V2 0b771030ed and e73fa5f476.
Default artifacts live under os.tmpdir(), which on macOS is /var/folders/... → symlink to /private/var/folders/.... OpenCode currently discovers the isolated project's .opencode directory under both spellings, starts two watchers, loads every local plugin twice, and fails activation with Duplicate plugin ID. That is an OpenCode bug (tracked separately), but Drive is the thing putting every isolated project under a symlinked root, so every plugin probe on macOS hits it.
Proposal: resolve the artifact root with realpath in instance.ts (resolve(join(tmpdir(), "opencode-drive"))) and pass the canonical path everywhere (--dev, project files, OPENCODE_CONFIG_DIR). Until then the workaround is TMPDIR="$PWD/.drive-output/tmp", now documented in the tui-regressions README under "Plugin registry".
Repro: test/manual/tui-regressions/plugin-registry.ts without TMPDIR; server log shows two watcher started path=…/.opencode lines in one boot span followed by failed to reload plugins cause=Die(Error: Duplicate plugin ID: alpha).
- Dominant language
- TypeScript
- Stars
- 32
- Forks
- 4
- Avg merge
- 10m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode-drive
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anomalyco/opencode-drive#102 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
anomalyco/opencode-drive#104 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
anomalyco/opencode-drive#103 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
anomalyco/opencode-drive#97 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 68/100
anomalyco/opencode-drive#86 · 1 comment ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode-drive
Similar issues
-
refactor
Difficulty 2/5 Half a day Newbie friendliness 84/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OHDSI/Data2Evidence#3450 ·
Maintainers usually reply within 2 days
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 comment ·
Maintainers usually reply within 1 day
-
automation missing-model model-sync provider:ofox
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/models.dev#8421 ·
Maintainers usually reply within 1 day
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day