Skip to content

fix(kanban): restore HERMES_KANBAN_BOARD after scoped slash override#23252

Closed
Sylw3ster wants to merge 1 commit into
NousResearch:mainfrom
Sylw3ster:fix/kanban-scoped-board-override-leak
Closed

fix(kanban): restore HERMES_KANBAN_BOARD after scoped slash override#23252
Sylw3ster wants to merge 1 commit into
NousResearch:mainfrom
Sylw3ster:fix/kanban-scoped-board-override-leak

Conversation

@Sylw3ster

Copy link
Copy Markdown
Contributor

Summary

This fixes a kanban board-state leak in in-process /kanban calls.

When kanban_command() handled --board <slug>, it set HERMES_KANBAN_BOARD
but did not restore the previous value afterwards. That was invisible in
one-shot CLI subprocesses, but it could leak across calls in long-lived
processes like the gateway, causing later implicit kanban operations to resolve
against the wrong board.

What changed

  • snapshot the previous HERMES_KANBAN_BOARD value before applying a scoped
    --board override
  • restore the previous value after command dispatch, including early-return
    paths
  • add a regression test covering the in-process run_slash("--board ...")
    flow

Why this matters

The kanban CLI comments already describe --board as a per-call override.
Without restoration, a single board-scoped slash command could poison ambient
board resolution for later calls in the same process.

That is especially relevant for the gateway, where /kanban uses the shared
run_slash() path inside a long-lived process.

Testing

Fail-first regression test added first:

  • python -m pytest -o addopts='' tests/hermes_cli/test_kanban_cli.py -k board_override_restores_prior_env -q

Additional targeted verification:

  • python -m pytest -o addopts='' tests/hermes_cli/test_kanban_cli.py tests/hermes_cli/test_pin_kanban_board_env.py tests/hermes_cli/test_kanban_boards.py -k 'board_override_restores_prior_env or pin_ or connect_without_args_uses_current or connect_env_var_overrides_current or file_pointer_honoured or env_beats_file or invalid_env_falls_through' -q

Risk

Low.

The change does not alter board resolution during the command itself; it only
restores prior process state after a scoped override finishes.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins comp/cli CLI entry point, hermes_cli/, setup wizard labels May 10, 2026
kshitijk4poor added a commit that referenced this pull request May 11, 2026
For PRs #23206 (Frowtek), #23252 (Sylw3ster), #23358 (dmnkhorvath),
#23659 (smwbev), and #23356 (TurgutKural) — all part of the kanban
bug-fix batch salvage.
@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Merged via salvage PR #23791. Your commits were cherry-picked onto current main with your authorship preserved in git log. Thanks for the fix!

rmulligan pushed a commit to rmulligan/hermes-agent that referenced this pull request May 11, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath),
NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban
bug-fix batch salvage.
JinyuID pushed a commit to JinyuID/hermes-agent that referenced this pull request May 11, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath),
NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban
bug-fix batch salvage.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath),
NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban
bug-fix batch salvage.
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath),
NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban
bug-fix batch salvage.
AlexFoxD pushed a commit to AlexFoxD/hermes-agent that referenced this pull request May 21, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath),
NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban
bug-fix batch salvage.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath),
NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban
bug-fix batch salvage.
Seven74AI pushed a commit to Seven74AI/hermes-agent that referenced this pull request Jun 13, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath),
NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban
bug-fix batch salvage.
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 comp/plugins Plugin system and bundled plugins 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