fix: declare four missing hermes_state_* modules in py-modules - #74393
fix: declare four missing hermes_state_* modules in py-modules#74393cat-thats-fat wants to merge 3 commits into
Conversation
hermes_state.py imports hermes_state_common, hermes_state_portability, hermes_state_schema, and hermes_state_search, but none were listed in [tool.setuptools].py-modules. Every wheel-based install silently loses session persistence — no --continue, no --resume, no session search. Added the four modules and reformatted the list from a single line to sorted multi-line for readability. Added a CI guard test that asserts every installable root .py module is declared in py-modules, so this class of drift can't recur.
|
Thanks for the focused packaging fix. Current main still has the reported defect: Automated hermes-sweeper review. |
# Conflicts: # pyproject.toml
|
Current |
|
fixed in #74362 |
Summary
Fixes #74287 —
hermes_state.pyimports four sibling modules that were never declared in[tool.setuptools].py-modules, so the session store is silently dead on every wheel-based install.Root Cause
hermes_state.py:45,70-72imports fromhermes_state_common,hermes_state_portability,hermes_state_schema, andhermes_state_search, butpyproject.tomlline 348 only listedhermes_state. These four modules were absent from the built wheel, causingModuleNotFoundErroron import.The shipped error message suggests
hermes updateto rebuild the venv — which can't help because the modules are missing from the distribution itself, not from the venv.Changes
pyproject.tomlpy-modulestests/test_packaging_build_guard.pytest_py_modules_cover_installable_root_modules— asserts every installable root.pymodule is declared inpy-modules, and the list stays sortedtest_wheel_contains_every_declared_py_module— verifies the built wheel actually ships every declared moduleALLOW_UNPACKAGED_ROOT_MODULESallowlist for intentional exclusions (mini_swe_runner,setup)Verification
hermes_state*modules import successfullypy-modulesmap to existing.pyfiles