Skip to content

Conversation

dcloud347
Copy link
Contributor

This pull request refactors the patch selection workflow to introduce a dedicated patch normalization and deduplication step, clarifies regression test output handling, and improves type annotations and documentation. The changes ensure that only unique, normalized patches are considered for regression testing and final selection, and that the regression test node consistently reports the number of tests run. Several method signatures and state keys are updated to support these improvements.

Patch Normalization and Deduplication:

  • Introduced PatchNormalizationNode to normalize and deduplicate candidate patches, storing results in a new deduplicated_patches state key; this replaces the previous use of edit_patches for downstream nodes. The workflow is updated to use this node and key, and the deduplication logic is improved to use Sequence[str] for flexibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Patch Selection Logic:

  • Updated FinalPatchSelectionNode to accept deduplicated patches and to improve majority voting logic, including early stopping when a majority is reached. The human message formatting now takes the set of candidate patches as a parameter. [1] [2] [3]

Regression Test Output and Documentation:

  • Clarified and enforced the requirement to report the total number of tests run in regression test nodes, specifying to return 0 if no tests were executed. Updated documentation, output schema, and prompt instructions for consistency. [1] [2] [3] [4]

Type Annotations and Imports:

  • Improved type annotations throughout, especially for patch lists (now using Sequence[str]), and added necessary imports for new types. [1] [2]

Miscellaneous:

  • Adjusted recursion limit calculation in context_retrieval_subgraph.py for more accurate scaling with the number of query refinement loops.
  • Added explicit instructions in docstrings not to write new tests, as testing will be handled elsewhere. [1] [2]

@dcloud347 dcloud347 merged commit 923e3ff into main Aug 23, 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

1 participant