Let the caller name which tier it would rather use #127
No reviewers
Labels
No labels
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agent-proxy!127
Loading…
Reference in a new issue
No description provided.
Delete branch "prefer-backend-header"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Refs #111 — the "inform aproxy" half, which I had wrongly bundled with the part that needs your decision.
Moves the named backend to the front of that route's chain for the request.
Why this one did not need you
I offered you a choice between a request header and an admin pin endpoint and then built neither. The endpoint genuinely needs your call — it is a new authenticated write surface on a service that has had none, and
AGENTS.mdsays Ward owns authorization. The header needs none of that. It is the shape your sentence literally describes, it asks the proxy for no authority it did not already have, and it does not foreclose the endpoint.The safety property
Reorder, never filter. A hint from a caller cannot empty the chain, cannot disarm the fallback, and cannot turn a recoverable turn into a hard failure. Prefer the hosted tier and the tower stays behind it — if hosted is down, the request falls back exactly as before.
test_a_preferred_backend_that_fails_still_falls_backpins that.An unrecognised name leaves the order untouched rather than 400ing, because a routing hint should not fail a request that would otherwise have worked. Value is trimmed and bounded to 64 chars before it reaches a routing decision.
Stickiness is Echo's
A header is per-request, so "future requests should stick" means Echo keeps sending it — a variable it already owns. That is what keeps this free of shared state that two callers could disagree over.
request.backend_preferencelogs the requested name and whether it applied, so a typo or a backend absent from that route's chain is visible rather than mysterious.How to verify
ward exec test—tests/test_prefer_backend.py, 9 cases (364 passed overall).test_the_caller_can_stick_to_the_fallbackis your sentence end to end.test_the_other_tiers_stay_behind_itandtest_an_unknown_name_changes_nothingpin the safety property.Risk
Low. Additive, no-op when the header is absent, and every existing route order is unchanged without it.
Still open on #111
The shared version: an admin endpoint pinning a route for every caller until an expiry. Better fit for you flipping a switch before starting a game; worse fit for the authorization boundary. Still yours to call — but #111 no longer needs it to be useful.
Note
Branched off
saturation-stickiness(#126), tip of the #118 → … → #124 → #126 chain.