Skip to content

fix(packaging): add missing hermes_state_* mixins + mini_swe_runner to py-modules (#74653) - #74682

Closed
RelaxJonh wants to merge 1 commit into
NousResearch:mainfrom
RelaxJonh:fix/py-modules-hermes-state-mini-swe
Closed

fix(packaging): add missing hermes_state_* mixins + mini_swe_runner to py-modules (#74653)#74682
RelaxJonh wants to merge 1 commit into
NousResearch:mainfrom
RelaxJonh:fix/py-modules-hermes-state-mini-swe

Conversation

@RelaxJonh

Copy link
Copy Markdown
Contributor

fix(packaging): add missing hermes_state_* mixins + mini_swe_runner to py-modules

Root Cause

Commit 21c7ae856 ("refactor: split SessionDB into Search/Schema/Portability mixins") added four new top-level modules (hermes_state_common, hermes_state_portability, hermes_state_schema, hermes_state_search) that are imported by hermes_state.py but never registered in [tool.setuptools] py-modules. Additionally, mini_swe_runner.py exists at repo root and is imported by tests but was not listed.

Impact

  • Fresh wheel/sdist installs (pip, uv, nix) fail with ModuleNotFoundError for these modules
  • TUI: hermes --tuiNo module named 'hermes_state_common'
  • Gateway: crash-loops with No module named 'hermes_state_portability'
  • SQLite session store silently disabled
  • Git installs unaffected (run from repo tree)

Fix

Add all five missing modules to the py-modules list in pyproject.toml.

Supersedes

#74492 (which added the four hermes_state_* modules but omitted mini_swe_runner)

Changes

  • pyproject.toml: Added hermes_state_common, hermes_state_portability, hermes_state_schema, hermes_state_search, mini_swe_runner to py-modules

…o py-modules (NousResearch#74653)

Commit 21c7ae8 split SessionDB into Search/Schema/Portability mixins,
adding four new top-level modules (hermes_state_common,
hermes_state_portability, hermes_state_schema, hermes_state_search)
that are imported by hermes_state.py but never registered in
[tool.setuptools] py-modules. mini_swe_runner.py also exists at repo
root and is imported by tests but was not listed.

This causes fresh wheel/sdist installs (pip, uv, nix) to fail with
ModuleNotFoundError for these modules, breaking TUI, gateway, and
SQLite session store. Git installs are unaffected since they run from
the repo tree.

Supersedes NousResearch#74492 (which added the four hermes_state_* modules but
omitted mini_swe_runner).
@x7peeps

x7peeps commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🔍 Quality Review: This PR needs regression tests to meet our quality standards. Please add focused tests covering the bug fix before merging.

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint area/install-update Installer, updater, packaging, wheels, doctor area/sessions Session lifecycle, resume, persistence, history P1 High — major feature broken, no workaround duplicate This issue or pull request already exists labels Jul 30, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #74393 for the four missing hermes_state_* declarations. This PR also adds mini_swe_runner, which can be carried into the canonical fix.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for identifying the additional root module. The current-main premise is valid: hermes_state.py:45-72 imports the four split modules, hermes_state.py:1720 composes their mixins, and pyproject.toml:349 omits all four plus mini_swe_runner from py-modules.

Problems

  • This PR adds metadata only. tests/test_packaging_build_guard.py:64-72 verifies that an allowed Nix build creates an artifact, but does not verify its module contents or manifest completeness. As noted in the discussion, #74393 is the canonical four-module patch; its proposed guard currently exempts mini_swe_runner, so carrying this addition there without changing the guard leaves the new declaration unprotected.

Suggested changes

  • Add focused package-artifact coverage here, or carry this change into #74393 and remove mini_swe_runner from that PR's unpackaged-module exemption while verifying declared modules are present in the Nix-built wheel.

Automated hermes-sweeper review.

Comment thread pyproject.toml
# Top-level single-file modules (not packages). Without this, uv2nix's
# sealed venv is missing hermes_constants, run_agent, etc.
py-modules = ["run_agent", "model_tools", "toolsets", "batch_runner", "trajectory_compressor", "toolset_distributions", "cli", "hermes_bootstrap", "hermes_constants", "hermes_state", "hermes_time", "hermes_logging", "utils", "mcp_serve"]
py-modules = ["run_agent", "model_tools", "toolsets", "batch_runner", "trajectory_compressor", "toolset_distributions", "cli", "hermes_bootstrap", "hermes_constants", "hermes_state", "hermes_state_common", "hermes_state_portability", "hermes_state_schema", "hermes_state_search", "hermes_time", "hermes_logging", "utils", "mcp_serve", "mini_swe_runner"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add focused packaging regression coverage for these declarations. Current tests/test_packaging_build_guard.py:64-72 only proves an allowed build produces an artifact; it does not verify that this manifest includes every required root module or that the wheel contains them. If this is carried into canonical #74393, also remove mini_swe_runner from that PR's proposed unpackaged-module exemption.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 30, 2026
@teknium1

teknium1 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Closing as already fixed on main: commit 36e41c0 ("fix(nix): include new flat modules at the root", #74362) added the four hermes_state_* modules to py-modules — verified present at pyproject.toml:371-374.

The remaining mini_swe_runner entry is intentionally not shipped: it has zero non-test imports in the repo, so it doesn't belong in the wheel.

Thanks for the report and the quick patch.

@teknium1 teknium1 closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install-update Installer, updater, packaging, wheels, doctor area/sessions Session lifecycle, resume, persistence, history comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P1 High — major feature broken, no workaround sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants