Skip to content

Dev - #94

Merged
dcloud347 merged 5 commits into
mainfrom
dev
Jul 27, 2025
Merged

Dev#94
dcloud347 merged 5 commits into
mainfrom
dev

Conversation

@dcloud347

Copy link
Copy Markdown
Contributor

This pull request introduces several updates to improve functionality, readability, and reliability in the bug reproduction workflow and related modules. Key changes include enhancements to the BugReproductionSubgraph class, stricter type handling, and documentation improvements. Below is a categorized summary of the most important changes:

Enhancements to the Bug Reproduction Workflow:

  • Added a detailed docstring and step-by-step comments in the BugReproductionSubgraph class to clarify its purpose and workflow. This includes describing each step of the state machine, such as context retrieval, patch writing, file editing, and retry loops. ([[1]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2R31-R36), [[2]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2R48-R66), [[3]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2R76-R99), [[4]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2R108-L94), [[5]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2R151-R159))
  • Increased the recursion limit for the invoke method in BugReproductionSubgraph to 100, allowing for deeper retries in complex scenarios. ([prometheus/lang_graph/subgraphs/bug_reproduction_subgraph.pyL188-L201](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2L188-L201))
  • Updated transitions and conditions in the state machine to handle fallback scenarios, ensuring a more robust retry mechanism. ([[1]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2R195-R232), [[2]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2R169-R170))

Type and Dependency Handling:

  • Changed the return type of the added_test_filename method in BugReproducingExecuteNode from str to Path for better type safety. ([prometheus/lang_graph/nodes/bug_reproducing_execute_node.pyL70-R74](https://github.com/EuniAI/Prometheus/pull/94/files#diff-c64259bf32f9f57dc56a11e422e1ca234696beec0592eb66d1db66c6ccd9c8f2L70-R74))
  • Updated the __call__ method in BugReproducingExecuteNode to explicitly convert Path objects to strings when formatting messages. ([prometheus/lang_graph/nodes/bug_reproducing_execute_node.pyL111-R115](https://github.com/EuniAI/Prometheus/pull/94/files#diff-c64259bf32f9f57dc56a11e422e1ca234696beec0592eb66d1db66c6ccd9c8f2L111-R115))

Documentation and Comments:

  • Added detailed docstrings to the __init__ and invoke methods of BugReproductionSubgraph, explaining arguments, steps, and expected outputs. ([[1]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2R48-R66), [[2]](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2L188-L201))
  • Clarified comments in the context_extraction_node.py file to specify constraints on line numbers. ([prometheus/lang_graph/nodes/context_extraction_node.pyL54-R55](https://github.com/EuniAI/Prometheus/pull/94/files#diff-ba139c0232c524325719a0168e1d99d2d675607a83833374722a978b37865bebL54-R55))

Bug Fixes:

  • Corrected a typo in the BugReproducingExecuteNode class comments, changing "EXECTUTE" to "EXECUTE" and adjusted rules to explicitly note that dependencies may need to be installed. ([prometheus/lang_graph/nodes/bug_reproducing_execute_node.pyL25-R32](https://github.com/EuniAI/Prometheus/pull/94/files#diff-c64259bf32f9f57dc56a11e422e1ca234696beec0592eb66d1db66c6ccd9c8f2L25-R32))

Cleanup and Minor Adjustments:

  • Removed an unused import (GraphRecursionError) from bug_reproduction_subgraph.py to clean up the codebase. ([prometheus/lang_graph/subgraphs/bug_reproduction_subgraph.pyL6](https://github.com/EuniAI/Prometheus/pull/94/files#diff-df7971631d9eb7557c9e2f62d2893a67accdb61fd727ffc1dcfb5400620852b2L6))
  • Increased the recursion limit in the invoke method of issue_verified_bug_subgraph.py to align with changes in related modules. ([prometheus/lang_graph/subgraphs/issue_verified_bug_subgraph.pyL188-R188](https://github.com/EuniAI/Prometheus/pull/94/files#diff-13234819dbfca353a2a941f3fccd3b0f6950bbca52c25635c57ac26652333d9bL188-R188))

Issue Resolved

Resolved issue #93

@dcloud347 dcloud347 linked an issue Jul 27, 2025 that may be closed by this pull request
@dcloud347
dcloud347 merged commit 3f7c838 into main Jul 27, 2025
2 checks passed
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.

Sometimes unable to Reproduce bugs due to Lack of Python Packages

1 participant