Skip to content

Refs #406: Use API bounty capacity in queue health#474

Open
er1c-cartman wants to merge 6 commits into
ramimbo:mainfrom
er1c-cartman:fix-406-api-bounty-fallback
Open

Refs #406: Use API bounty capacity in queue health#474
er1c-cartman wants to merge 6 commits into
ramimbo:mainfrom
er1c-cartman:fix-406-api-bounty-fallback

Conversation

@er1c-cartman
Copy link
Copy Markdown
Contributor

@er1c-cartman er1c-cartman commented May 26, 2026

Summary

  • enrich pr_queue_health live mode with public MergeWork API bounty metadata for the target repo
  • use API status and awards_remaining to avoid treating exhausted open GitHub bounty issues as payable
  • preserve the existing GitHub-only fallback with visible warnings when the API is unavailable, malformed, missing authoritative fields, invalid UTF-8, or at the 200-row safety cap

Refs #406.

Evidence

This addresses a real queue-health edge case: GitHub issue state alone can show a bounty issue as open while the public MergeWork API reports no remaining award capacity. Without the API overlay, live queue reports can incorrectly mark PRs against exhausted bounties as still payable. The invalid UTF-8 regression keeps the fallback boundary intact for malformed API responses.

Validation

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev python -m pytest tests/test_pr_queue_health.py -q -> 14 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev python -m pytest -q -> 419 passed
  • ~/.local/bin/uv run --extra dev ruff check . -> passed
  • ~/.local/bin/uv run --extra dev ruff format --check . -> 79 files already formatted
  • ~/.local/bin/uv run --extra dev mypy app scripts/pr_queue_health.py -> success
  • git diff --check -> clean
  • changed-file secret scan -> no matches

Note: pytest plugin autoload is disabled because this workstation has an unrelated ROS Humble pytest plugin on the global path.

Summary by CodeRabbit

  • New Features

    • Live bounty availability from an external API is now shown in queue reports; reports indicate which data source was used.
  • Improvements

    • Reports include data-source metadata and show clear warnings when external bounty data is unavailable, invalid, or capped; automatic fallback to GitHub-only state is applied.
    • Warnings are rendered in both text and markdown reports.
  • Tests

    • Added tests covering live API success, invalid/malformed responses, safety-cap behavior, and fallback handling.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds MergeWork API enrichment for GitHub "bounty" issues: new loader with validation and safety cap, integration into load_live_queue() with metadata and fallback warnings, updates to analyze/formatters to surface bounty source and warnings, and tests for success and degraded API responses.

Changes

API-driven bounty enrichment for queue health analysis

Layer / File(s) Summary
API integration setup and constants
scripts/pr_queue_health.py
Adds urllib imports, API_BOUNTY_SAFETY_CAP, and DEFAULT_API_HOST used by the API loader.
Bounty fetch and validation function
scripts/pr_queue_health.py
Implements _load_api_bounties(repo, api_host) to GET /api/v1/bounties, validate the JSON list payload and per-row fields/types, enforce a safety cap, filter by repo, normalize state and awards_remaining, and raise RuntimeError on failures.
Live queue integration with API bounty state
scripts/pr_queue_health.py
Updates load_live_queue() to call _load_api_bounties(repo) with try/except that records metadata and api_bounty_warning; builds bounty_issues by selecting issues with "bounty" in the title and preferring API-provided state and awards_remaining with GitHub fallbacks.
Annotate analysis and formatters with API source and warnings
scripts/pr_queue_health.py
Extends analyze_queue() to include data_sources.bounties and optional api_bounty_warning from metadata; updates format_text_report() and format_markdown_report() to append the bounty data-source line and include a warning block when api_bounty_warning is present.
Test coverage for API bounty enrichment
tests/test_pr_queue_health.py
Adds live-mode tests that mock urlopen and GitHub PR/issue listings to assert: API usage and timeout; fallback on invalid UTF-8 with a warning rendered in text/markdown; fallback on malformed API rows; and fallback when the API fetch reaches the configured safety cap.

