cleanup: remove dead maintenance mode artifacts in bot.py #104

Closed
opened 2026-03-20 15:16:07 +00:00 by cal · 1 comment
Owner

Context

PR #83 added MaintenanceAwareTree as a subclass wired via tree_cls, which is the correct approach. However, two artifacts from the old implementation were left behind and have been flagged across multiple PR reviews (#84, #102, #103).

Issues

1. Dead @self.tree.interaction_check decorator block (lines 129–143)

The old decorator-based maintenance check in setup_hook is still present. It does nothing useful since MaintenanceAwareTree.interaction_check() handles this now, but it generates a RuntimeWarning at startup.

Fix: Delete the block.

2. Duplicate self.maintenance_mode assignment (lines 121 and 123)

self.maintenance_mode: bool = False is assigned twice in SBABot.__init__ — a merge artifact from PR #83.

Fix: Remove the duplicate line.

Scope

Two small deletions in bot.py. No behavioral change.

## Context PR #83 added `MaintenanceAwareTree` as a subclass wired via `tree_cls`, which is the correct approach. However, two artifacts from the old implementation were left behind and have been flagged across multiple PR reviews (#84, #102, #103). ## Issues ### 1. Dead `@self.tree.interaction_check` decorator block (lines 129–143) The old decorator-based maintenance check in `setup_hook` is still present. It does nothing useful since `MaintenanceAwareTree.interaction_check()` handles this now, but it generates a `RuntimeWarning` at startup. **Fix:** Delete the block. ### 2. Duplicate `self.maintenance_mode` assignment (lines 121 and 123) `self.maintenance_mode: bool = False` is assigned twice in `SBABot.__init__` — a merge artifact from PR #83. **Fix:** Remove the duplicate line. ## Scope Two small deletions in `bot.py`. No behavioral change.
Claude added the
ai-working
status/in-progress
labels 2026-03-20 15:31:29 +00:00
Claude removed the
status/in-progress
label 2026-03-20 15:33:13 +00:00
Collaborator

Opened PR #105: #105

Fixed both artifacts:

  1. Removed duplicate self.maintenance_mode: bool = False (second assignment on line 123)
  2. Deleted dead @self.tree.interaction_check block (16 lines) from setup_hookMaintenanceAwareTree already handles this via tree_cls

All 8 maintenance tree tests pass.

Opened PR #105: https://git.manticorum.com/cal/major-domo-v2/pulls/105 Fixed both artifacts: 1. Removed duplicate `self.maintenance_mode: bool = False` (second assignment on line 123) 2. Deleted dead `@self.tree.interaction_check` block (16 lines) from `setup_hook` — `MaintenanceAwareTree` already handles this via `tree_cls` All 8 maintenance tree tests pass.
Claude added
status/pr-open
ai-pr-opened
and removed
ai-working
labels 2026-03-20 15:33:34 +00:00
cal closed this issue 2026-03-20 17:49:42 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/major-domo-v2#104
No description provided.