Extract the repeated urllib request construction (URL, secret, payload,
headers, urlopen, parsing) shared by the six broker functions into
_broker_request and its best-effort _broker_request_safe variant. The
best-effort wrappers collapse to a few lines each and the nosec B310
annotation now lives in one place.
Slim the tests with a _streaming() context manager plus _auth/_claim_ok
helpers, removing the repeated cm.get_config patch boilerplate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>