The bench,misses included

Six codebases, each pinned to a commit, each with a hand-written list of what a correct analysis must find. This is what the pipeline found against those lists, and everything it got wrong.

Targets passing
6/6
Publishing bar
≤2 material
Open discrepancies
4
Extraction cost, 6 targets
$2.54

How it’s graded

Each target has an expectations file: 10–20 checkable facts a correct analysis must contain, written by reading the code. Lines marked must not invent are tripwires for hallucination. Every difference between the pipeline’s model and the file is classified:

  • Miss: the code was shown and the model got it wrong or left it out.
  • Hallucination: a claim the code doesn’t support.
  • Selection gap: the file never reached the model, so it couldn’t know.
  • Schema gap: the model had it right but the schema couldn’t say it.
  • Upstream drift: the repo changed, not the pipeline.

A target passes with at most 2 material discrepancies, ones that would change a number or a finding on the page. Targets are pinned to the commit each file was last verified against (2026-10-28), so upstream changes don’t read as pipeline misses.

On 2026-10-28 every file was re-checked against its pinned source and the lines that described an earlier version of the repo were rewritten: Formbricks now uses better-auth, not next-auth, and the Papermark, Umami and Dub model counts are the ones at the pin.

Graded run: 2026-10-27, extraction by anthropic/claude-sonnet-5.5, one LLM request per target. Costs and times are from each run’s report. The bench runs with npm run bench in the Skeram CLI, which isn’t open source yet; what you can check today is each repo at its pinned commit against the lists below, and each teardown’s model, downloadable as JSON.

The six targets

Papermark

CRUD SaaSmfts/papermark@ed19717ec02a

Pass, within 2 material

