overengineeringstudio / overengineeringstudio/effect-utils

devenv broken on megarepo worktrees with %2F in path

Open
#193 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:nix type:agent-tooling type:bug
Dominant language
TypeScript
Stars
82
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
121

Description

Problem

devenv shell / direnv exec . fails on megarepo worktrees where branch names containing / get encoded as %2F in the filesystem path, e.g.:

.megarepo/.../refs/heads/schickling%2F2026-02-10-otel-dash-provisioning

This prevents running dt ts:check, dt lint:check, or any devenv-dependent command locally on these worktrees.

Root cause

Two bugs in devenv when the working directory contains literal %:

  1. SQLx URL parser in devenv-cache-core/src/db.rs percent-decodes %2F/ in the SQLite connection string, causing it to try opening the DB at a non-existent path (SQLite error 14)
  2. Nix expression parser rejects % as an invalid token in import paths

Upstream

Workaround options

  1. Megarepo: Use real directory hierarchy (schickling/branch-name/) instead of URL-encoded flat names — older worktrees already use this pattern
  2. Symlink: Create a symlink without %2F pointing to the worktree
  3. Wait for upstream fix in devenv

Context

  • CI is unaffected (checks out fresh without %2F paths)
  • Only impacts local development on these worktrees
  • Older worktrees using real / directory separators work fine

Acting on behalf of @schickling via CLI assistant.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with devenv shell or direnv exec . from a megarepo worktree whose path contains %2F. Read the linked upstream devenv issue and reproduction, then determine whether an upstream fix is available; the issue is done only when affected local devenv-dependent commands work without a workaround.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.