Skip to content

fix(miner): cap check-runs page follows so poll cannot spin forever - #10258

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
andriypolanski:fix/10007-ci-poller-max-pages
Jul 31, 2026
Merged

fix(miner): cap check-runs page follows so poll cannot spin forever#10258
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
andriypolanski:fix/10007-ci-poller-max-pages

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Summary

  • Add maxPages to PollCheckRunsOptions, normalized like the other poller bounds (default 10 → 1000 checks at per_page=100, clamped 1–100), mirroring opportunity-fanout's page-follow cap.
  • Replace fetchCheckRuns' unbounded while (true) with while (page <= maxPages); exceeding the cap throws github_check_runs_pagination_page_cap so a pathological rel="next" chain cannot wedge manage poll / loop.
  • Legitimate multi-page responses and github_check_runs_pagination_incomplete behavior are unchanged.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Ran focused coverage on packages/loopover-miner/lib/ci-poller.ts via test/unit/miner-ci-poller.test.ts + test/unit/miner-ci-poller-failure-modes.test.ts (100% lines / 100% branches on the file). Full test:ci / UI / MCP packs deferred to CI for this miner-lib-only change.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A — no visible UI/frontend/docs changes.

Notes

Made with Cursor

…SONbored#10007)

Add a normalized maxPages bound to fetchCheckRuns, mirroring opportunity-fanout,
and throw a distinct page-cap error when a Link chain exceeds it.
@loopover-orb

loopover-orb Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Important

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏳ LoopOver is waiting…

LoopOver has seen this pull request and is waiting on CI checks to finish before reviewing it. This comment will update once the review runs.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟨 Waiting

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 31, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.64%. Comparing base (5b24374) to head (6d7cbd5).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10258      +/-   ##
==========================================
+ Coverage   80.60%   80.64%   +0.03%     
==========================================
  Files         283      284       +1     
  Lines       59101    59215     +114     
  Branches     7000     7033      +33     
==========================================
+ Hits        47641    47755     +114     
  Misses      11167    11167              
  Partials      293      293              
Flag Coverage Δ
backend 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-miner/lib/ci-poller.ts 100.00% <100.00%> (ø)

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 470d417 into JSONbored:main Jul 31, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 31, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

miner(ci-poller): fetchCheckRuns' page-follow loop has no page cap and can spin forever

1 participant