Skip to content

refactor(api): rename HTTP routes, JSON keys, CLI messages → project (2/4)#1243

Merged
christso merged 1 commit into
mainfrom
refactor/rename-pr2-http
May 15, 2026
Merged

refactor(api): rename HTTP routes, JSON keys, CLI messages → project (2/4)#1243
christso merged 1 commit into
mainfrom
refactor/rename-pr2-http

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

PR 2 of 4 in the benchmark → project rename. Stacks on #1242 (PR 1). Renames the wire-format surface of the API.

Routes

`/api/benchmarks` → `/api/projects` (POST, GET, DELETE, /all-runs, and all 15+ `:projectId`-scoped subroutes including the eval-runner endpoints).

JSON response fields

Before After
`{ benchmarks: [...] }` envelope `{ projects: [...] }`
`benchmark_id`, `benchmark_name` `project_id`, `project_name`
`multi_benchmark_dashboard` `multi_project_dashboard`

CLI flag descriptions and console messages

`--add`/`--remove` help text and the "Registered/Unregistered/Benchmark not found/Multi-benchmark mode" strings all flip to "project."

TypeScript-internal renames in the same files

  • `withBenchmark()` middleware → `withProject()`
  • `benchmarkEntryToWire()` → `projectEntryToWire()`
  • `multiBenchmarkDashboard` option → `multiProjectDashboard`
  • `isMultiBenchmark`, `benchmarkCount` → `isMultiProject`, `projectCount`
  • Local var `const benchmarkId = c.req.param('projectId')` → `const projectId`

Intentionally NOT renamed

  • `benchmark.json` per-run artifact and its writer (Agent Skills compat — different concept, different rename).
  • Studio frontend — Studio is broken on this branch alone because it still calls `/api/benchmarks/*` and parses `{benchmarks:...}` envelopes. PR 3 lands the matching frontend changes. This is acceptable mid-stack because no users yet and the stack is intended to land in sequence.

Test plan

  • `bun run typecheck` — passes
  • `bun run lint` — clean
  • `bun run test` — 2374 tests pass (1768 core + 67 eval + 539 cli, 0 fail). Migration test from PR 1 still passes.
  • `bun run build` — all packages build
  • Pre-push hooks green
  • Studio UAT deferred to PR 3 (matching frontend)

🤖 Generated with Claude Code

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4b8a07f
Status:⚡️  Build in progress...

View logs

@christso christso marked this pull request as ready for review May 15, 2026 00:29
Base automatically changed from refactor/rename-benchmark-to-project to main May 15, 2026 00:41
…→ project

PR 2 of 4 in the benchmark → project rename. Wire-format changes:

Routes (apps/cli/src/commands/results/{serve.ts,eval-runner.ts}):
  /api/benchmarks                       → /api/projects
  /api/benchmarks/all-runs              → /api/projects/all-runs
  /api/benchmarks/:benchmarkId/*        → /api/projects/:projectId/*
  /api/benchmarks/:benchmarkId/eval/*   → /api/projects/:projectId/eval/*

JSON response fields:
  benchmarks (list envelope)            → projects
  benchmark_id                          → project_id
  benchmark_name                        → project_name
  multi_benchmark_dashboard             → multi_project_dashboard

CLI flag descriptions and error/log messages:
  "Register a benchmark by path"        → "Register a project by path"
  "Unregister a benchmark by ID"        → "Unregister a project by ID"
  "Force single-benchmark dashboard"    → "Force single-project dashboard"
  "Launch in multi-benchmark dashboard" → "Launch in multi-project dashboard"
  "Benchmark not found"                 → "Project not found"
  "Registered benchmark: …"             → "Registered project: …"
  "Unregistered benchmark: …"           → "Unregistered project: …"
  "Multi-benchmark mode: N benchmark(s)"→ "Multi-project mode: N project(s)"

TypeScript-internal renames in the same files:
  withBenchmark()                       → withProject()
  benchmarkEntryToWire()                → projectEntryToWire()
  multiBenchmarkDashboard option        → multiProjectDashboard
  isMultiBenchmark, benchmarkCount       → isMultiProject, projectCount

Out of scope (intentionally NOT renamed):
  - benchmark.json per-run artifact and its writer (Agent Skills compat)
  - examples/*-benchmark dirs (academic benchmark-suite semantics)

Stacks on refactor/rename-benchmark-to-project. The Studio frontend still
calls /api/benchmarks/* and parses {benchmarks: ...} envelopes on this
branch — PR 3 ships the matching frontend changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@christso christso force-pushed the refactor/rename-pr2-http branch from 1d861fa to 4b8a07f Compare May 15, 2026 00:42
@christso christso merged commit 407be13 into main May 15, 2026
3 of 4 checks passed
@christso christso deleted the refactor/rename-pr2-http branch May 15, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant