fix: let any refusal confirm a declared dead forge

citron's taken domain now resolves to an unrelated host that fails TLS,
so the pass reported an upstream error where the profile already states
the forge is gone. Any forge error now agrees with upstream_gone; a rate
limit still does not.
This commit is contained in:
Abdessamad Derraz committed 2026-10-26 21:53:47 +01:00
1 parent 8f5b715c75
commit 32633c4e5c
2 files changed
+14 -1

No files matched your search

+5 -1
View File
@@ -1591,7 +1591,11 @@ def build_report(
try: try:
views = select_views(profile, cache_dir, offline) views = select_views(profile, cache_dir, offline)
except upstream.GoneError: except upstream.RateLimitError:
raise
except upstream.UpstreamError:
# citron's dead domain now resolves to an unrelated host that fails
# TLS: for a forge the profile declares gone, any refusal agrees.
if stated_gone: if stated_gone:
# The profile says the forge is gone and the forge agrees. That is # The profile says the forge is gone and the forge agrees. That is
# a recorded fact, not an open problem: the refs describe the last # a recorded fact, not an open problem: the refs describe the last
+9
View File
@@ -1840,6 +1840,15 @@ class TestDeclaredDeadUpstream(TestBuildReport):
self.assertIn("withdrawn, HTTP 451", report.skipped) self.assertIn("withdrawn, HTTP 451", report.skipped)
self.assertEqual(report.needs_review(), 0) self.assertEqual(report.needs_review(), 0)
def test_any_refusal_of_a_declared_dead_forge_agrees(self):
# citron's taken domain now resolves and fails TLS.
def tls(*a, **k):
raise profile_sync.upstream.UpstreamError("TLSV1_UNRECOGNIZED_NAME")
profile_sync.upstream.resolve_head = tls
report = build_report("test", self._profile_with("domain taken"), self.dir)
self.assertIn("declared", report.skipped)
def test_a_declaration_the_forge_contradicts_is_reported(self): def test_a_declaration_the_forge_contradicts_is_reported(self):
"""The forge answered: the declaration has outlived its truth.""" """The forge answered: the declaration has outlived its truth."""
self.files[("pinsha", "a.c")] = ["hit"] self.files[("pinsha", "a.c")] = ["hit"]