All-Hands-AI / openhands-resolver

A system that tries to resolve all issues on a github repo with OpenHands.
MIT License
60 stars 14 forks source link

guess_success fails on PRs with no code comments #270

Open neubig opened 2 hours ago

neubig commented 2 hours ago

Fixing this PR is not working due to the fact that it has no code comments: https://github.com/All-Hands-AI/openhands-resolver/pull/263

It is resulting in the following error:

ERROR:root:  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/openhands_resolver/resolve_issue.py", line 563, in <module>
    main()
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/openhands_resolver/resolve_issue.py", line 544, in main
    asyncio.run(
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/openhands_resolver/resolve_issue.py", line 398, in resolve_issue
    output = await process_issue(
             ^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/openhands_resolver/resolve_issue.py", line 244, in process_issue
    success, comment_success, success_explanation = issue_handler.guess_success(issue, state.history, llm_config)
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/openhands_resolver/issue_definitions.py", line 468, in guess_success
    raise ValueError("Expected review comments or thread comments to be initialized.")

ERROR:root:<class 'ValueError'>: Expected review comments or thread comments to be initialized.

This is weird because there are review comments requesting changes, so I would expect that it would enter the code branch dedicated to the case where there are no direct code comments, but there are review comments.

github-actions[bot] commented 2 hours ago

OpenHands started fixing the issue! You can monitor the progress here.

github-actions[bot] commented 2 hours ago

An attempt was made to automatically fix this issue, but it was unsuccessful. A branch named 'openhands-fix-issue-270' has been created with the attempted changes. You can view the branch here. Manual intervention may be required.