overengineeringstudio / overengineeringstudio/effect-utils

Genie resolves symlinked repo members to realpaths and breaks sibling relative imports

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

Nobody has claimed this yet.

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

Description

Genie fails when a .genie.ts file is run from a symlinked repo member and that file imports a sibling path such as ../effect-utils/....

Reproduction

https://github.com/schickling-repros/2026-04-effect-utils-genie-symlink-import-bug

nix run .#repro

The repro is fully synthetic and public. It creates a temp layout with:

  • linked/repo -> ../real-repo
  • linked/effect-utils -> <public effect-utils source>

The .genie.ts file lives in real-repo but imports ../effect-utils/genie/external.ts. That import should work from the logical symlinked layout, but Genie executes the file from its physical realpath instead.

Expected

Genie should preserve the logical --cwd path, or otherwise resolve relative imports in .genie.ts files so sibling paths under the symlinked workspace layout continue to work.

Actual

nix run .#repro deterministically fails with:

GenieImportError: Failed to import .../real-repo/package.json.genie.ts: ResolveMessage: Cannot find module '../effect-utils/genie/external.ts'

The JSON output also shows that Genie's effective cwd is the physical real-repo path rather than the symlinked linked/repo path.

Why this matters

This breaks megarepo-style workspaces where repo members are attached under a logical repos/<name> tree and .genie.ts files intentionally import sibling repos through that logical layout.

Versions

  • genie: current github:overengineeringstudio/effect-utils#genie as of 2026-04-13
  • Repro observed on macOS arm64
  • Repro command verified locally before filing

Filed by an AI assistant on behalf of @schickling

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

Start by running nix run .#repro and inspect how the .genie.ts file, including package.json.genie.ts, is executed and how its effective cwd is reported. Done means the logical linked/repo cwd is preserved and the sibling ../effect-utils/genie/external.ts import succeeds in the synthetic reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.