Repository navigation
fix(pr_runtime): Check the require_linked_issue filter - #185
Open
philip-paul-mueller wants to merge 5 commits into
Open
philip-paul-mueller wants to merge 5 commits into
philip-paul-mueller wants to merge 5 commits into
Conversation
The option was defined in PRRuntimeOptions (spec/options.py:47) but never used in the pipeline. PRs without linked issues fall through to _build_instruction, which uses the PR body (the fix description) as the problem statement. The PR body routinely leaks the solution approach, commit SHAs, and test names — see the comment at pr_runtime.py:276-278. Filtering them out ensures only PRs with linked issues (bug reports) are emitted, matching SWE-bench's approach of sourcing problem statements from issue text.
Author
|
Maybe the default of |
Add three unit tests exercising the require_linked_issue option wired up in 21af74e: - PR without a linked issue is skipped with 'no_linked_issue' when the filter is on (default) - PR with 'Closes huggingface#123' is kept when the filter is on - PR without a linked issue is kept when the filter is explicitly off Uses a small _make_pr / _make_pipeline pair to construct the PRRuntimePipeline with a stub BootstrapResult, mirroring the pattern in test_pr_runtime_rejects_missing_bootstrap.
Collaborator
|
The filter fix passes locally (59 tests). I agree with your suggestion: default |
Author
|
@adithya-s-k Thanks for your feedback, "I" have added them, let me know if something has to change. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PRRuntimeOptions, seesrc/repo2rlenv/spec/options.py:47, defines the flagrequire_linked_issueto filter out PRs that do not have an associated issue. However, the filter never actually checked that flag.This PR now adds the a check to the filter, thus now only PRs with a linked issue are considered, matching SWE-bench's approach of sourcing problem statements from issue text.
Note that this PR changes the previous behaviour, because now a linked issue is required by default, while before it was not needed.