Skip to content

fix(ci): retry FRV job listings with smaller pages after GitHub 5xx - #171952

Merged
RomneyDa merged 3 commits into
mainfrom
fix/frv-job-listing-5xx
Oct 14, 2026
Merged

RomneyDa merged 3 commits into
mainfrom
fix/frv-job-listing-5xx

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Problem

GitHub persistently returns HTTP 502 for GET repos/openclaw/openclaw/actions/runs/38517205342/attempts/2/jobs?per_page=100 (a rerun attempt carrying forward ~239 jobs, parent FRV run 38516597880). The same URL succeeds with per_page=50 and per_page=30, and attempt 1 succeeds with per_page=100 (probed 2026-10-14).

Full Release Validation lists attempt jobs with a hard-coded per_page=100 + --paginate, so:

  • the local controller (node scripts/frv.mjs continue --failed --run <parent> / rerun) fails with gh: Server Error (HTTP 502);
  • the in-workflow Release Decision and Diagnostic Drain collectors (full-release-validation-state.mjs, FULL_RELEASE_STATE_MODE decision/drain) end in state=orchestration_error, so a parent cannot be resealed after a child rerun.

Fix

  • One shared owner in scripts/full-release-validation-policy.mjs: readReleaseJobListing(readListing) reads the complete paginated listing at per_page=100, then 50, then 30, moving to the next size only on a GitHub 5xx (isReleaseGhServerError). Each size re-reads the whole listing, so pages of different sizes are never mixed and ordering/duplicate detection is unchanged.
  • Non-final sizes stop their transient-retry loop on a 5xx (fall through to the smaller page immediately); other transient errors keep the existing retries. The final size keeps the full existing bounded retry and fails closed with the original error; non-5xx errors (404, rate limits, etc.) propagate unchanged.
  • Callers: scripts/frv.mjs createClient (getAttemptJobs, getParentJobs), scripts/full-release-validation-state.mjs githubAttemptJobs (decision/drain collectors), and the strict verifier scripts/release-ci-summary.mjs findRunJobsAll (getRunAttemptJobs/getParentJobs, launched by frv continue via client.verify). findRunJobsAll keeps its requireComplete total/duplicate checks per page size and enforces the same 1,000-job inventory ceiling independent of page size (stops once 1,000 jobs are held and truncates to 1,000, so 1,000 accepts and 1,001 rejects under requireComplete exactly as the ten 100-job pages did).

Impact

Release tooling only (FRV controller and FRV state collectors). Healthy listings make the same single per_page=100 request as before.

Evidence

  • Live probe above: run 38517205342 attempt 2 per_page=100 -> 502; per_page=50 / per_page=30 -> 200; attempt 1 per_page=100 -> 200.
  • New tests in test/scripts/frv.release.test.ts:
    • protected gh fixture returns Server Error (HTTP 502) for jobs?per_page=100; getAttemptJobs succeeds with exactly two calls (per_page=100, then per_page=50);
    • readReleaseJobListing fails closed with the original error after 100/50/30 all 5xx, and does not fall back on a 404.
  • New test in test/scripts/release-evidence-retry.test.ts: strict validateReleaseRunEvidence over the stable npm fixture, with the real createReleaseEvidenceClient().getRunAttemptJobs transport returning Server Error (HTTP 502) at per_page=100; verification passes for all 6 children with one 100 + one 50 read each and no retry sleeps.
  • New boundary tests in test/scripts/release-evidence-retry.test.ts: after falling back to 30-job pages, 1,000 jobs pass requireComplete, 1,001 jobs reject it, and a non-strict 1,001-job listing returns 1,000 (the 1,001 cases fail on the previous head 5c91f00).
  • Live read-only proof against the failing attempt (run 38517205342 attempt 2, 2026-10-14):
    $ gh api -i "repos/openclaw/openclaw/actions/runs/38517205342/attempts/2/jobs?per_page=100" | head -1
    HTTP/2.0 502 Bad Gateway
    $ node live-proof.mjs <worktree>   # calls the patched readers directly
    {"label":"frv.mjs createClient().getAttemptJobs","jobs":239,"uniqueIds":239,"ms":43334}
    {"label":"release-ci-summary getRunAttemptJobs(requireComplete)","jobs":239,"uniqueIds":239,"ms":41901}
    
    Both patched readers return the complete 239-job listing (matches total_count 239 at per_page=50) via the 50-job fallback. Most of the ~42s is GitHub taking ~40s to return the 502 at per_page=100. I did not run frv status --run 38516597880 to keep API use low.
  • All three new behavior tests fail on base (fix reverted locally: 502 exhausts retries / helper missing) and pass with the fix.

