fix(egress): the unattributed message must name the token-mismatch cause too

`/resolve` fail-closes on a missing/ambiguous registry row *and* on a
request whose identity token doesn't match. The message named only the
first, so a bottle that was registered correctly but sent no token read as
"not registered" and sent the reader looking for a deregistered bottle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 22:36:14 -04:00
committed by codex
parent 5eae8655f1
commit d27f25e0ae
2 changed files with 11 additions and 6 deletions
+5 -4
View File
@@ -418,10 +418,11 @@ class PolicyResolverLike(typing.Protocol):
# to begin with — the failure mode that made a bricked registration read like
# a misconfigured allowlist.
DENY_UNATTRIBUTED = (
"egress: this bottle is not registered with the orchestrator, so it has "
"no egress policy at all and every host is denied. The bottle's registry "
"row is missing or ambiguous — it was torn down, or another bottle claimed "
"its source IP. Relaunch the bottle; this is not an allowlist problem."
"egress: this request was not attributed to any bottle, so no egress "
"policy applies and every host is denied. Either the bottle's registry "
"row is missing/ambiguous (torn down, or another bottle claimed its "
"source IP), or the request carried no matching identity token — check "
"that the caller's proxy URL includes it. This is not an allowlist problem."
)
DENY_UNPARSEABLE = (
"egress: this bottle's egress policy could not be parsed, so it is being "