Skip to content

Remove unused interfaces and historical commentary (#703) - #711

Merged
zzylol merged 4 commits into
mainfrom
refactor/current-intent-comments
Sep 13, 2026
Merged

zzylol merged 4 commits into
mainfrom
refactor/current-intent-comments

Conversation

@zzylol

@zzylol zzylol commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Why

Address four cleanup items in #703: historical source commentary, redundant HTTP adapter traits, unused accumulator factories, and disconnected control-plane modules.

What

  • Replace migration narratives with current contracts and invariants.
  • Collapse request/response adapter traits into HttpProtocolAdapter and construct the default Prometheus adapter directly.
  • Remove three unused factory traits and four concrete accumulator factories.
  • Remove summary_reconcile and threshold_alloc, whose only callers were their own tests.

How

Keep the existing adapter method implementations, VictoriaMetrics language identity, and live accumulator creation/merge paths. Remove unused definitions and exports after checking repository references. Four commits separate the cleanup areas.

Before this PR

HTTP dispatch used a single-arm factory and three traits always consumed together. Unused factories and self-tested modules expanded the public Rust surface. Comments described retired implementations and migrations as ongoing work.

After this PR

HTTP dispatch uses one adapter trait with direct construction. Developers work against the live interfaces and current contract documentation. Existing query parsing, responses, fallback, and accumulator behavior are preserved.

Evidence

Net removal: 2,644 lines across 96 files. Non-documentation Rust tokens are unchanged in all 79 comment-only files. Screenshots and performance measurements are not applicable.

Verification

  • Unit tests: data plane 1,199 passed; control plane 737 passed.
  • End-to-end: e2e_controller_plans_and_backend_serves 12 passed, covering controller configuration and backend sketch queries.
  • Other checks: cargo check --workspace --all-targets, formatting, git diff --check, and removed-symbol reference checks passed. Used Rust 1.98.0; disabled incremental compilation after a cache-file error during control-plane test compilation.
  • Existing coverage was retained for live paths; no new behavior required new tests.

Architectural decisions

Keep a single HTTP trait because request and response traits have no independent consumers. Retain separate Prometheus and VictoriaMetrics implementations for their language and fallback contracts.

Limitations and follow-up

Partially addresses #703; other cleanup items remain outside this PR. Removed public Rust symbols require downstream source migration if used outside this repository. The obsolete lib.rs mapping table was already removed in #710.

Human review — do not complete with an agent

  • The MVP boundary is correct.
  • New conceptual layers or public interfaces are necessary.
  • The before/after description matches the intended product behavior.
  • Human reviewer:
  • Decision and rationale:

@zzylol
zzylol merged commit 47d4332 into main Sep 13, 2026
1 check failed
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