Skip to content

Add flat policy surface and wire 9 per-tenant knobs - #141

Open
scott-rc wants to merge 1 commit into
sc/assignment-redesign-3from
sc/assignment-redesign-4
Open

scott-rc wants to merge 1 commit into
sc/assignment-redesign-3from
sc/assignment-redesign-4

Conversation

@scott-rc

Copy link
Copy Markdown
Contributor

Phase 4 of the assignment-redesign plan. Tenants need per-deployment overrides for tunables (HPA tolerance, retry policy, heartbeat timeout, assign timeout, token TTL, scale targets) that currently live as cluster-wide flags. Add a flat, concern-prefixed policy surface on Assignment (scale_*, zone_*, assign_*, heartbeat_*, retry_*, transport_*) with reserved field-number ranges per concern, three enums (ZoneSpread, ZoneAffinity, Backpressure), and 29 resolver methods on *Assignment. Header validation rejects negative durations, inverted backoff bounds, zero on degenerate fields, and out-of-range scale tolerance.

Nine knobs are wired end-to-end through the controller's HPA scaling math, supervisor heartbeat-timeout / scale-to-zero, assignPod POST timeout + PASETO token TTL, and the router's RoundTrip retry loop. Decision sites accept the converge-tick *Assignment snapshot as a parameter so a tenant override applies uniformly across one tick. The five scale_* resolvers prefer flat with Scale fallback so an existing tenant header continues to work.

The remaining 15 placeholder knobs (transport_*, zone_*, assign_path, heartbeat_interval, retry_backpressure, retry_status_codes) validate and expose resolver methods but are not read by any decision site -- each followup plan wires its own.

Three telemetry keys (scale_target_cpu_millicores, scale_target_memory_mebibytes, scale_target_in_flight_requests) dual-emit alongside the legacy target_* keys; both report the flat-preferred-over-Scale resolved value so dashboards keying on either vocabulary observe identical series.

Stacked on top of #140 (Phase 3: CLI flags + Web UI routes). Plan: tmp/assignment-redesign/plan.md.

Declare a flat, concern-prefixed policy surface on Assignment
(scale_*, zone_*, assign_*, heartbeat_*, retry_*, transport_*) with
reserved field-number ranges per concern and three enums (ZoneSpread,
ZoneAffinity, Backpressure). The 9 wired knobs feed the supervisor's
HPA scaling math, the assignPod handshake, the heartbeat-timeout
supervision, and the router's RoundTrip retry loop via resolver
methods on *Assignment with cluster-default fallback. Decision sites
accept the converge-tick assignment snapshot as a parameter so a
tenant override applies uniformly across a single tick.

The 15 placeholder knobs (transport_*, zone_*, assign_path,
heartbeat_interval, retry_backpressure, retry_status_codes) validate
and expose resolver methods but are not read by any decision site;
followup plans wire each.

Three telemetry keys (scale_target_cpu_millicores,
scale_target_memory_mebibytes, scale_target_in_flight_requests)
dual-emit alongside the legacy target_* keys; both report the
flat-preferred-over-Scale resolved value so dashboards keying on
either vocabulary observe identical series.
@scott-rc

scott-rc commented May 11, 2026 •

Copy link
Copy Markdown
Contributor Author

This branch has not been deployed

No deployments
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