[hermes] ariadne: python:S2208 #13

Open
opened 2026-09-23 01:20:17 +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

The wildcard import hides which names this module depends on and imports into its namespace. Replacing it with only the two constants used in the function bodies could change behavior because the final dynamic all also re-exports imported names.

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 wildcard import with explicit imports. The snippet identifies the two dependencies visible in the function bodies, but before applying it, expand this import to include every other name currently imported from cluster_state_contract: imported names can be accessed as module attributes, and underscored names plus ClusterStateSummary and SignalContext can also be re-exported by the existing all. Keep the functions and final all unchanged. The contract file was not supplied, so the complete behavior-preserving import list cannot be determined from this file alone.

from .cluster_state_contract import (
    _NODE_WORKLOAD_TOP,
    _PROFILE_LIMIT,
)

Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_b926160a3c89487a8e09f45bf7d706ec). 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 The wildcard import hides which names this module depends on and imports into its namespace. Replacing it with only the two constants used in the function bodies could change behavior because the final dynamic __all__ also re-exports imported names. 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 wildcard import with explicit imports. The snippet identifies the two dependencies visible in the function bodies, but before applying it, expand this import to include every other name currently imported from cluster_state_contract: imported names can be accessed as module attributes, and underscored names plus ClusterStateSummary and SignalContext can also be re-exported by the existing __all__. Keep the functions and final __all__ unchanged. The contract file was not supplied, so the complete behavior-preserving import list cannot be determined from this file alone. ``` from .cluster_state_contract import ( _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_b926160a3c89487a8e09f45bf7d706ec](https://triage.bstein.dev/chat?resume=run_b926160a3c89487a8e09f45bf7d706ec)). 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#13
No description provided.