Fix: Enforce test case and bug feedback requirements in meets_requirements_why#5956
Conversation
…ments_why Address the FIXME comment in meets_requirements_why method by implementing checks for require_testcases and require_bugs fields. When these flags are True, the function now verifies that all associated test cases and bugs have positive feedback (no negative karma) before allowing the update to proceed.
…ss maintainers' concern about consistency between checking self.test_cases but iterating over self.full_test_cases in meets_requirements_why method.
…ss maintainers' concern about consistency between checking self.test_cases but iterating over self.full_test_cases in meets_requirements_why method.
gridhead
left a comment
There was a problem hiding this comment.
Could you please look into the tests?
|
Hi Akashdeep Dhar.
Just wanted to let you know that I've fixed the pre-commit coverage issue.
The problem was that some lines
in the meets_requirements_why method weren't covered by tests,
specifically lines 4056 and 4061-4064.
I added two new test methods to cover those scenarios where test cases or
bugs have negative feedback. The
changes have been committed and pushed to the repository. The
pre-commit checks should now pass sincewe've got full coverage.
Thanks for your patience while I worked through this..
…On Mon, 13 Oct 2025 at 08:53, Akashdeep Dhar ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Could you please look into the tests?
—
Reply to this email directly, view it on GitHub
<#5956 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAIHD2FQNUYUCSIMPOPT7UD3XMLMPAVCNFSM6AAAAACILV3IYWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTGMRZHA4DONZSGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
gridhead
left a comment
There was a problem hiding this comment.
I am going to defer to @mattiaverga for a more formal review but could you please do something about the abysmally long commit messages? Especially those from cc2000a and 5956b98. In fact, I would recommend squashing the commits into one. As a general thumb rule, please try to keep your commit messages under 50 characters.
|
These additional, clearly AI-generated files are not needed or desired: As far as the fix itself goes: by eyeball this probably would more or less work, but I think putting it at the bottom of the method and messing around with the existing flow is not necessary. These checks work similarly to the existing gating checks near the top of the method: they can never pass the update by themselves, but they can fail it by themselves. So we could handle them similarly. We can put the checks before the gating block, have them return The tests are insufficient - they only test the failure case, not the success case. They need to also check that the result is I'm not the maintainer, but FWIW, as this is clearly AI-generated, I think it would be good to mark it as such. The best practice I've found so far for this is to add an Finally, kinda most importantly: it is very dumb that we've had this as a FIXME forever and we've had elements in the web UI that have done nothing forever, but "fixing" this would be a somewhat surprising change to many folks, I think. They've probably subconsciously gotten used to the status quo that the weird 'require testcases' and 'require bugs' sliders default to on, but don't actually do anything. If we suddenly change it so they do what they're supposed to, I think people will be pretty surprised. We might want to consider changing the defaults of those sliders to 'off', to respect what the effective default behaviour has been for years, and/or doing prominent messaging about this change. |
mattiaverga
left a comment
There was a problem hiding this comment.
Thanks, for this pull request. I quote everything @AdamWill has wrote in the previous comment. Also, instead of just pushing AI generated work, please have a look at https://bodhi.readthedocs.io/en/25.11.1/developer/index.html and try to adjust the PR to the standards we use in this repository.
@gridhead yikes, I'll have to make sure you're never in a position to review my PRs. I'd never get anything merged. :P |
This PR addresses the FIXME comment in the
meets_requirements_whymethod that was notenforcing test case and bug feedback requirements shown in the UI but not currently enforced.