Skip to main content

Convex Index Audit

Static read-only audit of convex/. Generated by scripts/audit-convex-indexes.ts. No runtime code or schema was modified. This report is a snapshot — re-run the script to refresh it.
  • Generated: 2026-05-17T08:30:46.361Z
  • Schema source: convex/schema.ts
  • Convex files scanned: 179
  • Tables declared: 96 (with 298 total indexes)
  • Tables with zero indexes: 1
  • Queries: 879 total — 799 use .withIndex(...), 80 look like table scans
  • .collect() calls: 190 total — 167 bounded (scoped by .withIndex(...) or capped by .take(N)), 23 unbounded

A. Tables & indexes

B. Queries without .withIndex(...) (table-scan candidates)

Note: a query() without .withIndex(...) is not always a bug — it may be intentionally fetching a single doc by id or operating on a tiny table (get, unique, first, etc.). Treat this list as a triage queue, not a defect list.

C. Unbounded .collect() locations

“Unbounded” = a .collect() with no preceding .withIndex(...) and no .take(N) in the same chain. These walk the entire table.
Note: unbounded .collect() is flagged by the pre-commit Convex linter as a blocking error. Each entry above should ideally be replaced with .take(N) (or paginated). Some may be safe because the underlying table is provably small (e.g. one row per location); confirm before changing behavior.

Re-run with bun run scripts/audit-convex-indexes.ts. The JSON sidecar at the same path is available for follow-up tooling (e.g. piping into Linear, an annotated diff, or a custom reporter).