Joel Stevick

Eval harness

Eval runner

evals/run.mjs from its start to the scored report: the spend caps and the ledger, a fresh local D1 and the harness Worker, one demo account per corpus (a row in the demos table, as a visitor gets) with its PDFs uploaded through the real route, each case asked, traced and scored, and the report.

Runs in: Your machine, the developer's machine: npm test (vitest, demo/tests/), npm run eval (Node and wrangler dev, evals/) and npm run search (Node, examples/). New to Cloudflare? How these fit together

Stages, in the order they run

339 of 339 lines explained (100%)

  1. Caps, arguments and the Worker Before any case 100 of 100 lines explained (100%)
  2. One demo account per corpus The PDFs uploaded 70 of 70 lines explained (100%)
  3. Asking each case Ask, trace, score, spend 54 of 54 lines explained (100%)
  4. Scoring a case Facts, sources, status 63 of 63 lines explained (100%)
  5. Writing the report results.json and results.md 52 of 52 lines explained (100%)
In the browser
runs in the visitor's browser, on the demo page
Ingestion
runs when a PDF's text is uploaded
Query time
runs when the Worker answers a question or a search_documents call from the MCP server, and in the request handling every route shares, in the Worker and in the site's functions, which uploads and removals pass through too
MCP request
runs on a request to the MCP server or its OAuth endpoints
Site request
runs on a site request that is not a question, an upload, an MCP call or the cron: a page load, a session read, the demo page's /api/grants calls, an admin read, a file's removal
Scheduled
runs in the Worker's daily cron job
Eval run
runs when the eval harness runs on a developer's machine
MCP host
runs in an MCP host outside the Worker: the search loop example, on a developer's machine (npm run search) or in its test
Module load
runs once, when the module is loaded
Type only
erased by the TypeScript compiler; never runs
Never runs
a comment, a licence or markup with no behaviour of its own

Pinned to joelstevick-demo-rag-pipeline at 6a9c6c7.