[hermes] ariadne #5: python:S2208 #7

Open
opened 2026-08-07 08:18:10 +00:00 by bstein · 0 comments
Owner

Hermes auto-triage classified incident sonar/ariadne/python:S2208/AZ2y0FYFKy9i4pkIpNlV as python:S2208 (confidence n/a); first failed gate: unknown.

Why a human is needed

The module uses a wildcard import from cluster_state_contract, which obscures its actual dependencies. Importing the specific constants and re-exported types preserves all current behavior while making those dependencies explicit.

Ariadne did not authorize automated remediation: 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 the two constants used by this module and the two types intentionally exposed through all. This fixes S2208 without changing runtime behavior or the module's public exports.

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

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

Hermes auto-triage classified incident `sonar/ariadne/python:S2208/AZ2y0FYFKy9i4pkIpNlV` as **python:S2208** (confidence n/a); first failed gate: `unknown`. ## Why a human is needed The module uses a wildcard import from cluster_state_contract, which obscures its actual dependencies. Importing the specific constants and re-exported types preserves all current behavior while making those dependencies explicit. Ariadne did not authorize automated remediation: `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 the two constants used by this module and the two types intentionally exposed through __all__. This fixes S2208 without changing runtime behavior or the module's public exports. ``` from .cluster_state_contract import ( ClusterStateSummary, SignalContext, _NODE_WORKLOAD_TOP, _PROFILE_LIMIT, ) ``` ## Links - Failed build: 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_d2203531510146539204e791e29436b6](https://agent.bstein.dev/chat?resume=run_d2203531510146539204e791e29436b6)). 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: bstein/ariadne#7
No description provided.