test: pin the loopback requirement in the install-denial constants - #3216
Open
Dhevenddra wants to merge 1 commit into
Open
test: pin the loopback requirement in the install-denial constants#3216Dhevenddra wants to merge 1 commit into
Dhevenddra wants to merge 1 commit into
Conversation
ffb2f03 rewrote SECURITY_MESSAGE_FLAG_GIT_URL and SECURITY_MESSAGE_FLAG_PIP to state both halves of the gate. is_dedicated_install_allowed is `flag AND loopback`, so a message naming only the flag sends a non-loopback user back to re-check a setting they had already enabled. _assert_honest_copy already pins the other load-bearing parts of that copy: the flag name, config.ini, and the absence of security_level phrasings that would misattribute the cause. The loopback half is not pinned, so a later edit can drop it again without failing a test. Assert it alongside the existing checks. Verified against main: the suite passes unchanged, and removing the loopback wording from either constant fails the new assertion.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe denial constant validation now checks that each constant names the loopback requirement in the ChangesInstall flag validation
Merge Risk: ⚪ Minimal · up to This localized test-only change strengthens coverage for the required loopback wording in install-denial messages, with no production behavior change or actionable merge-blocking risk remaining. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
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.
Problem
is_dedicated_install_allowedgates onflag AND loopback. ffb2f03 rewroteSECURITY_MESSAGE_FLAG_GIT_URLandSECURITY_MESSAGE_FLAG_PIPto state both halves, because a message naming only the flag sends a non-loopback user back to re-check a setting they had already enabled._assert_honest_copyalready pins the rest of that copy: the flag name,config.ini, and the absence ofsecurity_levelphrasings that would misattribute the cause. The loopback half is not pinned, so a later edit can drop it again without failing a test.Fix
One assertion in the existing helper, which covers both constants through
test_flag_constants_content.Evidence
Against
mainat f39cbd5, Python 3.11.9:The suite passes unchanged with the assertion added. To confirm it is load-bearing rather than vacuous, removing the loopback clause from
SECURITY_MESSAGE_FLAG_GIT_URLfails it:Note
This is the part of #3136 that still applies. I opened that one before ffb2f03, 4fe65b0 and 98be899 landed, and those cover the behaviour it was proposing and more, so I have closed it as superseded.