[hermes] atlasbot: python:S1871 #123
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, the if/elif pair at lines 167-170 both simply execute
should_send = True, so the branches are identical and Sonar flags the duplication. The two conditions should be combined withorinto a single branch since there is no behavioral difference between them.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— Lines 168 and 170 both set should_send = True, making the if/elif split pointless duplication. Combining the two conditions withorinto one if-statement preserves the exact same truth table (should_send becomes True when either condition holds, otherwise stays False) while eliminating the identical branch bodies.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_53940f7c89ff408db03dc4f199aa89df). Hermes has no write access to this repository; no files or infrastructure were changed.