From 660d84502a748813f1e495135910112fe7c64293 Mon Sep 17 00:00:00 2001 From: Tudor Date: Sun, 5 Jul 2026 15:24:03 +0100 Subject: [PATCH 1/3] chore(ci): temporary staging rankings year diagnostic (do not merge) Co-Authored-By: Claude Fable 5 --- .gitea/workflows/pr-checks.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/pr-checks.yml b/.gitea/workflows/pr-checks.yml index be8783a..ccc3953 100644 --- a/.gitea/workflows/pr-checks.yml +++ b/.gitea/workflows/pr-checks.yml @@ -12,7 +12,25 @@ env: PIPELINE_IMAGE_NAME: ${{ gitea.repository }}-pipeline jobs: - frontend-checks: + # TEMPORARY: evidence gathering for the rankings year= empty-list bug on + # staging. Remove before merging. Prints status codes and row counts only. + staging-api-diagnostic: + name: Staging rankings year diagnostic + runs-on: ubuntu-latest + steps: + - name: Probe staging rankings year handling + env: + BASE: ${{ secrets.STAGING_BASE_URL }} + run: | + echo "== /api/filters years ==" + curl -s --max-time 15 "$BASE/api/filters" -o /tmp/f.json -w "status %{http_code}\n" + python3 -c "import json; print(json.load(open('/tmp/f.json')).get('years'))" || head -c 300 /tmp/f.json + echo "== /api/rankings probes (metric=rwm_expected_pct, limit=3) ==" + for Q in "" "&year=202425" "&year=201819" "&year=2024"; do + CODE=$(curl -s --max-time 15 -o /tmp/r.json -w "%{http_code}" "$BASE/api/rankings?metric=rwm_expected_pct&limit=3$Q") + echo "query [$Q] -> status $CODE" + python3 -c "import json; d=json.load(open('/tmp/r.json')); print(' year:', d.get('year'), 'total:', d.get('total'), 'rows:', len(d.get('rankings', [])))" || head -c 300 /tmp/r.json + done name: Frontend Typecheck + Tests runs-on: ubuntu-latest steps: -- 2.54.0 From e48469b0582023b0058b9b69c1ccb6777b3354f7 Mon Sep 17 00:00:00 2001 From: Tudor Date: Sun, 5 Jul 2026 15:47:00 +0100 Subject: [PATCH 2/3] chore(ci): push-triggered staging diagnostic workflow (temporary) Co-Authored-By: Claude Fable 5 --- .gitea/workflows/diag-staging.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/diag-staging.yml diff --git a/.gitea/workflows/diag-staging.yml b/.gitea/workflows/diag-staging.yml new file mode 100644 index 0000000..bb8bd18 --- /dev/null +++ b/.gitea/workflows/diag-staging.yml @@ -0,0 +1,26 @@ +# TEMPORARY diagnostic workflow — delete after the rankings year= bug is closed. +name: Staging Rankings Diagnostic + +on: + push: + branches: + - diag/staging-rankings-year + +jobs: + staging-api-diagnostic: + name: Staging rankings year diagnostic + runs-on: ubuntu-latest + steps: + - name: Probe staging rankings year handling + env: + BASE: ${{ secrets.STAGING_BASE_URL }} + run: | + echo "== /api/filters years ==" + curl -s --max-time 15 "$BASE/api/filters" -o /tmp/f.json -w "status %{http_code}\n" + python3 -c "import json; print(json.load(open('/tmp/f.json')).get('years'))" || head -c 300 /tmp/f.json + echo "== /api/rankings probes (metric=rwm_expected_pct, limit=3) ==" + for Q in "" "&year=202425" "&year=201819" "&year=2024"; do + CODE=$(curl -s --max-time 15 -o /tmp/r.json -w "%{http_code}" "$BASE/api/rankings?metric=rwm_expected_pct&limit=3$Q") + echo "query [$Q] -> status $CODE" + python3 -c "import json; d=json.load(open('/tmp/r.json')); print(' year:', d.get('year'), 'total:', d.get('total'), 'rows:', len(d.get('rankings', [])))" || head -c 300 /tmp/r.json + done -- 2.54.0 From 35752a7d53e50c0937b2f73eec1c3772ee29f691 Mon Sep 17 00:00:00 2001 From: Tudor Date: Sun, 5 Jul 2026 15:49:15 +0100 Subject: [PATCH 3/3] =?UTF-8?q?chore(ci):=20diagnostic=20v2=20=E2=80=94=20?= =?UTF-8?q?capture=20headers=20to=20attribute=20the=20500s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .gitea/workflows/diag-staging.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/diag-staging.yml b/.gitea/workflows/diag-staging.yml index bb8bd18..8cd4c93 100644 --- a/.gitea/workflows/diag-staging.yml +++ b/.gitea/workflows/diag-staging.yml @@ -15,12 +15,14 @@ jobs: env: BASE: ${{ secrets.STAGING_BASE_URL }} run: | - echo "== /api/filters years ==" - curl -s --max-time 15 "$BASE/api/filters" -o /tmp/f.json -w "status %{http_code}\n" - python3 -c "import json; print(json.load(open('/tmp/f.json')).get('years'))" || head -c 300 /tmp/f.json - echo "== /api/rankings probes (metric=rwm_expected_pct, limit=3) ==" - for Q in "" "&year=202425" "&year=201819" "&year=2024"; do - CODE=$(curl -s --max-time 15 -o /tmp/r.json -w "%{http_code}" "$BASE/api/rankings?metric=rwm_expected_pct&limit=3$Q") - echo "query [$Q] -> status $CODE" - python3 -c "import json; d=json.load(open('/tmp/r.json')); print(' year:', d.get('year'), 'total:', d.get('total'), 'rows:', len(d.get('rankings', [])))" || head -c 300 /tmp/r.json - done + probe() { + echo "== $1 ==" + curl -s --max-time 15 -D /tmp/h.txt -o /tmp/b.txt "$BASE$1" + echo "--- headers:"; cat /tmp/h.txt + echo "--- body (first 400 bytes):"; head -c 400 /tmp/b.txt; echo + } + probe "/api/data-info" + probe "/api/filters" + probe "/api/rankings?metric=rwm_expected_pct&limit=3" + probe "/api/rankings?metric=rwm_expected_pct&limit=3&year=202425" + probe "/" -- 2.54.0