-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
In cmd/pregen.go:115-135, the pregenFetch fallback function is called when the SQLite cache is unavailable (DB path error or open error). It creates a 20-minute context, zips the repo, and calls the API -- but then discards the returned graph:
_, err = fetchGraphWithCircularDeps(ctx, apiClient, proj.Name, zipData, logFn)
Since pregen's entire purpose is to warm the local cache, fetching without being able to store the result provides zero benefit. The function wastes up to 20 minutes of network time and API resources on a call whose output is thrown away.
The two call sites in cmd/pregen.go (lines 65 and 71):
- line 65: fallback when config.DBPath() fails
- line 71: fallback when cache.Open() fails
Fix: If the cache is unavailable, log a warning and return early rather than making a pointless API call. pregenFetch should be removed or replaced with a short-circuit.
@claude please implement this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working