Skip to content

Flag overdue pending-create work in public discovery (#983)#1171

Open
yanyishuai wants to merge 1 commit into
ramimbo:mainfrom
yanyishuai:fix/issue-983-overdue-discovery
Open

Flag overdue pending-create work in public discovery (#983)#1171
yanyishuai wants to merge 1 commit into
ramimbo:mainfrom
yanyishuai:fix/issue-983-overdue-discovery

Conversation

@yanyishuai

Copy link
Copy Markdown

Summary

  • Adds a new pending_create_due availability state to the public work discovery endpoint.
  • Emits an execution_due boolean on every opening_soon entry.
  • Adds a new opening_soon_due_count to the discovery summary so operators can spot proposals whose executes_after has elapsed but whose Bounty row is not yet open.

Why

A create_bounty treasury proposal can be pending and past its executes_after deadline without the underlying Bounty row ever opening (e.g. executor never ran, payload invalid, or simply stuck). The public discovery feed previously lumped those rows in with normal pending_create items, so maintainers had to compare executes_after to wall-clock time themselves. Surfacing the new state explicitly makes the backlog of stuck proposals actionable.

Behavior

  • pending_create: executes_after is in the future (or unset) and the proposal is waiting its turn. Existing behavior, unchanged.
  • pending_create_due: executes_after is in the past and the proposal still has not produced a Bounty row. Indicates the executor/maintainer may need to follow up.
  • execution_due is exposed on every opening_soon row (boolean) so JSON consumers can filter without re-deriving the state.
  • opening_soon_due_count is exposed on the summary so dashboards can show the size of the overdue backlog at a glance.

Tests

  • Extended tests/test_work_discovery.py::test_work_discovery_distinguishes_live_and_pending_create_work to assert the new execution_due field and the new opening_soon_due_count summary key.
  • Added tests/test_work_discovery.py::test_work_discovery_flags_overdue_pending_create_proposals covering both future and overdue pending_create proposals.
  • Full suite: 924 passed.

Closes #983

Solana wallet for bounty payout: Do4v7foHJvRJLpRRoGaVPWX6DDEjX3yTK7J91gpwUQpE

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@yanyishuai, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 47 minutes and 11 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a209cbdc-b7a0-47cf-a4c9-f6af2b632276

📥 Commits

Reviewing files that changed from the base of the PR and between 3bc87d2 and 9590d94.

📒 Files selected for processing (8)
  • app/accounts.py
  • app/work_discovery.py
  • docs/agent-guide.md
  • scripts/claim_inventory.py
  • tests/run_safety_caps.py
  • tests/test_account_validation.py
  • tests/test_claim_inventory.py
  • tests/test_work_discovery.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@qingfeng312 qingfeng312 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Finding:

  • [P1] Format the overdue-pending-work changes before merge. The current head 28a99b517a456dc1e94e09b459717a676625ae1d passes the full pytest run (916 passed, 1 warning), but CI fails at ruff format --check .. The formatter reports app/work_discovery.py, tests/run_safety_caps.py, and tests/test_account_validation.py would be reformatted, so the PR is not currently merge-ready. Please run the formatter and update the branch.

Evidence checked:

  • PR #1171 is open, non-draft, and authored by another account.
  • Inspected the changed file list covering app/work_discovery.py, scripts/claim_inventory.py, tests/run_safety_caps.py, tests/test_account_validation.py, tests/test_claim_inventory.py, tests/test_work_discovery.py, and docs.
  • Checked CI run 28329437566: pytest passed, then ruff format --check . failed on the three files above.

Scope boundary: review evidence only. No wallet signing, treasury mutation, payout execution, exchange, bridge, private data, credentials, or secrets involved.

@yanyishuai yanyishuai force-pushed the fix/issue-983-overdue-discovery branch from f2e1142 to 9590d94 Compare June 29, 2026 04:53
@yanyishuai

Copy link
Copy Markdown
Author

@qingfeng312 Formatting + lint fixes pushed.

  • ruff format on app/work_discovery.py, tests/run_safety_caps.py, tests/test_account_validation.py
  • Fixed run_safety_caps.py UP037/E402 lint issues

Latest head: 9590d949d980. CI: pass. Please re-review.

@yanyishuai

Copy link
Copy Markdown
Author

@qingfeng312 CI is green on the latest head (9590d949d980) for #983. Could you take another look when you have a moment?

1 similar comment
@yanyishuai

Copy link
Copy Markdown
Author

@qingfeng312 CI is green on the latest head (9590d949d980) for #983. Could you take another look when you have a moment?

@qingfeng312 qingfeng312 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Follow-up on current head 9590d949d980f505959908d4b43e8944efd40470.

The earlier formatter/lint blocker has been resolved. I rechecked the updated file set for the overdue pending-create discovery state, including app/work_discovery.py, scripts/claim_inventory.py, tests/run_safety_caps.py, and the work-discovery/claim-inventory tests.

The implementation now keeps the pending_create/pending_create_due split explicit, exposes the execution_due and opening_soon_due_count fields consistently, and keeps the safety-cap helper/test updates inside the public discovery maintenance surface.

Validation checked: GitHub CI Quality, readiness, docs, and image checks passed on run 28349469822; CodeRabbit status is success on this head. I did not find a remaining blocker for the scoped #983 change.

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.

Proposed work: flag overdue pending-create discovery rows

2 participants