refactor(control-plane): resolve names server-side, drop client-side filtering

main

Commit

toothbrush3mo ago

The control plane now does O(1), case-insensitive by-name lookups for orgs, projects, and org-scoped projects (lower(name) indexes). Delegate to it and delete the CLI's "list everything then filter" code.

  • regenerate coreapi client: ListOrgs gains a name param + singular org in its response; GET /orgs/{orgId}/projects gains a name param + singular project (spec hand-authored ahead of deploy; idempotent on real refresh)
  • resolveOrgRef/resolveProjectRef read the singular match the server returns and map 404 to a friendly "no X named" error
  • project list --org --name now filters server-side instead of client-side
  • drop pickOrg, pickProject, filterProjectsByName

Also fixes a latent bug: the name paths read out.Projects, but the server returns a name match under the singular out.Project, so an existing project resolved as "not found". Now reads the correct field.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: bb17fef4a163

Checkpoints

Resolve Names Server-Side in Control Plane

Claude Code
View session
Checkpoint 1