Local checks:

  • pnpm test test/scripts/frv.release.test.ts --maxWorkers=1: 109 passed, 81.2s wall (new tests: 254ms and 1ms)
  • pnpm test test/scripts/frv.test.ts test/scripts/frv-cancellation.test.ts test/scripts/full-release-validation-state.test.ts test/scripts/full-release-validation-state.qualification.test.ts --maxWorkers=1: 225 passed, 8.6s wall
  • pnpm test test/scripts/release-evidence-retry.test.ts test/scripts/release-ci-summary.test.ts test/scripts/frv.test.ts test/scripts/frv-cancellation.test.ts test/scripts/full-release-validation-state.test.ts test/scripts/full-release-validation-state.qualification.test.ts test/scripts/openclaw-npm-publication-authority.test.ts --maxWorkers=1: 389 passed, 33.3s wall; release-evidence-retry.test.ts alone ~4s
  • npx oxfmt --check and node scripts/run-oxlint.mjs on touched files: clean
  • pnpm tsgo:scripts, pnpm tsgo:test:root: pass

@RomneyDa RomneyDa added the release-fast-lane Release tooling PR: narrow ci-gate, ClawSweeper advisory (RELEASING.md) label Oct 14, 2026
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment @clawsweeper review. Please avoid repeated requests while a review is queued or running; agents should not request reviews automatically.

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Oct 14, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 14, 2026
@clawsweeper

clawsweeper Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR retries complete FRV job listings with smaller pages after GitHub HTTP 5xx responses.

Example: GitHub run 38517205342, attempt 2, contains 239 jobs.

  • Before: Persistent HTTP 502 responses for 100-job pages stop FRV recovery and evidence collection.
  • After: The patched controller and strict verifier return all 239 unique jobs using the 50-job fallback.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused repair with live production-client recovery evidence, meaningful regression coverage, and both previous findings resolved; proof does not run the full shipped FRV command.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Supplied live output exercises createClient().getAttemptJobs and the strict evidence client's getRunAttemptJobs against the actual failing GitHub attempt: both return all 239 unique jobs after the 100-job request fails; supporting regressions cover verifier integration and the corrected inventory boundary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release operators cannot continue or reseal validation when GitHub persistently rejects a large attempt-job page.
Reason: The maintainer-authored direction addresses a concrete incident with a bounded shared repair and no new configuration or release policy.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a demonstrated FRV failure still present on main, resolves both prior findings, and has no remaining actionable defect identified.

Priority: P2
Reviewed head: e1d62ac7313292ee48aecc8370d48e5e0f583268

Before merge

None.

Findings

None.

Agent review details

How this fits together

FRV controllers, state collectors, and release verification consume GitHub Actions job inventories to assess exact workflow attempts and compose release evidence.

flowchart TD
  A[FRV controller] --> D[Shared listing fallback]
  B[Decision and Drain collectors] --> D
  C[Strict release verifier] --> D
  D --> E[GitHub Actions job API]
  E --> F[Complete job inventory]
  F --> G[Existing evidence validation]
Loading

Technical review

Best possible solution:

Land the shared fallback through the normal merge gates while coordinating the overlapping pagination work.

