From 32633c4e5cd969efb40d295d0cbadbcdfff3f73c Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Mon, 26 Oct 2026 21:53:47 +0100 Subject: [PATCH] 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. --- scripts/profile_sync.py | 6 +++++- tests/test_profile_sync.py | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/profile_sync.py b/scripts/profile_sync.py index 405228d35..4a4bcf376 100644 --- a/scripts/profile_sync.py +++ b/scripts/profile_sync.py @@ -1591,7 +1591,11 @@ def build_report( try: 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: # 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 diff --git a/tests/test_profile_sync.py b/tests/test_profile_sync.py index 61f51538b..00ddc8c05 100644 --- a/tests/test_profile_sync.py +++ b/tests/test_profile_sync.py @@ -1840,6 +1840,15 @@ class TestDeclaredDeadUpstream(TestBuildReport): self.assertIn("withdrawn, HTTP 451", report.skipped) 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): """The forge answered: the declaration has outlived its truth.""" self.files[("pinsha", "a.c")] = ["hit"]