Skip to content

codegraff outline returns generic error for justrach/merjs (known-good slug) #338

@justrach

Description

@justrach

Problem

`action=outline, repo=justrach/merjs, query=src/server.zig` (codegraff backend) fails with:

error: codedb.codegraff.com returned error for justrach/merjs/outline

The slug is fully indexed: `meta` returns `{git_head, indexed_at, size: 4548676}`, `search` returns hits, `tree` returns 65 KB of paths. The path `src/server.zig` is real (it's referenced in `search` results, line 1 etc.).

Looking at the server (`codedb-cloud/src/index.ts` case `outline`): it does `tdb.get(COLLECTIONS.outline, tdbKey)`, falls back to R2, then to in-memory snapshot extraction. If all three miss it returns 404; otherwise 200. The `?path=...` query param is never read — outline returns the entire collection.

So either:

  1. The TurboDB outline collection wasn't populated for this repo and snapshot extraction also returned no `Outline` section → 404 surfaces as 5xx in the client (relates to the error-detail issue)
  2. There's a real bug downstream

Once the error-detail issue lands and we can see the actual HTTP status + body, this becomes diagnosable. Filing as its own bug for tracking.

Reproduction

```
codedb_remote(repo="justrach/merjs", action="outline", query="src/server.zig", backend="codegraff")
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions