fix(agentnetwork): fold case in the delete guard's proxy-address match

Review follow-ups from #7085:

Proxies declare their cluster address verbatim and Connect stores it
unchanged, while the settings row is normalized lowercase — so on
case-sensitive collations a proxy declaring "GW.Example.com" slipped
past the settings delete guard. Hostnames are case-insensitive per
RFC 4343; the guard query now folds case on both sides, and the guard
test declares its proxy with mixed casing to pin that.

The re-bootstrap test asserted the fresh label differs from the
released one, but nothing guarantees that: the released hostname is
not reserved and a fresh draw may legitimately re-pick it. The
assertions now check the new row's shape (labeled beneath the
requested address, default toggles, persisted) instead of relying on
the RNG not colliding.

The settings bootstrap POST also marks its request body required in
the OpenAPI spec, matching the runtime behavior (a body-less POST is
rejected). The suggested oneOf exactly-one constraint was evaluated
and skipped: oapi-codegen renders it as a json.RawMessage union
wrapper on the generated type, which every caller would have to fight,
and nothing validates request bodies against the schema at runtime —
the handler's 422 stays the enforcement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Brad Ison
2026-08-10 11:07:15 +02:00
parent 16b42e402c
commit 1a39e50f70
3 changed files with 24 additions and 9 deletions

View File

@@ -13751,6 +13751,7 @@ paths:
- BearerAuth: [ ]
- TokenAuth: [ ]
requestBody:
required: true
description: Settings bootstrap request
content:
application/json: