AI Code Completion Service · View 07 of 21 · Structure
Decisions
- The control plane spans every layer and sits on none: it is read through a bounded-staleness cache so a control-plane outage degrades policy freshness rather than stopping suggestions.
- The KV prefix cache is drawn as three tiers because the tier a session lands in is the difference between 120 ms and 300 ms, which makes it an architectural fact rather than an implementation detail.
- Measurement is a layer, not an aspect. In a product with no labels, the telemetry path is as load-bearing as the inference path.
Assumptions
- Prefix-cache hit rate ≥ 85% on consecutive requests within a session.
- Context assembly p95 ≤ 25 ms on the client, ≤ 15 ms server-side.
Risks
- Eight layers is eight hops of fixed overhead inside a 300 ms budget; any layer that grows a synchronous dependency spends budget that cannot be recovered downstream.