Possibly related PRs

  • ramimbo/mergework#413: Both PRs modify scripts/pr_queue_health.py and tests/test_pr_queue_health.py, extending report generation and formatting paths.
  • ramimbo/mergework#324: Earlier changes to load_live_queue, analyze_queue, and formatters that this PR extends with MergeWork API enrichment.
  • Add public bounty summary API #311: Introduces the /api/v1/bounties/summary endpoint that supplies the bounty capacity fields consumed by this PR.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Bounty Pr Focus ⚠️ Warning PR properly focuses on Bounty #406 API integration with comprehensive tests and isolated changes; however, ruff format check fails on lines 365-367 in scripts/pr_queue_health.py. Unwrap the RuntimeError on line 366 to a single line: raise RuntimeError(f"MergeWork API bounty row {index} has invalid awards_remaining")
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title concretely names the changed surface (pr_queue_health) and its main purpose (API bounty capacity), directly addressing the reference issue.
Description check ✅ Passed Description includes summary, evidence of the problem, validation steps (tests, linters, mypy), and issue reference; matches template structure despite non-standard formatting.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Mergework Public Artifact Hygiene ✅ Passed PR only modifies technical files (scripts and tests). No changes to README, docs, or public comments. No investment, price, or cash-out claims present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@jtc268
Copy link
Copy Markdown
Contributor

jtc268 commented May 26, 2026

Reviewed PR #474 at current head c5b5579eda0941e72c00b476a763b39ecb311af0.

I would hold this for one small observability gap before merge: load_live_queue() catches any _load_api_bounties() RuntimeError and silently falls back to GitHub issue state. That preserves operation, but it also means the exact exhausted-bounty false positive this PR fixes can return during a transient API/decode failure with no visible warning in the JSON/text report.

Evidence on this head:

  • Inspected scripts/pr_queue_health.py: _load_api_bounties() raises on API/decode/schema failure, but load_live_queue() catches it and sets api_bounties = {} without carrying any warning/source metadata into the report.
  • Ran uv run --extra dev python -m pytest tests/test_pr_queue_health.py -q -> 11 passed.
  • Ran the live queue command with the PR code: uv run --extra dev python scripts/pr_queue_health.py --repo ramimbo/mergework --format json -> API-backed open bounty counts loaded successfully in the live path.
  • Directly exercised the bad-UTF8 fallback shape from the new regression: report summary returned open_bounties: 1, closed_bounty_references: 0, and top-level keys only closed_bounty_references, dirty_or_unstable_merge_state, duplicate_scope_groups, missing_bounty_references, needs_info, and summary; there is no API fallback warning for callers or humans to notice.

Suggested fix: keep the fallback, but include an api_bounty_warning/data_sources field in the report and render it in text/markdown so operators know when payability is GitHub-only instead of API-confirmed.

Assessment: this is a good direction for MergeWork because queue-health should use actual award capacity, but without a surfaced fallback warning the tool can still produce overconfident payability output when the API layer is unavailable.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f2c0ce42-8a2c-4a43-81c1-9f453bfe2cac

📥 Commits

Reviewing files that changed from the base of the PR and between d8532d4 and c5b5579.

📒 Files selected for processing (2)
  • scripts/pr_queue_health.py
  • tests/test_pr_queue_health.py

Comment thread scripts/pr_queue_health.py Outdated
Comment thread scripts/pr_queue_health.py Outdated
@er1c-cartman
Copy link
Copy Markdown
Contributor Author

Thanks, agreed. I pushed f109356 to address the observability gap.

What changed:

  • load_live_queue() now returns metadata describing whether bounty data came from github_issues+mergework_api or GitHub-only fallback.
  • analyze_queue() carries that into data_sources and includes api_bounty_warning when the API path fails.
  • text and markdown reports render the bounty data source and fallback warning before the issue sections, so no-issue reports can still show degraded payability confidence.
  • the bad-UTF8 regression now asserts the warning and both rendered formats.

Fresh validation:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev python -m pytest tests/test_pr_queue_health.py -q -> 11 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev python -m pytest -q -> 416 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev ruff check scripts/pr_queue_health.py tests/test_pr_queue_health.py -> passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev ruff format --check scripts/pr_queue_health.py tests/test_pr_queue_health.py -> 2 files already formatted
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev python -m mypy app scripts/pr_queue_health.py -> success
  • git diff --check -> clean

@er1c-cartman
Copy link
Copy Markdown
Contributor Author

Pushed 1935aa2 for the two remaining CodeRabbit findings.

Changes:

  • Added an API_BOUNTY_SAFETY_CAP guard so a full 200-row API page fails over with an api_bounty_warning instead of silently trusting a truncated global list.
  • Validated matching API bounty rows before treating them as authoritative: status must be a non-empty string and awards_remaining must be integer-coercible, non-boolean, and present.
  • Added regression coverage for missing status, missing awards_remaining, and the 200-row API cap fallback.

Fresh validation:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev python -m pytest tests/test_pr_queue_health.py -q -> 14 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ~/.local/bin/uv run --extra dev python -m pytest -q -> 419 passed
  • ~/.local/bin/uv run --extra dev ruff check . -> passed
  • ~/.local/bin/uv run --extra dev ruff format --check . -> 79 files already formatted
  • ~/.local/bin/uv run --extra dev mypy app scripts/pr_queue_health.py -> success
  • git diff --check -> clean

