Skip to content

fix(issue bounties): avoid false cancel when closure timeline is truncated#1412

Open
glorysr1209-png wants to merge 1 commit into
entrius:testfrom
glorysr1209-png:fix/bounty-closure-timeline-window
Open

fix(issue bounties): avoid false cancel when closure timeline is truncated#1412
glorysr1209-png wants to merge 1 commit into
entrius:testfrom
glorysr1209-png:fix/bounty-closure-timeline-window

Conversation

@glorysr1209-png
Copy link
Copy Markdown

Summary

Closes #1411. Issue bounty validators must not vote cancel when GitHub’s closure timeline window omits the current close event. This aligns check_github_issue_closed() with issue_competitions/forward.py, which already skips cancel when solver_lookup_failed is true.

Changes

  • Request up to 100 CLOSED_EVENT nodes in the closure GraphQL query.
  • Treat “closed issue + completed events in window but no matching current close” as solver lookup failure (skip cancel in forward pass).
  • Add regression test for truncated timeline behavior.

Real Behavior Proof

  • Unit test test_truncated_closure_timeline_sets_solver_lookup_failed asserts solver_lookup_failed=True when stale close events fill the window but closedAt does not match any of them.

What I ran

python3 -m pytest tests/utils/test_github_api_tools.py::TestCheckGithubIssueClosed::test_truncated_closure_timeline_sets_solver_lookup_failed -q

What I observed

Test encodes the forward-pass guard: no false “no solver” path when the current close event is outside the fetched timeline window.

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Issue bounty forward false cancel when closure timeline truncated

1 participant