mozilla / mozilla/bugbug

Give each action handler its own instance instead of a shared singleton

Open Beginner friendly
#6,625 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

hackbot
Dominant language
Python
Stars
570
Forks
351
Avg merge
2d 13h
Merged PRs (30d)
65

Description

libs/hackbot-runtime/hackbot_runtime/actions/handlers/registry.py builds a single HANDLERS dict at import time, with one shared instance per action type used across all runs. Change this so each action type gets its own handler instance rather than a shared singleton.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in libs/hackbot-runtime/hackbot_runtime/actions/handlers/registry.py, where the HANDLERS dictionary is built at import time, then inspect how action handlers are retrieved and used across runs. The work is done when each action type receives its own handler instance instead of sharing a singleton, with existing runtime tests still passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.