Expected

  • one Next.js web service (app router AND pages router mixed), deploy hint vercel
  • postgres store via prisma, connection = pool (global PrismaClient singleton in lib/prisma.ts)
  • prisma schema is MULTI-FILE: prisma/schema/*.prisma, 78 models total across 15 files
  • redis store via @upstash/redis (http-api) — used for rate limiting among other things
  • object storage: S3 via @aws-sdk/client-s3 (+ presigned uploads, CloudFront signed URLs)
  • hot route: public document viewer pages/view/[linkId] — this is the product's core traffic path
  • document conversion work is cpu/long-running: pages/api/mupdf/* with 2048MB memory in vercel.json
  • vercel.json has NO crons block — /api/cron/* routes are QStash-triggered receivers (signature-verified via @upstash/qstash Receiver in lib/cron/index.ts), so jobs trigger = queue (or cron via external scheduler), NOT vercel cron
  • background jobs via trigger.dev: lib/trigger/ has ~15 tasks (convert-files, bulk-download, notifications, cleanup-expired-exports, automatic-unpause…)
  • emails via resend (lib/emails/*), rate-limited through Bottleneck
  • stripe payments incl. webhook route, kind=webhook
  • auth: next-auth (+ hanko passkeys) — most /api/teams/ routes authenticated
  • llm external: openai (@ai-sdk/openai + openai deps), used in AI chat routes (app/(ee)/api/ai/*)
  • incoming webhooks route(s) exist (lib/incoming-webhooks, app/api/webhooks/*)
  • Must not inventNo mongodb, NO drizzle, NO supabase (hallucination tripwires)
  • Must not inventNo websockets/realtime channels expected
Re-verified at the pinned commit
  • upstream drift: no Stripe webhook *route* any more — ee/stripe/webhooks/* handlers exist but nothing imports them. Stripe external still expected; the "webhook route" bullet no longer applies.
  • AI chat lives under app/(ee)/api/ai/chat/*; the model call is one import away in ee/features/ai/lib/chat/send-message.ts (gpt-4o-mini, caps 220/420 + 200 + 20 for title).
  • inline jobs: email-change verification via waitUntil (pages/api/account/index.ts:81-87) is the high-stakes one; the convert-page Slack log and signed-agreement mirror are low.

Found

33 routes with the public document viewer and its view-recording writes as hot, the mupdf conversion routes as CPU work, Postgres via Prisma (78 models), Redis, object storage, and 13 jobs across trigger.dev, QStash, cron and waitUntil.

Run
2026-10-27T21-10-22Z
Extraction cost
$0.52
Time
128s
Retries
0

Discrepancies 1 open

  • Upstream driftnot a miss

    No Stripe webhook route extracted.

    At the pinned commit the handlers in ee/stripe/webhooks/ have no importer, so there is no route to find. The expectations file is annotated.

  • Selection gapfixed

    The AI chat routes under app/(ee)/api/ai/chat were never sent to the model.

    Route handlers that import a model-calling file now rank ahead of the budget cut. The published teardown is from a run after the fix.

  • Schema gapfixed

    Cron-invoked HTTP routes were filed as webhooks, so the webhook-retry finding listed them.

    Routes now have a "scheduled" kind.

  • Missopen

    The AI chat route's auth comes back "authenticated" in one run and "public" in the next.

    Truth: no login, access gated by chat and viewer ids. Both answers are defensible, so auth can't be graded for capability-id gates yet.

Dub

Hot read path + queuedubinc/dub@6b463b4bdd9e

Pass, 0 material

Expected

  • has a MySQL store via PlanetScale serverless driver (@planetscale/database), ORM prisma
  • prisma schema is multi-file (prisma/schema/*.prisma) — model count must reflect ALL files, not just schema.prisma (papermark learning; raw hint said 3 models which is way off — dub has dozens — 40 models across 18 files)
  • has an Upstash Redis store, connection http-api — it caches link metadata for the redirect path
  • has object storage (R2/S3 — STORAGE_PUBLIC_BUCKET/STORAGE_PRIVATE_BUCKET env vars)
  • has Tinybird as an analytics events sink (click events) — external/other store, not a SQL db
  • the link redirect is the product's hot path and lives in middleware.ts, not an app route — must appear as kind=middleware with trafficHint=hot, reads redis (point), or its absence is a material miss
  • click recording writes analytics (tinybird) and fires async work — should NOT be modeled as a synchronous db write on the redirect path
  • many vercel.json crons (domains/verify hourly, streams/* every 1–2 min, usage/billing) — jobs with trigger=cron and real schedules, queueProvider mostly qstash-style receivers
  • has QStash (@upstash/qstash) — queued jobs exist with trigger=queue
  • stripe webhook route exists (kind=webhook)
  • next-auth present — auth external; admin pages under app/(ee)/admin.dub.co should be auth=admin
  • external: resend (email) or similar email provider for transactional mail
  • API surface under /api/* is large (partners, links, analytics, domains) — routes list should be dominated by api kind
  • Must not inventNo postgres anywhere (hallucination tripwire — it's PlanetScale MySQL)
  • Must not inventNo mongodb, NO websockets/realtime
  • Must not inventNo llm-work routes on the hot path (the ai sdk exists for name/alt-text suggestions — rare, not hot)

Found

The link redirect in middleware.ts as the hot path, MySQL via Prisma (40 models), Redis, R2 object storage, Tinybird, QStash jobs, 7 cron jobs and the Stripe webhook.

Run
2026-10-27T21-01-41Z
Extraction cost
$0.55
Time
139s
Retries
0

Discrepancies 0 open

  • Selection gapfixed

    In July the redirect middleware, the reason Dub is on the bench, was dropped from the selection.

    Root middleware is now always sent.

  • Selection gapfixed

    lib/middleware/link.ts was cut at 200 of 619 lines, hiding the waitUntil(recordClick) call.

    Middleware and other hot-path files now keep up to 600 lines.

Formbricks

Background-job heavyformbricks/formbricks@6a8e76651f73

Pass, within 2 material

Expected

  • has a Postgres store via prisma, connection pooled (long-lived server, deployHint=docker)
  • has S3-compatible object storage for survey file uploads (@aws-sdk/client-s3)
  • optional Redis exists for caching/rate-limiting (enterprise) — if claimed, connection should not be invented as pool without evidence
  • public survey response ingestion (/api/v1/client/[environmentId]/... responses/displays POSTs) is the hot write path — trafficHint=hot with writes, or material miss
  • survey display pages (/s/[surveyId]) are public + hot
  • dashboard/settings pages are authenticated, trafficHint normal/rare
  • Must not inventNo app/api/cron/* routes in this version (verified in source 2026-07-07) — the "background-job heavy" shape now manifests as synchronous fan-out inside the ingestion path, not crons
  • webhook routes exist: integrations receive/send (kind=webhook)
  • third-party integrations fire off responses: google sheets, slack, airtable, notion — externals category other/analytics, mostly non-blocking (fired after response creation)
  • transactional email via nodemailer/SMTP (email external) — survey notifications, invites
  • email/integration fan-out after a response should surface as jobs (queue/event/inline) — if modeled inline, that's a real finding, not an error
  • stripe present (cloud billing) — payments external + webhook route
  • sentry + posthog present — analytics externals
  • better-auth present (formerly next-auth) — auth external; next-auth is NOT a dependency any more
  • Must not inventNo mongodb, NO planetscale/mysql (hallucination tripwires)
  • Must not inventNo vercel deployHint (it's docker)

Found

The public response-ingestion routes (v1 and v2) as the hot write path, the public survey page as hot, Postgres via Prisma from a schema outside the app root (68 models), SMTP email, Stripe, Sentry, PostHog and Google APIs.

Run
2026-10-27T21-04-12Z
Extraction cost
$0.48
Time
108s
Retries
0

Discrepancies 1 open

  • Selection gapopen

    The Slack, Airtable and Notion integration externals are missing.

    The response-pipeline and integration modules fall outside the 260 KB budget.

  • Selection gapfixed

    An earlier run the same day failed with 3 material discrepancies: SMTP, S3 and the integrations were all missing.

    The inventory now lists which app files import each installed SDK, so the model can cite them.

Chatbot UI

AI wrappermckaywrigley/chatbot-ui@81328b61d2a4

Pass, 0 material

Expected

  • one Next.js (app router) web service, no separate backend — deploy target vercel
  • 9 LLM chat provider routes under POST /api/chat/*: openai, anthropic, azure, google, groq, mistral, openrouter, perplexity, custom — all streaming
  • groq, mistral, perplexity, openrouter, custom routes use the generic openai npm package pointed at a provider baseURL (NOT dedicated SDKs) — @mistralai/mistralai is in package.json but UNUSED (dead dep); real call site is openai-compatible. This is a hallucination tripwire: don't attribute mistral route to @mistralai/mistralai
  • /api/chat/tools does openai function-calling AND fetches arbitrary third-party URLs from schema-defined tool endpoints (SSRF-shaped call site, lines ~150-180)
  • /api/command: single non-streamed gpt completion; /api/assistants/openai: lists assistants
  • RAG/retrieval: /api/retrieval/process(+/docx), /api/retrieval/retrieve — chunk, embed, upsert to file_items, then vector search via supabase rpc match_file_items_*
  • retrieval embeddings are a BRANCH on embeddingsProvider: "openai" (or azure) calls a real external, OR "local" runs @xenova/transformers in-process (no external call, no API key needed) — the local branch has zero externalCallIds, not just cpu work alongside openai/azure
  • data store: supabase postgres only, via supabase-js/ssr (http-api connection) — ~15 tables from migrations (profiles, workspaces, folders, files, file_items, presets, assistants, chats, messages, prompts, collections, tools, assistant_files, assistant_tools, models, assistant_collections)
  • supabase storage (object storage) for uploaded files
  • chat message persistence (chats/messages tables) happens via CLIENT-SIDE supabase calls in db/messages.ts + db/chats.ts, invoked from the browser hook use-chat-handler.tsx — NOT inside the streaming API route handlers. The chat page routes correctly have no server-side reads/writes to show.
  • auth is supabase auth ONLY (signInWithPassword/signUp/resetPasswordForEmail as server actions in app/[locale]/login/page.tsx) — NO next-auth anywhere
  • middleware.ts matcher excludes /api, static, _next, auth — but the one DB query inside it (workspaces lookup) only fires when path === "/" AND a session exists (redirect-to-home-workspace case); most matched requests do zero DB work
  • vercel edge-config (@vercel/edge-config) really is a dependency, used for a signup whitelist check in login page — not a hallucination
  • /api/keys has NO auth guard — exposes which provider env vars are configured
  • /api/username/available and /api/username/get use the supabase SERVICE ROLE key with NO auth/session check — real, unauthenticated data-access endpoints
  • Must not inventNo vercel.json anywhere, NO cron/schedule hits, NO queue infra — background work does not exist; retrieval chunk/embed runs synchronously inline
  • Must not inventNo mongodb, NO prisma, NO drizzle, NO redis (hallucination tripwires)
  • Must not inventNo websocket/realtime channels (no supabase .channel()/.subscribe() usage anywhere)
  • next-pwa wraps the app (PWA), plus bundle-analyzer — cosmetic, not a job/queue system

Found

All 9 chat provider routes, including the five that use the openai package against another provider's URL, the RAG routes with their local-embedding branch, and the unauthenticated service-role routes.

Run
2026-10-27T21-06-02Z
Extraction cost
$0.31
Time
78s
Retries
0

Discrepancies 1 open

  • Missopen

    Later runs drop the output caps that four routes read from a constant lookup table.

    The published teardown is from a run that has them; caps read through a table are the pattern the model misses.

  • Hallucinationfixed

    Embeddings were once billed per file, which multiplied that cost by 20.

    The code makes one batched call per request; the extraction rules now separate batched calls from per-item loops.

Umami

Write-heavy ingestionumami-software/umami@559e3c607c23

Pass, 0 material

Expected

  • has a Postgres store via prisma (26 models in prisma/schema.prisma), Postgres via @prisma/adapter-pg — pooled connection
  • POST /api/send is the product: the tracking-event ingestion endpoint. trafficHint=hot, public, writes events — its absence or demotion is a material miss
  • /p/[slug] and /q/[slug] collect routes (src/app/(collect)/) are also public ingestion/query surface — hot or normal, public
  • optional ClickHouse path exists for event storage at scale (src/lib/clickhouse.ts or similar) — if claimed, must carry evidence; it's conditional on env config
  • optional Kafka producer exists for event ingestion fan-out (conditional, enterprise-scale path)
  • optional Redis cache exists (@umami/redis-client style) — conditional
  • auth is custom JWT (jsonwebtoken, src/lib/jwt.ts), NOT next-auth — auth external should not say next-auth
  • dashboard pages (websites, reports, admin/users, admin/teams) are authenticated; admin/* should be auth=admin
  • report/insights API routes run aggregate queries over events — reads pattern=aggregate, work=db-bound
  • tracker script is served as a static asset (script.js) — static/cdn concern, not an api route doing work
  • Must not inventNo stripe / payments anywhere (self-hosted OSS — hallucination tripwire)
  • Must not inventNo queue provider (no sqs/qstash/inngest) — background work is minimal/absent
  • .github/workflows/stale-issues.yml schedule is repo CI hygiene, NOT an application cron job (tripwire: must not appear as an app job)
  • Must not inventNo llm externals, NO realtime/websockets

Found

140 routes, with POST /api/send as the hot public write path, the /p and /q collect routes hot, Postgres via Prisma (26 models), and the optional ClickHouse, Kafka and Redis paths.

Run
2026-10-27T21-04-00Z
Extraction cost
$0.64
Time
168s
Retries
0

Discrepancies 0 open

  • Hallucinationfixed

    In July a GitHub Actions schedule (stale-issues.yml) became an application cron job.

    The inventory no longer treats CI workflow schedules as app crons.

  • Missfixed

    An October run emitted 35 routes from 84 route files it was shown.

    The rules now require one route per route file shown; the graded run has 140.

RecipeRadar (design doc)

Markdown design docdesign doc, no repo

Pass, 0 material

Expected

  • one web service, next.js app router, deploy hint vercel
  • postgres data store via supabase (orm supabase-js, connection http-api)
  • object-storage data store: supabase storage for recipe images
  • /recipes/[id] page is trafficHint=hot (doc says "expecting most traffic here")
  • / landing is public and read-heavy
  • POST /api/recipes is work=llm or long-running: scrape + OpenAI call inline, user waits 5-10s
  • POST /api/plan is work=llm, streams
  • GET /api/recipes reads pattern=list
  • stripe webhook route, kind=webhook
  • welcome email job: trigger=inline (doc admits "right in the signup handler, no queue")
  • weekly meal-plan email job: trigger=cron, schedule Sunday 6pm, from vercel.json
  • externals: openai (llm, blocking), stripe (payments), resend (email)
  • all confidences ≤ medium (design-doc source caps high)
  • Must not inventNo redis anywhere (hallucination check)
  • Must not inventNo prisma (doc explicitly says supabase-js, no Prisma)

Found

The inline welcome email, the Sunday cron, the inline OpenAI call users wait on, Supabase over HTTP and the hot recipe page, with every confidence capped at medium as a design doc should be.

Run
2026-10-27T21-07-20Z
Extraction cost
$0.05
Time
26s
Retries
0

Discrepancies 1 open

  • Schema gapopen

    Design-doc runs never get a deploy target or framework, even when the doc says "Vercel".

The flagship

vercel/ai-chatbot is pinned with the bench but doesn’t have an expectations file yet. It was graded the slower way: every finding and dollar figure checked against the source.

Vercel AI Chatbot

AI agent with toolsvercel/ai-chatbot@c2f8235e1f3e

Verified by hand

Expected

No expectations file yet. Before publishing, every finding and dollar figure was checked against the source at the pinned commit; the misses that check caught are listed here.

Found

The streaming tool loop with its step cap, the nested model calls inside the document tools as conditional calls, the hardcoded title model, and the unawaited title write.

Run
2026-10-27T21-13-23Z
Extraction cost
$0.33
Time
106s
Retries
1

Discrepancies 0 open

  • Hallucinationfixed

    The title server action was marked public, which would have published a false "unauthenticated route spends your LLM budget" finding.

    A server action with no client caller now inherits its caller's auth.

  • Hallucinationfixed

    Cited line ranges drifted 20–45 lines in a 470-line file.

    Every 10th line of the evidence bundle now carries its line number.

  • Missfixed

    The OpenTelemetry external was dropped even when the SDK facts listed it.

    Observability SDKs are merged into the externals deterministically.

  • Missfixed

    One run in five split the document tools into three call sites and billed the LLM ~13% higher.

    The engine merges same-shaped conditional calls before pricing.

Also on record

Hand edits to published teardowns are in the corrections log. Run-to-run variance on the same commit is measured separately: across five runs of vercel/ai-chatbot every published finding appeared every time, and one run added a critical finding from a background job it invented, which is still open. The cost figures moved too; the two causes found so far are fixed in the engine.