[hermes] ariadne: python:S2208 #134

Open
opened 2026-09-30 04:19:18 +00:00 by hermes-automation · 0 comments

SonarQube reports python:S2208 in ariadne/services/cluster_state_profiles.py. The build is green; this is a standing finding, not a failure.

What is wrong

Line 5 uses a wildcard import (from .cluster_state_contract import *), which hides which names the module actually depends on. The file only uses four imported names: _NODE_WORKLOAD_TOP, _PROFILE_LIMIT, and (via the dynamic __all__ computation over globals()) ClusterStateSummary and SignalContext.

Ariadne opened no pull request for it: no automated patch was possible for this finding.

Facts

  • gitea — Import only needed names or import the module and then use its members. (CRITICAL, 5min estimated) (ariadne/services/cluster_state_profiles.py:5)

Suggested fix (not applied)

Hermes could not open a pull request for this, so the change below was not written, validated, or pushed anywhere. It is a starting point for whoever picks this up, not a reviewed patch.

ariadne/services/cluster_state_profiles.py — Replace the star import with an explicit import of the four names this module actually consumes. _NODE_WORKLOAD_TOP and _PROFILE_LIMIT are used directly in the profile builders, and ClusterStateSummary and SignalContext must be present in module globals for the dynamic __all__ list comprehension at the bottom of the file to re-export them, so importing exactly these four preserves both runtime behaviour and the computed __all__. Note the underscore-prefixed names currently arrive via the wildcard only because cluster_state_contract lists them in its own __all__; importing them
... (truncated)

from .cluster_state_contract import (
    ClusterStateSummary,
    SignalContext,
    _NODE_WORKLOAD_TOP,
    _PROFILE_LIMIT,
)

Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_69ea5ad4d60d43ed9860639539924e5f). Hermes has no write access to this repository; no files or infrastructure were changed.

SonarQube reports **python:S2208** in `ariadne/services/cluster_state_profiles.py`. The build is green; this is a standing finding, not a failure. ## What is wrong Line 5 uses a wildcard import (`from .cluster_state_contract import *`), which hides which names the module actually depends on. The file only uses four imported names: `_NODE_WORKLOAD_TOP`, `_PROFILE_LIMIT`, and (via the dynamic `__all__` computation over `globals()`) `ClusterStateSummary` and `SignalContext`. Ariadne opened no pull request for it: no automated patch was possible for this finding. ## Facts - **gitea** — Import only needed names or import the module and then use its members. (CRITICAL, 5min estimated) (`ariadne/services/cluster_state_profiles.py:5`) ## Suggested fix (not applied) Hermes could not open a pull request for this, so the change below was not written, validated, or pushed anywhere. It is a starting point for whoever picks this up, not a reviewed patch. **`ariadne/services/cluster_state_profiles.py`** — Replace the star import with an explicit import of the four names this module actually consumes. `_NODE_WORKLOAD_TOP` and `_PROFILE_LIMIT` are used directly in the profile builders, and `ClusterStateSummary` and `SignalContext` must be present in module globals for the dynamic `__all__` list comprehension at the bottom of the file to re-export them, so importing exactly these four preserves both runtime behaviour and the computed `__all__`. Note the underscore-prefixed names currently arrive via the wildcard only because `cluster_state_contract` lists them in its own `__all__`; importing them ... (truncated) ``` from .cluster_state_contract import ( ClusterStateSummary, SignalContext, _NODE_WORKLOAD_TOP, _PROFILE_LIMIT, ) ``` ## Links - SonarQube finding: https://quality.bstein.dev/project/issues?resolved=false&id=ariadne&open=AZ2y0FYFKy9i4pkIpNlV - Full evidence bundle and audit trail live in Ariadne at `/api/admin/audit/events`, event types `hermes_autotriage_incident` and `hermes_autotriage_diagnosis`. Filed automatically by Ariadne from a Hermes Agent diagnosis (run [run_69ea5ad4d60d43ed9860639539924e5f](https://triage.bstein.dev/chat?resume=run_69ea5ad4d60d43ed9860639539924e5f)). Hermes has no write access to this repository; no files or infrastructure were changed. <!-- hermes-triage job=ariadne classification=python:S2208 incident=sonar/ariadne/python:S2208/AZ2y0FYFKy9i4pkIpNlV -->
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: titan/ariadne#134
No description provided.