14 Commits

Author SHA1 Message Date
teknium1 37e4cd5faa fix(updater): a probe that cannot be spawned stays advisory instead of failing the update
bounded_probe_run collapses spawn failure and timeout into one None, so a venv
interpreter that exists but cannot be executed (PermissionError, ENOEXEC, fork
failure) was reported as "timed out before reporting import health" -- a bogus
warning on the git path and sys.exit(1) on the ZIP path -- and the
`except OSError: return {}` branch beneath it was dead. Let the Popen error
propagate (opt-in flag, default unchanged for the other probes) so "we could not
run our own probe" says nothing about the checkout and no longer blocks the
update, while a spawned child that hangs is still a verdict.

Restores the non-fatal test the earlier rewrite dropped, now driving the real
bounded_probe_run/Popen: red on the previous head, green here.

Review finding: spawn failure of the import probe reported as a fatal timeout.
2026-09-15 04:11:11 -07:00
teknium1 da1fb702c3 fix(updater): import probe children never resolve external secret sources
The critical-module import probe (`_critical_module_import_failures`) imports
`run_agent`, whose module-level `load_hermes_dotenv()` resolves every enabled
external secret source. The main-process skip only lived in `hermes_cli.main`'s
own dotenv call (`load_external_secrets=sys.argv[1:2] != ["update"]`), so the
probe child ran op/bws/command helpers with a 120s per-source budget inside the
120s probe and a healthy install reported "critical-module probe still fails to
import after updating: timed out before reporting import health" (#110823).

Move the argv check into `_early_recovery._should_skip_external_secret_sources`,
which every dotenv load already consults, and stamp `sys.argv = ['hermes',
'update']` into the probe so its imports inherit the updater contract.
Invariant test spawns the real probe against a home whose configured helper
touches a marker: red on main, green here.
2026-09-15 04:11:11 -07:00
KoNit-K e74c29de55 fix(updater): bound import probe teardown 2026-09-15 04:11:11 -07:00
Teknium a2a8207711 simplify(compat): tools/browser_tool — drop the last warm_agent_browser_npx_cache re-export, repoint 1 caller (update_cmd_deps internal import) + 1 test file
Consolidates on top of the concurrent browser_tool compat-removal commits (de60f789a7, 912a497ce2, da7ee6353e, 69eb1feb3e): the facade no longer re-exports any browser_tool_* sibling name; hermes_cli/update_cmd_deps.py's internal import (not its exported surface) and tests/hermes_cli/test_cmd_update.py patch targets now point at tools.browser_tool_install.
2026-09-03 14:27:29 -07:00
Teknium e83816a4d1 review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
2026-09-03 09:44:26 -07:00
Teknium abdf648640 refactor(hermes_cli): update_cmd_deps — reuse _pip_install_prefix, _module_importable_in probe, inline npm partial-failure notice, desktop-build retry loop, compact docstrings 2026-09-02 23:06:31 -07:00
Teknium 1767ee8119 refactor(hermes_cli): compact docstrings/comments in update_cmd*, update_abort_recovery, uninstall (keep every WHY) 2026-09-02 21:28:27 -07:00
Teknium a8e8db4fc5 refactor(hermes_cli): AST-neutral string-literal joins and import-blank squeeze in update_cmd*/uninstall 2026-09-02 21:12:29 -07:00
Teknium 882b655f21 refactor(hermes_cli): dedupe update_cmd/update_cmd_deps — _updates_config, _print_update_check_result, unified uv/pip repair+sync branches, _git_run for raw git calls, _probe_failure/_clip/_npm_lock_cache_file 2026-09-02 20:55:00 -07:00
Teknium adba16445a refactor(hermes_cli): AST-neutral layout compaction of update_cmd*/uninstall (hug brackets, pack args) 2026-09-02 20:27:53 -07:00
Teknium 60041b787a refactor(update): join short multi-line statements onto one line (AST-identical, -416 lines) 2026-09-02 16:52:38 -07:00
Teknium d46eb1f964 refactor(update): collapse 90 try/except-pass and try/except-logger.debug blocks into suppress()/_best_effort() (new leaf update_cmd_common.py) 2026-09-02 16:34:55 -07:00
Teknium a59680217f refactor(update): hand-compact comments/docstrings in split modules (AST-identical); re-export get_hermes_home/shutil; repoint source-inspection tests 2026-09-02 16:11:02 -07:00
Teknium 4674f8b254 refactor(update): split zip/stash/config/deps/git/maint clusters out of update_cmd.py 2026-09-02 16:00:26 -07:00