Skip to content

fix(dashboard): guard update endpoint in Docker with structured guidance (salvage #34831) - #36263

Merged
benbarclay merged 3 commits into
mainfrom
fix/dashboard-update-guard-docker-salvage-34831
Jun 1, 2026
Merged

fix(dashboard): guard update endpoint in Docker with structured guidance (salvage #34831)#36263
benbarclay merged 3 commits into
mainfrom
fix/dashboard-update-guard-docker-salvage-34831

Conversation

@benbarclay

Copy link
Copy Markdown
Collaborator

Summary

Salvage of #34831 (@donovan-yohan) — rebased onto current main with the trivial merge conflict resolved.

The dashboard's POST /api/hermes/update endpoint shelled out to hermes update unconditionally. Inside a Docker container that's an immutable image — the update can't apply, and the WebUI surfaced a raw SystemExit (#34347) while the user's real fix is docker pull (#35835).

This guards the endpoint: when detect_install_method() reports a docker install, it records a structured "not supported, run <command> instead" result (no subprocess spawned) and returns it to the WebUI, which renders actionable guidance instead of crashing.

Why a salvage

#34831 (donovan-yohan, the original) and #35339 (a byte-identical re-open) both conflicted against main — but only in tests/hermes_cli/test_web_server.py, where the new tests landed adjacent to other test additions made since. The production changes (web_server.py, web/src/lib/api.ts) auto-merged cleanly. This branch rebases onto current main and resolves the test conflict by keeping both test blocks.

Authorship preserved via Co-authored-by: Donovan Yohan.

Verification

  • Full tests/hermes_cli/test_web_server.py suite passes (191 tested), including the 5 dashboard-update-guard tests.
  • Dependencies (detect_install_method, format_docker_update_message, recommended_update_command_for_method) already present in hermes_cli/config.py.

Closes #34831. Closes #35339.

donovan-yohan and others added 3 commits May 29, 2026 19:50
…nce (salvage #34831)

Salvage of #34831 (@donovan-yohan), rebased onto current main with the
trivial test-file merge conflict resolved (the new tests landed adjacent
to other test additions in test_web_server.py; kept both).

The dashboard's POST /api/hermes/update endpoint shelled out to
`hermes update` unconditionally. Inside a Docker container that is an
immutable image — the update can't apply, and the WebUI surfaced a raw
SystemExit (#34347) while the user's real fix is `docker pull` (#35835).

This guards the endpoint: when detect_install_method() reports a docker
install, it records a structured 'not supported, run <command> instead'
result (no subprocess spawned) and returns it to the WebUI, which renders
actionable guidance instead of a crash.

Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: fix/dashboard-update-guard-docker-salvage-34831 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: 9572 on HEAD, 9572 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4961 pre-existing issues carried over.

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

@benbarclay
benbarclay merged commit c1a531d into main Jun 1, 2026
21 of 23 checks passed
@benbarclay
benbarclay deleted the fix/dashboard-update-guard-docker-salvage-34831 branch June 1, 2026 05:39
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard area/docker Docker image, Compose, packaging labels Jun 1, 2026
benbarclay added a commit that referenced this pull request Jun 2, 2026
…lure (#34347) (#37085)

The dashboard Update button's backend guard (#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes #34347.
changman pushed a commit to changman/hermes-agent that referenced this pull request Jun 10, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
alt-glitch pushed a commit that referenced this pull request Jun 14, 2026
…nce (salvage #34831) (#36263)

* fix: guard dashboard update in Docker

* fix(dashboard): align action response type

---------

Co-authored-by: Donovan Yohan <donovan-yohan@users.noreply.github.com>
Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
alt-glitch pushed a commit that referenced this pull request Jun 14, 2026
…lure (#34347) (#37085)

The dashboard Update button's backend guard (#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes #34347.
kossteg pushed a commit to kossteg/hermes-agent that referenced this pull request Jun 16, 2026
…nce (salvage NousResearch#34831) (NousResearch#36263)

* fix: guard dashboard update in Docker

* fix(dashboard): align action response type

---------

Co-authored-by: Donovan Yohan <donovan-yohan@users.noreply.github.com>
Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
kossteg pushed a commit to kossteg/hermes-agent that referenced this pull request Jun 16, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
T02200059 pushed a commit to T02200059/hermes-agent that referenced this pull request Jun 18, 2026
…nce (salvage NousResearch#34831) (NousResearch#36263)

* fix: guard dashboard update in Docker

* fix(dashboard): align action response type

---------

Co-authored-by: Donovan Yohan <donovan-yohan@users.noreply.github.com>
Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
T02200059 pushed a commit to T02200059/hermes-agent that referenced this pull request Jun 18, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
xyshanren pushed a commit to xyshanren/hermes-agent-cn that referenced this pull request Jun 25, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…nce (salvage NousResearch#34831) (NousResearch#36263)

* fix: guard dashboard update in Docker

* fix(dashboard): align action response type

---------

Co-authored-by: Donovan Yohan <donovan-yohan@users.noreply.github.com>
Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…nce (salvage NousResearch#34831) (NousResearch#36263)

* fix: guard dashboard update in Docker

* fix(dashboard): align action response type

---------

Co-authored-by: Donovan Yohan <donovan-yohan@users.noreply.github.com>
Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
donbowman pushed a commit to donbowman/hermes-agent that referenced this pull request Jul 13, 2026
…nce (salvage NousResearch#34831) (NousResearch#36263)

* fix: guard dashboard update in Docker

* fix(dashboard): align action response type

---------

Co-authored-by: Donovan Yohan <donovan-yohan@users.noreply.github.com>
Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
donbowman pushed a commit to donbowman/hermes-agent that referenced this pull request Jul 13, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…nce (salvage NousResearch#34831) (NousResearch#36263)

* fix: guard dashboard update in Docker

* fix(dashboard): align action response type

---------

Co-authored-by: Donovan Yohan <donovan-yohan@users.noreply.github.com>
Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…nce (salvage NousResearch#34831) (NousResearch#36263)

* fix: guard dashboard update in Docker

* fix(dashboard): align action response type

---------

Co-authored-by: Donovan Yohan <donovan-yohan@users.noreply.github.com>
Co-authored-by: Donovan Yohan <34756395+donovan-yohan@users.noreply.github.com>
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…lure (NousResearch#34347) (NousResearch#37085)

The dashboard Update button's backend guard (NousResearch#36263) already returns a
structured {ok:false, error:"docker_update_unsupported", message,
update_command} envelope (HTTP 200) when running in a Docker install,
instead of surfacing a raw SystemExit. But the frontend ignored that
envelope: runAction() only branched on a thrown error, so the 200 fell
through to the action-status poll, which reported a generic
"Action failed (exit 1)" toast and never showed the actual guidance.

Now runAction() inspects the update response and, on the
docker_update_unsupported case, surfaces the backend's guidance message
plus the recommended re-pull command directly (success-styled, since it's
actionable guidance — not a crash) without starting the poll.

Closes NousResearch#34347.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docker Docker image, Compose, packaging comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants