Skip to content

fix(tools): run _run_post_setup() in _reconfigure_provider() for parity (salvage #26642) - #27306

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-a449f95f
May 17, 2026
Merged

fix(tools): run _run_post_setup() in _reconfigure_provider() for parity (salvage #26642)#27306
teknium1 merged 2 commits into
mainfrom
hermes/hermes-a449f95f

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Salvage of #26642_reconfigure_provider() skipped the _run_post_setup() call that _configure_provider() runs on first-time setup (line 2286). For providers with both env vars AND a post-setup hook (Browserbase, Browser Use, Firecrawl, Camofox), reconfiguring via hermes tools saved the env values but never ran npm install — the browser tool then failed silently at runtime.

_run_post_setup() handles auto-install for browser node deps, Chromium, Camoufox engine, local TTS engines, etc. — see hermes_cli/tools_config.py:671. Without it, reconfigure is half a setup.

Changes

  • hermes_cli/tools_config.py — 3-line parity fix in _reconfigure_provider().
  • tests/hermes_cli/test_tools_config.py — parametrized test asserting post_setup fires for the four affected browser providers.

Validation

  • scripts/run_tests.sh tests/hermes_cli/test_tools_config.py -q → 70/70 pass.
  • ruff check clean.

Original PR: #26642 — credit preserved via rebase-merge.

EloquentBrush0x and others added 2 commits May 16, 2026 23:08
…viders

_configure_provider() calls _run_post_setup() after collecting env vars
(line 2286). _reconfigure_provider() did not — providers with both
env_vars and post_setup (Browserbase, Browser Use, Firecrawl, Camofox)
skipped the installation step on reconfiguration.

Fix: mirror the _configure_provider() call. post_setup hooks are
idempotent (check before installing), so no behaviour change for users
who already have the dependencies installed.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-a449f95f vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8358 on HEAD, 8356 on base (🆕 +2)

🆕 New issues (1):

Rule Count
invalid-argument-type 1
First entries
tests/hermes_cli/test_tools_config.py:1016: [invalid-argument-type] invalid-argument-type: Argument to function `_reconfigure_provider` is incorrect: Expected `dict[Unknown, Unknown]`, found `str | dict[str, str | list[Unknown] | bool | list[str]] | dict[str, str | list[Unknown]] | dict[str, str | list[dict[str, str]]] | Unknown`

✅ Fixed issues: none

Unchanged: 4370 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@cardtest15-coder

This comment was marked as spam.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard tool/browser Browser automation (CDP, Playwright) P2 Medium — degraded but workaround exists labels May 17, 2026
@teknium1
teknium1 merged commit cc59880 into main May 17, 2026
20 of 21 checks passed
@teknium1
teknium1 deleted the hermes/hermes-a449f95f branch May 17, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists tool/browser Browser automation (CDP, Playwright) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants