From cf4dd6119a7ea5a55ca342d59ef34f5976bd5466 Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Mon, 19 Oct 2026 12:22:54 +0200 Subject: [PATCH 1/2] fix(ci): read run jobs 50 at a time so the queue evidence read succeeds Pages of 100 jobs on the full catalogue run fail with HTTP 502 on every attempt, which turns a fully green run red at the summary step. Co-Authored-By: Claude Opus 5.5 --- .github/scripts/observe-go-cache.sh | 2 +- .github/tests/test-ci-selection.sh | 2 +- .github/tests/test-go-cache-native-observer.sh | 2 +- .github/tests/test-native-queue-gate.sh | 2 +- .github/tests/test-queue-observer.sh | 2 +- .github/workflows/ci.yaml | 4 +++- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/scripts/observe-go-cache.sh b/.github/scripts/observe-go-cache.sh index 4b70b6ae..ce3a5005 100644 --- a/.github/scripts/observe-go-cache.sh +++ b/.github/scripts/observe-go-cache.sh @@ -145,7 +145,7 @@ observe() { trap 'rm -rf "$scratch"' EXIT mkdir "$scratch/logs" gh api "repos/devantler-tech/.github/actions/runs/$run/attempts/$attempt" >"$scratch/run.json" || fail 'run metadata read failed' - gh api --paginate --slurp "repos/devantler-tech/.github/actions/runs/$run/attempts/$attempt/jobs?per_page=100" >"$scratch/jobs.json" || fail 'complete current-attempt job read failed' + gh api --paginate --slurp "repos/devantler-tech/.github/actions/runs/$run/attempts/$attempt/jobs?per_page=50" >"$scratch/jobs.json" || fail 'complete current-attempt job read failed' jobs="$scratch/jobs.json" validate_jobs # Older gh versions print log bytes directly and do not accept this option. diff --git a/.github/tests/test-ci-selection.sh b/.github/tests/test-ci-selection.sh index f9dc1f9b..b7d23f5b 100644 --- a/.github/tests/test-ci-selection.sh +++ b/.github/tests/test-ci-selection.sh @@ -12,7 +12,7 @@ mkdir "$work/bin" cat > "$work/bin/gh" <<'SH' #!/usr/bin/env bash set -euo pipefail -[[ "$*" == 'api repos/devantler-tech/fixture/actions/runs/123/attempts/2/jobs?per_page=100 --paginate --slurp' ]] || exit 99 +[[ "$*" == 'api repos/devantler-tech/fixture/actions/runs/123/attempts/2/jobs?per_page=50 --paginate --slurp' ]] || exit 99 cat "$QUEUE_FIXTURE" SH chmod +x "$work/bin/gh" diff --git a/.github/tests/test-go-cache-native-observer.sh b/.github/tests/test-go-cache-native-observer.sh index bbc9a345..f2fc5233 100644 --- a/.github/tests/test-go-cache-native-observer.sh +++ b/.github/tests/test-go-cache-native-observer.sh @@ -102,7 +102,7 @@ case "$*" in [[ "${FAIL_HELP_READ:-false}" != true ]] || exit 1 if [[ "${MODERN_CLI:-false}" == true ]]; then printf ' --allow-escape-sequences Allow printing terminal escape sequences\n'; else printf ' --include Include HTTP response status line\n'; fi ;; 'api repos/devantler-tech/.github/actions/runs/23/attempts/2') cat "$OBSERVER_FIXTURE/run.json" ;; - 'api --paginate --slurp repos/devantler-tech/.github/actions/runs/23/attempts/2/jobs?per_page=100') + 'api --paginate --slurp repos/devantler-tech/.github/actions/runs/23/attempts/2/jobs?per_page=50') [[ "${FAIL_JOB_READ:-false}" != true ]] || exit 1 cat "$OBSERVER_FIXTURE/jobs.json" ;; 'api repos/devantler-tech/.github/actions/jobs/'*'/logs') diff --git a/.github/tests/test-native-queue-gate.sh b/.github/tests/test-native-queue-gate.sh index 6346fa55..465446e3 100755 --- a/.github/tests/test-native-queue-gate.sh +++ b/.github/tests/test-native-queue-gate.sh @@ -10,7 +10,7 @@ mkdir "$work/bin" cat > "$work/bin/gh" <<'SH' #!/usr/bin/env bash set -euo pipefail -[[ "$*" == 'api repos/devantler-tech/fixture/actions/runs/123/attempts/2/jobs?per_page=100 --paginate --slurp' ]] || exit 99 +[[ "$*" == 'api repos/devantler-tech/fixture/actions/runs/123/attempts/2/jobs?per_page=50 --paginate --slurp' ]] || exit 99 printf 'read\n' >> "$FIXTURE/reads" cat "$FIXTURE/response.json" SH diff --git a/.github/tests/test-queue-observer.sh b/.github/tests/test-queue-observer.sh index 86bb7641..379da3f5 100644 --- a/.github/tests/test-queue-observer.sh +++ b/.github/tests/test-queue-observer.sh @@ -11,7 +11,7 @@ mkdir "$work/bin" cat >"$work/bin/gh" <<'SH' #!/usr/bin/env bash set -euo pipefail -[[ "$*" == 'api repos/devantler-tech/fixture/actions/runs/123/attempts/2/jobs?per_page=100 --paginate --slurp' ]] || exit 99 +[[ "$*" == 'api repos/devantler-tech/fixture/actions/runs/123/attempts/2/jobs?per_page=50 --paginate --slurp' ]] || exit 99 count=0 [[ ! -f "$FIXTURE/count" ]] || read -r count <"$FIXTURE/count" count=$((count + 1)) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 762b2bbe..39b6ce6f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6642,8 +6642,10 @@ jobs: fi # Retry only server failures, restarting the entire paginated read. # A failed later page can already have emitted convincing partial data. + # Pages of 100 jobs on the full catalogue run fail with HTTP 502 every + # time, while pages of 50 succeed, so the page size stays at 50. for attempt in 1 2 3; do - if gh api "repos/$REPOSITORY/actions/runs/$RUN_ID/attempts/$RUN_ATTEMPT/jobs?per_page=100" \ + if gh api "repos/$REPOSITORY/actions/runs/$RUN_ID/attempts/$RUN_ATTEMPT/jobs?per_page=50" \ --paginate --slurp > jobs.json 2> jobs.error; then break fi From 1f58146eadc24116ccc2d74cbf009a9f296a0171 Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Mon, 19 Oct 2026 12:30:34 +0200 Subject: [PATCH 2/2] test(ci): pin the reviewed reducer after the job page size change Co-Authored-By: Claude Opus 5.5 --- .github/tests/catalogue-credentials/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/tests/catalogue-credentials/main.go b/.github/tests/catalogue-credentials/main.go index 2e16004c..72e36ca7 100644 --- a/.github/tests/catalogue-credentials/main.go +++ b/.github/tests/catalogue-credentials/main.go @@ -1180,7 +1180,7 @@ func checkWiring(w object) error { } // Pin the complete reviewed reducer, including native queue proof; arbitrary // Bash mentions are not result admission and must not bypass either check. - if fmt.Sprintf("%x", sha256.Sum256([]byte(text(s["run"])))) != "62c7d254f2998fe3861ede8fc5c356eb38defe8e8c9be211f23af062d12ac277" { + if fmt.Sprintf("%x", sha256.Sum256([]byte(text(s["run"])))) != "87e47c8778ac03a6bddf68125ce26b580aa75ed40aba2a276f4310dbf8e5c438" { return fail() } results = true