HWP Supervisor type checking and refactoring
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17
- Forks
- 20
- Avg merge
- 1h 22m
- Merged PRs (30d)
- 2
Description
The HWP supervisor agent has grown a lot since its initial release do to features required for field usage, and has become difficult to navigate.
I think it would benefit a lot from a focused refactoring to clean up its structure, and add proper type hints for more complete static type checking. If I were to do such a refactor, I'd want to do the following...
- Use a dedicated configuration object to control parameters such as instance ids and
pid_max_time_since_last_update. Currently I've just thrown many of these into the HWP state object because that is accessible from many different parts of the code, but this should be put into a dedicated cfg class.- I would also want to switch from using command line arguments to a yaml file, since the number of arguments has grown to ~30 which is a bit unwieldy.
- Move the HWP state and the control state-machine functionality to separate modules, for better delineation between their logic.
- Complete static type checking. This may require some small structural changes, but because the module is so large and difficult to test I think this would be invaluable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the HWP supervisor agent and reading its current state, command-line configuration, and control state-machine entry points. The refactor would be complete when configuration is dedicated and YAML-based, state and control logic are separated, and the supervisor passes comprehensive static type checking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100