Copy link
Copy Markdown
Contributor

@GHX5T-SOL GHX5T-SOL left a comment

Choose a reason for hiding this comment

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

Reviewed current head 1935aa2d526ed9c7589da0556d725bfa0a19ad5d.

No blocker found in this current-head pass. The earlier silent-fallback concern has been addressed: API failures now carry data_sources.bounties = github_issues plus api_bounty_warning, and text/markdown reports render the degraded source. The latest head also validates matching API rows and fails over at the 200-row safety cap instead of silently trusting a potentially truncated list.

Evidence checked:

  • PR is open, non-draft, mergeable/CLEAN, with GitHub CI and CodeRabbit successful.
  • Diff is scoped to scripts/pr_queue_health.py and tests/test_pr_queue_health.py.
  • _load_api_bounties() now wraps malformed UTF-8/JSON/API failures, validates status and awards_remaining, and records visible fallback metadata through load_live_queue()/analyze_queue().
  • Live read-only queue health completed with data_sources.bounties = github_issues+mergework_api.
  • Live API scan returned 76 ramimbo/mergework bounty rows and no duplicate (repo, issue_number) keys; the app model also has a uniqueness constraint for that pair.

Validation:

  • /home/kali/money/mergework/.venv/bin/python -m pytest tests/test_pr_queue_health.py -q -> 14 passed
  • /home/kali/money/mergework/.venv/bin/python -m pytest -q -> 419 passed
  • /home/kali/money/mergework/.venv/bin/python -m ruff check scripts/pr_queue_health.py tests/test_pr_queue_health.py -> passed
  • /home/kali/money/mergework/.venv/bin/python -m ruff format --check scripts/pr_queue_health.py tests/test_pr_queue_health.py -> 2 files already formatted
  • /home/kali/money/mergework/.venv/bin/python -m mypy app scripts/pr_queue_health.py -> success, no issues in 31 source files
  • gitleaks detect --no-banner --redact --source . --log-opts upstream/main..HEAD --exit-code 1 -> no leaks found

@tinyopsstudio
Copy link
Copy Markdown

Reviewed PR #474 at current head 1935aa2d526ed9c7589da0556d725bfa0a19ad5d.

No blocker found in this current-head pass. The earlier silent-fallback risk is addressed: API bounty failures now carry data_sources.bounties = github_issues plus api_bounty_warning, and both text and markdown reports render that degraded source before the issue sections. The final commit also prevents over-trusting a capped global API page and validates matching API rows before treating status and awards_remaining as authoritative.

Validation run on this head:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python -m pytest tests/test_pr_queue_health.py -q -> 14 passed
  • ./.venv/bin/python -m ruff check scripts/pr_queue_health.py tests/test_pr_queue_health.py -> passed
  • ./.venv/bin/python -m ruff format --check scripts/pr_queue_health.py tests/test_pr_queue_health.py -> 2 files already formatted
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python -m mypy app scripts/pr_queue_health.py -> success
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python scripts/docs_smoke.py -> docs smoke ok
  • git diff --check origin/main...HEAD -> clean

GitHub readback shows the PR is open, non-draft, CLEAN, and the quality/readiness workflow is successful. The current head looks ready from the queue-health API overlay and fallback-reporting perspective.

Copy link
Copy Markdown

@eliasx45 eliasx45 left a comment

Choose a reason for hiding this comment

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

Reviewed PR #474 at head 1935aa2d526ed9c7589da0556d725bfa0a19ad5d for the queue-health API bounty-capacity overlay and fallback-reporting behavior.

The current implementation looks good in isolation: the focused tests cover API-backed bounty capacity, invalid API responses, visible fallback warning/source metadata, missing required API fields, and the 200-row safety-cap fallback. I do not see a behavior blocker in the submitted script/test slice.

Blocking issue:

  • The branch is now unmergeable against current origin/main.
  • Reproduced locally with git merge --no-commit --no-ff origin/main:
Auto-merging scripts/pr_queue_health.py
CONFLICT (content): Merge conflict in scripts/pr_queue_health.py
Auto-merging tests/test_pr_queue_health.py
Automatic merge failed; fix conflicts and then commit the result.

Please rebase/merge current main and resolve the queue-health overlap before this can land.

