Skip to content

Bound latch memory + document dynamic-steering trust model#229

Merged
RhizoNymph merged 4 commits into
feat/dynamic-steeringfrom
chore/steering-trust-hardening
Jul 5, 2026
Merged

Bound latch memory + document dynamic-steering trust model#229
RhizoNymph merged 4 commits into
feat/dynamic-steeringfrom
chore/steering-trust-hardening

Conversation

@RhizoNymph

Copy link
Copy Markdown
Owner

What

Hardens the per-conversation latched steering stack against two review findings, without adding authentication.

Latch byte bound (controller.py). SteeringController's latch map was bounded by entry count only, but each latched RequestSteeringOverride pins full steering vectors (all hooks x layers, float32) on every TP rank — so 1024 entries x unbounded per-entry payload is an unbounded host-memory exposure. Adds a max_latched_bytes knob (default 256 MiB) tracked as a running total plus per-entry bytes computed once at latch time. Eviction stays FIFO/oldest-first until both the count cap and the byte cap fit; a single override larger than the byte cap alone is refused (rate-limited warning, no crash) — the triggering request still steers its own turn, only cross-turn persistence is dropped. Eviction remains a pure function of the latch sequence (rank-deterministic). latched_bytes is exposed in the existing status() surface.

Trust-model documentation. Adds design §8.3 "Trust model and multi-tenancy": the stack assumes single-tenant / trusted-client deployment; conversation_id is a global, client-chosen, unauthenticated namespace, so in any multi-client deployment the operator or gateway must namespace ids per client (e.g. per-tenant prefix) to prevent collisions; documents the latch count+byte bounds and the FIFO churn caveat (a flood of fresh ids silently evicts other clients' latches); and records the named-vector registry's shared last-writer-wins semantics and why it is deliberately not behind the steering API key (naming sugar over the already-open inline path, capability-equivalent). Mirrors the namespacing requirement into the user-facing conversation_id field descriptions in the OpenAI completion + chat protocols.

Why

Unbounded latch host-memory growth on every rank, and undocumented single-tenant trust assumptions around a guessable/reusable conversation id and a shared mutable vector-name namespace.

No authentication, registry code, or schema changes.

Sibling-PR conflicts

docs/design/dynamic_steering.md is also touched by feat/steering-determinism-checksum (expected merge conflict). vllm/v1/capture/controller.py is not touched by any sibling.

RhizoNymph and others added 2 commits July 4, 2026 20:59
feat(steering): worker-registered named vectors + latch-by-reference
…e/steering-trust-hardening

# Conflicts:
#	vllm/v1/worker/steering_model_runner_mixin.py
@RhizoNymph RhizoNymph merged commit 9506093 into feat/dynamic-steering Jul 5, 2026
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