From 7765dad743db89c24b57c4cb754d0c71054b5fa3 Mon Sep 17 00:00:00 2001 From: Andrew Musselman Date: Tue, 30 Jun 2026 19:03:15 +0000 Subject: [PATCH 1/3] Add Downloads pass/fail column to site-scan overview The crawler already collects a 'downloads' map for each site, but it was never surfaced in the all-projects/all-podlings overview table. Add a 'Downloads' column that flags whether any download links were found: sites with none are marked red (SITE_FAIL) like other failing checks, and sites with downloads are marked green (SITE_PASS) with the discovered URLs available in a hover tooltip. The column uses the same sort_order values as the existing check columns so it sorts pass/fail alongside them. This is display-only; no changes to the crawler or SiteStandards. --- lib/whimsy/sitewebsite.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/whimsy/sitewebsite.rb b/lib/whimsy/sitewebsite.rb index 4f6a318417..0e4439f631 100644 --- a/lib/whimsy/sitewebsite.rb +++ b/lib/whimsy/sitewebsite.rb @@ -189,6 +189,10 @@ def display_overview(sites, analysis, checks, tlp = true) end end end + # 'downloads' is collected by the crawler rather than via the + # standard checks. We only care whether any were found, so it is + # treated as a pass/fail column (no downloads -> flagged red). + _th! 'Downloads', data_sort: 'string' end end sort_order = { @@ -206,6 +210,17 @@ def display_overview(sites, analysis, checks, tlp = true) cls = SiteStandards.label(analysis, links, c, n) _td '', class: cls, data_sort_value: sort_order[cls] end + downloads = links['downloads'] || {} + if downloads.empty? + # No downloads discovered: flag red like other failing cells + cls = SiteStandards::SITE_FAIL + _td '', class: cls, data_sort_value: sort_order[cls] + else + cls = SiteStandards::SITE_PASS + # Expose the discovered download URLs in a hover tooltip + _td '', class: cls, data_sort_value: sort_order[cls], + title: downloads.keys.join("\n") + end end end end From 9625819d4505c46d82e7bef114c3c5555f108d2e Mon Sep 17 00:00:00 2001 From: Andrew Musselman Date: Thu, 2 Jul 2026 04:24:46 +0000 Subject: [PATCH 2/3] Treat projects not expected to release as warn, not fail Reviewers noted that some projects legitimately have no downloads: non-PMC committees (Brand Management, Data Privacy, Diversity, etc.) and a few full PMCs (Attic, ComDev, Gump, Whimsy). Add a third state to the Downloads column so an empty downloads list is only flagged red (SITE_FAIL) when the project is expected to publish releases. Otherwise it is shown amber (SITE_WARN) with a 'Not expected to publish downloads' tooltip. Non-PMC committees are detected via the 'nonpmc' flag already recorded by site-scan.rb; the handful of non-releasing PMCs are listed in a NO_RELEASES constant, since committee_info has no 'makes releases' field to derive this from. --- lib/whimsy/sitewebsite.rb | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/lib/whimsy/sitewebsite.rb b/lib/whimsy/sitewebsite.rb index 0e4439f631..9a6a7cf808 100644 --- a/lib/whimsy/sitewebsite.rb +++ b/lib/whimsy/sitewebsite.rb @@ -4,6 +4,14 @@ require 'wunderbar/bootstrap' require_relative '../whimsy/asf/themes' +# Full PMCs that intentionally don't publish releases, so an empty downloads +# list is expected rather than a failure. Non-PMC committees (Brand +# Management, Data Privacy, Diversity, etc.) are detected automatically via +# the 'nonpmc' flag recorded by site-scan.rb. This small list is needed +# because "makes releases" is not a field in committee_info; revisit if that +# data becomes available. +NO_RELEASES = %w(attic comdev gump whimsy).freeze + # Display data for a single project's checks # @param project id of project # @param links site data for that specific project @@ -211,15 +219,23 @@ def display_overview(sites, analysis, checks, tlp = true) _td '', class: cls, data_sort_value: sort_order[cls] end downloads = links['downloads'] || {} - if downloads.empty? - # No downloads discovered: flag red like other failing cells - cls = SiteStandards::SITE_FAIL - _td '', class: cls, data_sort_value: sort_order[cls] - else + # A project is expected to publish downloads unless it is a + # non-PMC committee or one of the few PMCs that don't release. + expected = !links['nonpmc'] && !NO_RELEASES.include?(n.downcase) + if !downloads.empty? cls = SiteStandards::SITE_PASS # Expose the discovered download URLs in a hover tooltip _td '', class: cls, data_sort_value: sort_order[cls], title: downloads.keys.join("\n") + elsif expected + # Expected downloads but none found: flag red like other fails + cls = SiteStandards::SITE_FAIL + _td '', class: cls, data_sort_value: sort_order[cls] + else + # Not expected to publish downloads: warn (amber), not a failure + cls = SiteStandards::SITE_WARN + _td '', class: cls, data_sort_value: sort_order[cls], + title: 'Not expected to publish downloads' end end end From f07c5381d35375e123ce602107afea667b0d3e3e Mon Sep 17 00:00:00 2001 From: Andrew Musselman Date: Thu, 2 Jul 2026 04:47:24 +0000 Subject: [PATCH 3/3] Document not-expected-downloads case in the amber data key Rather than a per-cell tooltip (which isn't used elsewhere on the overview and isn't discoverable on an all-empty grid), extend the existing amber (SITE_WARN) data key above the table to also cover projects that aren't expected to publish downloads. Drop the tooltip from the amber Downloads branch accordingly. --- lib/whimsy/sitestandards.rb | 2 +- lib/whimsy/sitewebsite.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/whimsy/sitestandards.rb b/lib/whimsy/sitestandards.rb index dcd833197f..59b4e81357 100644 --- a/lib/whimsy/sitestandards.rb +++ b/lib/whimsy/sitestandards.rb @@ -322,7 +322,7 @@ def analyze(sites, checks) return [ counts, { SITE_PASS => '# Sites with links to primary ASF page', - SITE_WARN => '# Sites with link, but not an expected ASF one', + SITE_WARN => '# Sites with link, but not an expected ASF one, or not expected to publish downloads', SITE_FAIL => '# Sites with no link for this topic' }, success ] diff --git a/lib/whimsy/sitewebsite.rb b/lib/whimsy/sitewebsite.rb index 9a6a7cf808..ecce102f41 100644 --- a/lib/whimsy/sitewebsite.rb +++ b/lib/whimsy/sitewebsite.rb @@ -232,10 +232,10 @@ def display_overview(sites, analysis, checks, tlp = true) cls = SiteStandards::SITE_FAIL _td '', class: cls, data_sort_value: sort_order[cls] else - # Not expected to publish downloads: warn (amber), not a failure + # Not expected to publish downloads: warn (amber), not a + # failure. See the amber data key above the table. cls = SiteStandards::SITE_WARN - _td '', class: cls, data_sort_value: sort_order[cls], - title: 'Not expected to publish downloads' + _td '', class: cls, data_sort_value: sort_order[cls] end end end