From b4420e54b7d402c63117f56917406d5e7fcbcff7 Mon Sep 17 00:00:00 2001 From: devops Date: Sun, 25 Oct 2026 18:34:09 +0000 Subject: [PATCH] fix(release): admit exact reviewed publisher SEO repair paths --- scripts/production-release.py | 7 ++++++- scripts/test_production_release.py | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/scripts/production-release.py b/scripts/production-release.py index fdb4e27a..bafe2553 100644 --- a/scripts/production-release.py +++ b/scripts/production-release.py @@ -41,7 +41,12 @@ ALLOWED = {'nginx.conf', 'Dockerfile', 'backend/Dockerfile', '.dockerignore', 'frontend/application/components/BlogPostClient.tsx', 'frontend/application/components/__tests__/BlogPostClient.test.tsx', 'frontend/application/lib/extractFaqs.ts', - 'frontend/application/lib/extractFaqs.test.ts'} + 'frontend/application/lib/extractFaqs.test.ts', + # Exact authorized publisher technical SEO repair; no frontend wildcard. + 'frontend/application/app/blog/[slug]/page.tsx', + 'frontend/application/app/blog/[slug]/publisher-seo.test.tsx', + 'frontend/application/lib/blogAuthor.ts', + 'frontend/application/lib/blogAuthor.test.ts'} def validate_receipt(r, sha, baseline, paths): if not (r.get('accepted') is True and r.get('scope') == 'reliability-only' diff --git a/scripts/test_production_release.py b/scripts/test_production_release.py index 4cbf7f60..1975ee7d 100644 --- a/scripts/test_production_release.py +++ b/scripts/test_production_release.py @@ -64,6 +64,21 @@ class ProductionGuards(unittest.TestCase): with self.assertRaises(ValueError): m.validate_receipt(r, 'a'*40, 'b'*40, [path]) + def test_exact_publisher_seo_repair_paths_allowed_only(self): + paths = ['frontend/application/app/blog/[slug]/page.tsx', + 'frontend/application/app/blog/[slug]/publisher-seo.test.tsx', + 'frontend/application/lib/blogAuthor.ts', + 'frontend/application/lib/blogAuthor.test.ts'] + r = self.receipt(); r['paths'] = paths + m.validate_receipt(r, 'a'*40, 'b'*40, paths) + for path in ['frontend/application/app/blog/[slug]/other.tsx', + 'frontend/application/lib/other.ts', + 'frontend/application/app/blog/page.tsx']: + r['paths'] = [path] + with self.assertRaises(ValueError): + m.validate_receipt(r, 'a'*40, 'b'*40, [path]) + self.assertFalse(any('*' in path for path in m.ALLOWED)) + def test_independent_typed_catalog_acceptance_required(self): r = self.receipt() r.pop('typed_catalog_acceptance', None)