Validation run locally on the PR head:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_pr_queue_health.py -q -> 14 passed
  • .\.venv\Scripts\python.exe -m ruff check scripts\pr_queue_health.py tests\test_pr_queue_health.py -> all checks passed
  • .\.venv\Scripts\python.exe -m ruff format --check scripts\pr_queue_health.py tests\test_pr_queue_health.py -> 2 files already formatted
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m mypy app scripts\pr_queue_health.py -> success
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe scripts\docs_smoke.py -> docs smoke ok
  • git diff --check origin/main...HEAD -> clean

Requesting changes for the merge conflict, not for the queue-health API/fallback behavior itself.

@ramimbo
Copy link
Copy Markdown
Owner

ramimbo commented May 28, 2026

Maintainer cleanup note: holding this until the branch is rebased or otherwise updated. The branch currently conflicts with origin/main in scripts/pr_queue_health.py.

@ramimbo ramimbo added the mrwk:needs-info More information needed label May 28, 2026
…llback

# Conflicts:
#	scripts/pr_queue_health.py
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/pr_queue_health.py (1)

345-357: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Reject out-of-range numeric API values before trusting the row.

app/serializers.py clamps awards_remaining to >= 0, so a negative count here is malformed input, not authoritative state. Right now -1/"-1" passes validation and _is_open_bounty() turns it into “not payable”, which recreates the false-positive path this fallback boundary is meant to avoid. The same applies to issue_number <= 0, which can skew the summary counts.

Proposed fix
         issue_number = item.get("issue_number")
         if isinstance(issue_number, bool) or not isinstance(issue_number, int):
             raise RuntimeError(f"MergeWork API bounty row {index} has invalid issue_number")
+        if issue_number <= 0:
+            raise RuntimeError(f"MergeWork API bounty row {index} has invalid issue_number")
         status = item.get("status")
         if not isinstance(status, str) or not status.strip():
             raise RuntimeError(f"MergeWork API bounty row {index} missing status")
         awards_remaining = item.get("awards_remaining")
         if awards_remaining is None:
@@
         try:
             normalized_awards_remaining = int(awards_remaining)
         except (TypeError, ValueError) as exc:
             raise RuntimeError(
                 f"MergeWork API bounty row {index} missing awards_remaining"
             ) from exc
+        if normalized_awards_remaining < 0:
+            raise RuntimeError(
+                f"MergeWork API bounty row {index} has invalid awards_remaining"
+            )

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7ac39150-9480-4abb-8f54-9b57caa6fe97

📥 Commits

Reviewing files that changed from the base of the PR and between 1935aa2 and 30f2b28.

📒 Files selected for processing (2)
  • scripts/pr_queue_health.py
  • tests/test_pr_queue_health.py

@er1c-cartman
Copy link
Copy Markdown
Contributor Author

Thanks for the cleanup note. I merged current origin/main into this branch and resolved the scripts/pr_queue_health.py conflict in 30f2b28.

Validation after the update:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python -m pytest tests/test_pr_queue_health.py -q -> 20 passed
  • ./.venv/bin/python -m py_compile scripts/pr_queue_health.py
  • git diff --check

GitHub now reports the PR as mergeable/clean on the updated head.

Copy link
Copy Markdown

@eliasx45 eliasx45 left a comment

Choose a reason for hiding this comment

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

Reviewed current head 30f2b28cbf852e08fb75ea2036af792d31b009ed after the branch refresh.

Verdict: request changes.

The earlier merge-readiness blocker is fixed:

git diff --check origin/main...HEAD
# clean

git merge-tree --write-tree origin/main HEAD
# 6132f7c64961cbb5f8bdf5a7d27084d37efba80a

The focused suite also passes on this head:

PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/test_pr_queue_health.py -q
# 20 passed

python -m py_compile scripts/pr_queue_health.py
# passed

python -m ruff check scripts/pr_queue_health.py tests/test_pr_queue_health.py
# All checks passed

However, CodeRabbit's new API-row validation concern is reproducible and I agree it should block before merge. _load_api_bounties() currently accepts out-of-range API values as authoritative:

negative_awards {406: {'number': 406, 'title': 'b', 'state': 'open', 'awards_remaining': -1}}
zero_issue {0: {'number': 0, 'title': 'b', 'state': 'open', 'awards_remaining': 1}}

That matters because this PR's purpose is to avoid stale/incorrect payability conclusions by trusting API bounty capacity only after validation. A negative awards_remaining should be treated as malformed input and fall back with an api_bounty_warning, not converted into a non-payable authoritative row. Similarly, issue_number <= 0 should be rejected instead of entering the bounty map.

Requested fix: reject issue_number <= 0 and normalized_awards_remaining < 0 in _load_api_bounties(), and add regressions proving those malformed API rows trigger the warning/fallback path rather than being trusted.

