Skip to content

fix: handle broken article links in bounty verifier#4269

Closed
answndud wants to merge 1 commit intoScottcjn:mainfrom
answndud:fix/bounty-verifier-article-head-errors
Closed

fix: handle broken article links in bounty verifier#4269
answndud wants to merge 1 commit intoScottcjn:mainfrom
answndud:fix/bounty-verifier-article-head-errors

Conversation

@answndud
Copy link
Copy Markdown
Contributor

Refs #305.

Summary

  • add a timeout to the bounty verifier article-link HEAD request
  • follow redirects while checking article links
  • treat network failures as a broken article link instead of crashing report generation

Bug

BountyVerifier.generate_report(..., article_url=...) currently calls requests.head(article_url) without a timeout or RequestException handling. A refused connection, DNS failure, invalid URL, or slow endpoint can raise out of report generation or hang the verifier instead of recording the article as broken.

Verification

  • python3 -m py_compile tools/bounty-bot-pro/verifier.py
  • python3 - <<'PY'\nimport ast\nfrom pathlib import Path\nast.parse(Path("tools/bounty-bot-pro/verifier.py").read_text())\nprint("parsed")\nPY\n- git diff --check -- tools/bounty-bot-pro/verifier.py\n\nNote: this branch is based on origin/main, so it still shows the pre-existing invalid-backtick SyntaxWarning that PR fix: remove invalid python escape warnings #4268 fixes separately. This PR is scoped only to the article-link request failure path.

@github-actions
Copy link
Copy Markdown
Contributor

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Your PR has a BCOS-L1 or BCOS-L2 label
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions Bot added size/XS PR: 1-10 lines BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) labels May 11, 2026
@answndud
Copy link
Copy Markdown
Contributor Author

Withdrawing this lower-impact PR to reduce review noise and focus the bounty submissions on higher-impact security/crash/behavior fixes.

@answndud answndud closed this May 11, 2026
@answndud answndud deleted the fix/bounty-verifier-article-head-errors branch May 11, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/XS PR: 1-10 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant