[PR #3216] test: pin the loopback requirement in the install-denial constants #3113

Open
opened 2026-10-28 21:15:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/3216
Author: @Dhevenddra
Created: 8/27/2026
Status: 🔄 Open

Base: main ← Head: test/pin-loopback-in-denial-copy


📝 Commits (1)

  • 23519a3 test: pin the loopback requirement in the install-denial constants

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 tests/test_install_flags_gates.py (+4 -0)

📄 Description

Problem

is_dedicated_install_allowed gates on flag AND loopback. ffb2f03 rewrote SECURITY_MESSAGE_FLAG_GIT_URL and SECURITY_MESSAGE_FLAG_PIP to 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_copy already pins the rest 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.

Fix

One assertion in the existing helper, which covers both constants through test_flag_constants_content.

Evidence

Against main at f39cbd5, Python 3.11.9:

$ python -m unittest tests.test_install_flags_gates
Ran 11 tests in 0.042s

OK

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_URL fails it:

AssertionError: 'loopback' not found in "ERROR: This action requires
'allow_git_url_install = true' in config.ini ([default] section). ..."
: constant must name the loopback requirement

Ran 11 tests in 0.038s

FAILED (failures=1)

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/3216 **Author:** [@Dhevenddra](https://github.com/Dhevenddra) **Created:** 8/27/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test/pin-loopback-in-denial-copy` --- ### 📝 Commits (1) - [`23519a3`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/23519a3b54ecb097bf3a3ccb46e2c99bfaca61e4) test: pin the loopback requirement in the install-denial constants ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_install_flags_gates.py` (+4 -0) </details> ### 📄 Description ## Problem `is_dedicated_install_allowed` gates on `flag AND loopback`. ffb2f03 rewrote `SECURITY_MESSAGE_FLAG_GIT_URL` and `SECURITY_MESSAGE_FLAG_PIP` to 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_copy` already pins the rest 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. ## Fix One assertion in the existing helper, which covers both constants through `test_flag_constants_content`. ## Evidence Against `main` at f39cbd5, Python 3.11.9: ``` $ python -m unittest tests.test_install_flags_gates Ran 11 tests in 0.042s OK ``` 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_URL` fails it: ``` AssertionError: 'loopback' not found in "ERROR: This action requires 'allow_git_url_install = true' in config.ini ([default] section). ..." : constant must name the loopback requirement Ran 11 tests in 0.038s FAILED (failures=1) ``` ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#3113
No description provided.