Skip to content

Remove the unreferenced legacy planning endpoints - #715

Merged
zzylol merged 5 commits into
mainfrom
refactor/703-remove-legacy-endpoints
Sep 13, 2026
Merged

zzylol merged 5 commits into
mainfrom
refactor/703-remove-legacy-endpoints

Conversation

@zzylol

@zzylol zzylol commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

#703 item 18, first deletion step. Stacked on #713 — review that one first.

What goes

Six endpoints on the legacy planning API have no caller anywhere in the workspace — not the data plane, not the process e2e tests, not the docs:

Endpoint Handler
POST /api/v1/plan/auto handle_plan_auto
POST /api/v1/plan/pareto handle_pareto
POST /api/v1/plan/:metric/rollback handle_rollback
GET /api/v1/plan/:metric/diff handle_plan_diff
GET /api/v1/agents handle_agents
GET /api/v1/config/:metric handle_get_config

Removing them retires the autonomous allocation chain that existed only to serve /plan/autoepsilon_alloc::build_auto_plan and its knob allocation, which pulled in query_planning, and through it sketch_selection and asap_tier_implement.

Deleted outright: query_planning.rs (327), sketch_selection.rs (169), asap_tier_implement.rs (333), deployment_cost/pareto.rs (418).

1,988 lines removed, none added.

What stays, and why

epsilon_alloc is not deleted, contrary to the shape suggested in the issue. derive_sample_p is called from physical/compiler.rs and split_budget from types.rs, both on the live physical path. The module keeps those two and drops the rest — 464 lines down to 136.

Three endpoints on the legacy API are deliberately untouched because they have live callers:

  • POST /api/v1/plan — the data plane's capability-miss notifier posts to it (data_plane/src/main.rs wires HttpControlPlaneClient, reached from asap_query_engine/engine.rs)
  • GET /api/v1/plan/:metricdata_plane/.../config_fetcher.rs polls it
  • GET /api/v1/cost-modelcontrol_plane/tests/component_process_e2e.rs uses it as the readiness probe

Consolidating those three onto the physical compiler is the next step and needs handle_plan rewritten, not deleted.

Testing

  • cargo +1.98.0 check -p control_plane --all-targets — clean, no warnings.
  • cargo +1.98.0 test -p control_plane --lib — 705 passed, 0 failed. The count drops from 738 because 33 tests covered only the deleted code.

🤖 Generated with Claude Code

zzylol and others added 5 commits September 13, 2026 16:13
Six endpoints on the legacy planning API have no caller anywhere in the
workspace — not the data plane, not the process e2e tests, not the docs:
`/plan/auto`, `/plan/pareto`, `/plan/:metric/rollback`,
`/plan/:metric/diff`, `/agents`, and `/config/:metric`.

Removing them retires the autonomous allocation chain that existed only
to serve `/plan/auto`: `epsilon_alloc::build_auto_plan` and its knob
allocation, which pulled in `query_planning`, and through it
`sketch_selection` and `asap_tier_implement`.

`epsilon_alloc` itself stays. `derive_sample_p` and `split_budget` are
live on the physical path (`physical/compiler.rs` and `types.rs`), so
the module keeps those two and loses the rest.

`POST /api/v1/plan`, `GET /api/v1/plan/:metric` and `/api/v1/cost-model`
are untouched: the data plane's capability-miss notifier and config
fetcher call the first two, and `control_plane/tests/component_process_e2e.rs`
uses the third as its readiness probe.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@zzylol
zzylol force-pushed the refactor/703-remove-legacy-endpoints branch from 794befe to 7588fbb Compare September 13, 2026 22:25
@zzylol
zzylol merged commit e25d53b into main Sep 13, 2026
1 check passed
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