fix(cli): check hermes_cli/web_dist/ not web/dist/ for build staleness (fixes #14914 regression)#15863
Closed
georgeglessner wants to merge 1 commit into
Closed
Conversation
_web_ui_build_needed() in PR NousResearch#14914 checked web_dir/"dist" as the sentinel, but vite.config.ts sets outDir: "../hermes_cli/web_dist" so the build output lands in hermes_cli/web_dist/, never in web/dist/. The sentinel was therefore always missing → _web_ui_build_needed always returned True → npm install + Vite build ran on every startup → OOM on low-memory VPS persisted unchanged. Fix: derive dist_dir as web_dir.parent / "hermes_cli" / "web_dist" so the sentinel points to the actual build output directory. Fixes NousResearch#14898
This was referenced Apr 27, 2026
Author
|
merged in #16292 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
PR #14914 introduced
_web_ui_build_needed()to skip thenpm install+ Vite rebuild when the dist is already fresh. However, it contains a path bug that makes the fix a complete no-op:web_dirisPROJECT_ROOT/web/. Butvite.config.tssets:So the actual build output lands in
hermes_cli/web_dist/, never inweb/dist/. The sentinel is always missing →_web_ui_build_neededalways returnsTrue→ the full npm build runs on every startup → OOM on low-memory VPS is unchanged.This PR fixes the sentinel path:
Related Issues
Fixes #14898
Supersedes / fixes the regression in #14914
Changes
hermes_cli/main.py:_web_ui_build_needed()usesweb_dir.parent / "hermes_cli" / "web_dist"asdist_dirtests/hermes_cli/test_web_ui_build.py: 11 tests including a dedicated regression test (test_web_dist_dir_not_web_dist_subdir) that would have caught the fix(cli): skip web UI rebuild when dist/ is present and sources are unchanged #14914 bugHow to Test
pytest tests/hermes_cli/test_web_ui_build.py -v # 11 passedEnd-to-end: run
hermes dashboardonce to build, then run again — second startup skips npm entirely.