Do we have a high-confidence way to reproduce the issue?

Current main repeatedly requests the failing 100-job listing; the supplied live API evidence identifies the affected attempt and confirms smaller pages succeed, although this review ran no reproduction.

Is this the best way to solve the issue?

The shared fallback addresses the observed transport failure across controller, collectors, and verifier while retaining existing evidence checks and healthy-path requests.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b12bdb3d21f2.

Provenance checked

  • Controller and collector job enumeration keeps the original intent (c28cb02: Same-parent continuation preserves immutable execution plans and exact child evidence instead of repeating successful workloads; collector ownership also traces through a2f0b84.)
  • Strict verifier completeness and inventory bound keeps the original intent (6670690: Publication admission requires authenticated, complete original job inventories; the earlier continuation implementation bounded enumeration at ten 100-job pages.)
  • Shared asynchronous verifier reader keeps the original intent (9ef5fdf: Consolidate repeated validation mechanics while preserving CLI, output, persisted shapes, and validation contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit c28cb02 adds scripts/frv.mjs:395 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c28cb0238475; files: scripts/frv.mjs)
  • Peter Steinberger: Raw commit 53ccbd1 adds scripts/frv.mjs:848 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 53ccbd1b7b1f; files: scripts/frv.mjs)
  • Dallin Romney: Raw commit cdb57ac adds scripts/frv.mjs:1076 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cdb57ac7acdc; files: scripts/frv.mjs)

PR surface

Tests +122, Other +61. Total +183 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 125 3 +122
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 5 112 51 +61
Total 7 237 54 +183

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: A demonstrated GitHub pagination failure blocks release-validation recovery, with impact limited to release tooling.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-14T08:12:59.386Z sha ca208f5 :: needs changes before merge. :: [P2] Apply the fallback to the strict verifier's job reader
  • reviewed 2026-10-14T08:25:46.518Z sha 5c91f00 :: needs changes before merge. :: [P3] Enforce the inventory ceiling after selecting 30-job pages

Reviewed October 14, 2026, 4:36 AM ET / 08:36 UTC (Revision 3).

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 14, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 14, 2026
@RomneyDa
RomneyDa merged commit 5584b16 into main Oct 14, 2026
109 of 110 checks passed
@RomneyDa
RomneyDa deleted the fix/frv-job-listing-5xx branch October 14, 2026 08:45
RomneyDa added a commit that referenced this pull request Oct 14, 2026
…171952)

* fix(ci): retry FRV job listings with smaller pages after GitHub 5xx

* fix(ci): apply job listing page fallback to the strict FRV verifier

* fix(ci): keep the strict verifier job ceiling at 1,000 after page fallback

(cherry picked from commit 5584b16)

Backport note: release/2026.10.5 keeps separate findParentJobsAll and
findRunAttemptJobsAll readers in scripts/release-ci-summary.mjs instead of
main's unified findRunJobsAll. Both now route through one local
readRunJobPages helper that uses readReleaseJobListing (100/50/30 page-size
fallback on GitHub 5xx) and the page-size-independent 1,000-job ceiling;
parent jobs keep filter=all without completeness checks, attempt jobs keep
requireComplete. The main-only getRef cached-reads test was dropped from
frv.release.test.ts, and release-evidence-retry.test.ts gains the
node:fs import the release line lacks.
vincentkoc added a commit that referenced this pull request Oct 14, 2026
…/plugin-memory-addon-presentation-20261014

* commit 'a8da8c92e3dbb21dd1441a30eb842fcd942e82b6': (52 commits)
  test(ui): await terminal reconnect fixture readiness (#171945)
  perf(gateway): retain only the requested ordered session page (#171968)
  test(gateway): cover automation run-alias placement lifecycle (#139313)
  fix(ci): retry FRV job listings with smaller pages after GitHub 5xx (#171952)
  fix(process): prevent false cleanup failures after CLI stdin closes (#171969)
  test(doctor): cover released updater advisory warnings (#157086)
  fix(ci): skip Testbox builds for known prose files (#171946)
  perf(sessions): remove redundant snapshot walks (#171964)
  fix(ci): skip plugin scaffold build for SDK instructions (#171944)
  fix(infra): preserve scheduler scope abort state after retirement
  fix: setup diagnostics can repair state without approval (#171960)
  perf(usage): avoid per-session admission churn during inventory (#171868)
  fix(ci): exclude documentation from extension lint scope (#171909)
  test(gateway): keep runtime-only compat flags out of live gateway config (#171953)
  docs: document ClawHub install telemetry opt-out (#114376)
  fix: recover completed chat replies after missed publication (#171766)
  refactor(ui): decouple session controller types from Lit (#171559)
  fix(gateway): settle worker reconciliation during busy shutdowns (#171843)
  fix(ci): ignore protocol prose in bundled check selection (#171908)
  fix(ui): align replacement lines and highlight inline diff edits (#171935)
  ...
RomneyDa added a commit that referenced this pull request Oct 14, 2026
…ller pages after GitHub 5xx

Backport of #172321 (main commit 8b84076; add the cherry-pick -x line
once the main merge SHA exists).

Backport note: release/2026.10.5's scripts/full-release-child-evidence.mjs
still reads attempt jobs itself via `gh api --paginate --slurp ...?per_page=100`
(main reads through createReleaseEvidenceClient, already fixed by #171952).
That reader now uses readReleaseJobListing (100/50/30 on GitHub 5xx), keeps
its page-shape, total_count, and attempt-ownership checks, and keeps the
2,000-job attempt ceiling (formerly 20 x 100 pages) independent of page size.
seal() becomes async for the shared async helper. The
full-release-candidate-reuse.mjs change applies unchanged from main.
This fixes job 115959523942 (run 38578984406 attempt 3).
(cherry picked from commit 70ca91f)
RomneyDa added a commit that referenced this pull request Oct 14, 2026
Port of the release-ci-summary part of #171952 onto the 2026.9.33 verifier.
RomneyDa added a commit that referenced this pull request Oct 15, 2026
…172641)

* fix(ci): retry FRV job listings with smaller pages after GitHub 5xx (#171952)

* fix(ci): retry FRV job listings with smaller pages after GitHub 5xx

* fix(ci): apply job listing page fallback to the strict FRV verifier

* fix(ci): keep the strict verifier job ceiling at 1,000 after page fallback

(cherry picked from commit 5584b16)

* test(qa-lab): clarify node_exec live arguments and report cases that never start

(cherry picked from commit 142bd64)
(cherry picked from commit 069109d85e71c52eecbb4b4348c65a30a437db76)

* fix(ci): apply the job listing page fallback to the strict FRV verifier

Port of the release-ci-summary part of #171952 onto the 2026.9.33 verifier.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
…penclaw#171952)

* fix(ci): retry FRV job listings with smaller pages after GitHub 5xx

* fix(ci): apply job listing page fallback to the strict FRV verifier

* fix(ci): keep the strict verifier job ceiling at 1,000 after page fallback
RomneyDa added a commit that referenced this pull request Oct 15, 2026
…171952)

* fix(ci): retry FRV job listings with smaller pages after GitHub 5xx

* fix(ci): apply job listing page fallback to the strict FRV verifier

* fix(ci): keep the strict verifier job ceiling at 1,000 after page fallback

Release adaptation: ported the collector, strict verifier, and shared policy
fallback only. This branch has no releaseGhRateLimitRetryAt; its local frv.mjs
already reads attempt jobs 25 per page, so frv.mjs and its tests stay as is.
The retry tests exercise async transient retries with a network error because
job-listing 5xx responses now fall back to smaller pages.

(cherry picked from commit 5584b16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. release-fast-lane Release tooling PR: narrow ci-gate, ClawSweeper advisory (RELEASING.md) scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant