Problem
codedb refuses to index any repository whose path resolves under a temporary
directory (/tmp, /private/tmp, …), printing:
✗ refusing to index temporary root: /private/tmp/<repo>
There is no opt-in to override it. This blocks legitimate automation that clones
throwaway checkouts into temp dirs — most importantly SWE-bench-Lite / CI
retrieval harnesses that git clone … /tmp/<repo>, git checkout <base>, and
then index. Those flows can't use codedb at all without relocating the checkout.
Failing test case (red)
Per CONTRIBUTING.md ("Red-To-Green"), an exact repro + failing output:
mkdir -p /tmp/cdbtest/src
printf 'pub fn hello() void {}\n' > /tmp/cdbtest/src/main.zig
cd /tmp/cdbtest && git init -q
codedb /tmp/cdbtest search hello
- Expected: a search hit for
hello (or an explicit opt-in to allow temp roots).
- Actual:
✗ refusing to index temporary root: /private/tmp/cdbtest (exit 0, no results).
Suggested fix
Keep the guard as the default (it's a sensible footgun-guard against indexing
scratch dirs), but add an explicit escape hatch for harnesses:
- env
CODEDB_ALLOW_TEMP=1, or
- a
--allow-temp flag.
Found while running engram's swe-eval over SWE-bench-Lite — worked around it by
cloning the task repos under $HOME instead of /tmp.
Problem
codedbrefuses to index any repository whose path resolves under a temporarydirectory (
/tmp,/private/tmp, …), printing:There is no opt-in to override it. This blocks legitimate automation that clones
throwaway checkouts into temp dirs — most importantly SWE-bench-Lite / CI
retrieval harnesses that
git clone … /tmp/<repo>,git checkout <base>, andthen index. Those flows can't use codedb at all without relocating the checkout.
Failing test case (red)
Per
CONTRIBUTING.md("Red-To-Green"), an exact repro + failing output:hello(or an explicit opt-in to allow temp roots).✗ refusing to index temporary root: /private/tmp/cdbtest(exit 0, no results).Suggested fix
Keep the guard as the default (it's a sensible footgun-guard against indexing
scratch dirs), but add an explicit escape hatch for harnesses:
CODEDB_ALLOW_TEMP=1, or--allow-tempflag.Found while running engram's
swe-evalover SWE-bench-Lite — worked around it bycloning the task repos under
$HOMEinstead of/tmp.