[hermes] atlasbot: python:S1871 #47
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SonarQube reports python:S1871 in
atlasbot/matrix/bot.py. The build is green; this is a standing finding, not a failure.What is wrong
In MatrixBot._answer_with_heartbeat's heartbeat() closure, the
if snippet and snippet != last_note:branch (line 168) and theelif now - last_sent >= max(60.0, self._settings.thinking_interval_sec * 2):branch (line 170) both execute the identical statementshould_send = True, so the branch structure adds no differentiation and should be collapsed into one condition.Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
atlasbot/matrix/bot.py:170)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.
atlasbot/matrix/bot.py— Both conditions lead to the same outcome (should_send = True), which is exactly what S1871 flags. Combining them withorinto a single if-statement keeps the truth table identical (should_send is True whenever either condition holds, False otherwise) while removing the duplicated branch body.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_1178e06f0fee4c2a85a5d37c96cb7b58). Hermes has no write access to this repository; no files or infrastructure were changed.