Skip to content

fix(kanban): ignore stale current board pointers (salvages #20063) - #20183

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-9ddf5187
May 5, 2026
Merged

fix(kanban): ignore stale current board pointers (salvages #20063)#20183
teknium1 merged 2 commits into
mainfrom
hermes/hermes-9ddf5187

Conversation

@teknium1

@teknium1 teknium1 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Stale <root>/kanban/current pointers no longer make hermes kanban boards show / stats / list silently synthesize and create a phantom board directory for a slug that was never created.

Salvaged from #20063 (@steezkelly).

Root cause: get_current_board() read the <root>/kanban/current file and returned its slug without checking whether that board actually existed on disk. Downstream callers (read_board_metadata, connect) happily synthesized metadata and created the DB directory for the missing slug, so a hand-edited or leftover pointer made it look like a real active board.

Changes

  • hermes_cli/kanban_db.py: get_current_board() now gates the file-pointer branch on board_exists(normed). Stale slugs fall through to DEFAULT_BOARD. Env var (HERMES_KANBAN_BOARD) still wins as before, even against a stale file.
  • tests/hermes_cli/test_kanban_boards.py: new test_stale_file_pointer_falls_back_to_default covers the regression.
  • scripts/release.py: AUTHOR_MAP entry for @steezkelly.

Validation

Before After
Stale current pointing at missing-board get_current_board() → "missing-board", boards show synthesizes metadata, stats/list creates kanban/boards/missing-board/kanban.db, boards list shows it as active get_current_board() → "default", no synthesis, no directory creation, list_boards()["default"]
Env var HERMES_KANBAN_BOARD=x with stale file env wins env still wins (unchanged)
hermes kanban boards switch <slug> already validated board_exists, unaffected unchanged
Targeted tests - 247/247 pass (test_kanban_{boards,db,cli,core_functionality})
E2E repro from issue #20055 phantom missing-board board synthesized clean fallback to default, no directory created

Closes #20055

Co-authored-by: Steve Kelly stevekelly622@gmail.com

@teknium1
teknium1 merged commit d472d69 into main May 5, 2026
10 of 11 checks passed
@teknium1
teknium1 deleted the hermes/hermes-9ddf5187 branch May 5, 2026 11:34
@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 5, 2026
ahmadashfq added a commit to ahmadashfq/hermes-agent that referenced this pull request Aug 4, 2026
…xistent board

HERMES_KANBAN_BOARD (and the scoped_current_board override) naming a
board with no directory under boards_root() used to fall through
silently to the on-disk current pointer and then 'default' — explicit
intent got redirected to another board's DB with no error. Observed
2026-07-16: HERMES_KANBAN_BOARD=fleet-infra 'hermes kanban create'
placed cards on the default board because fleet-infra had been archived
to boards/_archived/.

Explicit selections (env var, scoped override) now raise the new
BoardNotFoundError with remediation hints. The ambient <root>/kanban/
current pointer keeps its fall-through (upstream PR NousResearch#20183 behaviour —
hand-edited/stale files must not crash the dispatcher) but now warns on
stderr instead of falling back silently.

Same failure family as the HERMES_HOME silent-profile-fallback fix
(registry: hermes-cli-no-hermes-home-scoped-resolution).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Hafiz Ahmad Ashfaq <28647270+ahmadashfq@users.noreply.github.com>
Signed-off-by: Hafiz Ahmad Ashfaq <28647270+ahmadashfq@users.noreply.github.com>
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.

Kanban should not silently synthesize/create boards from a stale current-board pointer

3 participants