@er1c-cartman
Copy link
Copy Markdown
Contributor Author

Addressed the new API numeric-bound review in 2a630fd.

Changes:

  • _load_api_bounties() now rejects issue_number <= 0 before inserting API rows into the bounty map.
  • _load_api_bounties() now rejects negative awards_remaining after integer normalization.
  • Added fallback regressions for both malformed cases so they produce api_bounty_warning and keep GitHub issue data authoritative instead of trusting out-of-range API values.

Validation:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python -m pytest tests/test_pr_queue_health.py -q -> 22 passed
  • ./.venv/bin/python -m py_compile scripts/pr_queue_health.py
  • git diff --check

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8a3fdfa2-2b37-4227-9221-4baa204a4a51

📥 Commits

Reviewing files that changed from the base of the PR and between 30f2b28 and 2a630fd.

📒 Files selected for processing (2)
  • scripts/pr_queue_health.py
  • tests/test_pr_queue_health.py

Comment thread scripts/pr_queue_health.py Outdated
Copy link
Copy Markdown

@eliasx45 eliasx45 left a comment

Choose a reason for hiding this comment

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

Reviewed current head 2a630fdf0589d5e8addf0904e0cdf6639f5dc755 after the API numeric-bound fix.

Verdict: request changes.

The behavioral fix itself looks correct: _load_api_bounties() now rejects issue_number <= 0 and negative awards_remaining instead of trusting those malformed API rows.

Focused validation:

git merge-tree --write-tree origin/main HEAD
# 6393c6607a68abc366a185303ef456b95c26a9cc

PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ..\mergework\.venv\Scripts\python.exe -m pytest tests\test_pr_queue_health.py -q
# 22 passed

..\mergework\.venv\Scripts\python.exe -m py_compile scripts\pr_queue_health.py
# passed

..\mergework\.venv\Scripts\python.exe -m ruff check scripts\pr_queue_health.py tests\test_pr_queue_health.py
# All checks passed

The remaining blocker is formatting, which also matches the failing GitHub CI job:

..\mergework\.venv\Scripts\python.exe -m ruff format --check scripts\pr_queue_health.py tests\test_pr_queue_health.py
# Would reformat: scripts\pr_queue_health.py
# 1 file would be reformatted, 1 file already formatted

GitHub Actions failure readback for run 26620301091 shows the same issue:

ruff format --check .
Would reformat: scripts/pr_queue_health.py
1 file would be reformatted, 86 files already formatted

Requested fix: run Ruff format on scripts/pr_queue_health.py and push the formatting-only update. I do not see a remaining logic blocker after that.

@er1c-cartman
Copy link
Copy Markdown
Contributor Author

Addressed the current-head Ruff formatting blocker in 03a44f0.

Validation:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ./.venv/bin/python -m pytest tests/test_pr_queue_health.py -q -> 22 passed
  • ./.venv/bin/ruff format --check scripts/pr_queue_health.py tests/test_pr_queue_health.py
  • ./.venv/bin/python -m py_compile scripts/pr_queue_health.py
  • git diff --check

Copy link
Copy Markdown

@eliasx45 eliasx45 left a comment

Choose a reason for hiding this comment

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

Re-reviewed current head 03a44f076c83eb1c180f2f9b4a50824b34b28cc3 after the Ruff formatting follow-up.

Verdict: approve.

The prior blocker is resolved: scripts/pr_queue_health.py is now Ruff-formatted, and the API numeric-bound behavior from the previous head remains covered.

Validation on this checkout:

PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ..\mergework\.venv\Scripts\python.exe -m pytest tests\test_pr_queue_health.py -q
# 22 passed

..\mergework\.venv\Scripts\python.exe -m py_compile scripts\pr_queue_health.py
# passed

..\mergework\.venv\Scripts\python.exe -m ruff check scripts\pr_queue_health.py tests\test_pr_queue_health.py
# All checks passed

..\mergework\.venv\Scripts\python.exe -m ruff format --check scripts\pr_queue_health.py tests\test_pr_queue_health.py
# 2 files already formatted

git diff --check origin/main...HEAD
# clean

git merge-tree --write-tree origin/main HEAD
# 9a9a0e9977c6e24035419df37fb89c62c4cf0cb0

I do not see a remaining blocker in this queue-health API bounty-capacity slice.

@ramimbo ramimbo removed the mrwk:needs-info More information needed label May 29, 2026
@ramimbo
Copy link
Copy Markdown
Owner

ramimbo commented May 29, 2026

Re-checked current head 03a44f0. The origin/main conflict blocker is cleared, and the later Ruff formatting blocker is cleared. Waiting for a second useful current-head review before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants