hermes - ✅(Solved) Fix Kanban should not silently synthesize/create boards from a stale current-board pointer [3 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#20055Fetched 2026-05-06 06:38:59
View on GitHub
Comments
0
Participants
1
Timeline
8
Reactions
0
Participants
Timeline (top)
cross-referenced ×4labeled ×3closed ×1

Error Message

  1. warn and fall back to default, optionally clearing the stale current pointer, or
  2. return a clear error:

Root Cause

The dashboard and CLI rely on current-board state as the user-facing active workspace. If the pointer drifts to a missing/experimental board slug, users can end up looking at an empty synthetic board and think their real board/tasks disappeared. In a multi-agent Kanban workflow, that is a data-integrity and operator-confidence problem.

Fix Action

Fixed

PR fix notes

PR #20063: fix(kanban): ignore stale current board pointers

Description (problem / solution / changelog)

Summary

  • Ignore stale <root>/kanban/current board pointers when resolving the active board
  • Fall back to default instead of treating a missing board slug as active
  • Add regression coverage so read/list flows do not synthesize a missing board from a stale pointer

Fixes #20055

Test Plan

  • venv/bin/python -m pytest tests/hermes_cli/test_kanban_boards.py::TestCurrentBoard::test_stale_file_pointer_falls_back_to_default -q -o 'addopts='
  • venv/bin/python -m pytest tests/hermes_cli/test_kanban_boards.py -q -o 'addopts='
  • venv/bin/python -m pytest tests/hermes_cli/test_kanban_db.py tests/hermes_cli/test_kanban_cli.py tests/hermes_cli/test_kanban_core_functionality.py tests/tools/test_kanban_tools.py tests/plugins/test_kanban_dashboard_plugin.py -q -o 'addopts='
  • venv/bin/python -m py_compile hermes_cli/kanban_db.py tests/hermes_cli/test_kanban_boards.py

Changed files

  • hermes_cli/kanban_db.py (modified, +5/-5)
  • tests/hermes_cli/test_kanban_boards.py (modified, +9/-0)

PR #20069: fix(cli): validate kanban current-board pointer to stop silent synth/create

Description (problem / solution / changelog)

Stop kanban from silently synthesizing/creating a board when <root>/kanban/current points at a missing slug.

What changed and why

  • hermes_cli/kanban_db.py::get_current_board() now validates the on-disk pointer via board_exists() and falls back to default (with a deduped stderr warning) when the slug doesn't resolve. Previously the slug was returned unchecked, so downstream kb.connect() calls would mkdir the board directory and sqlite3.connect() would create the DB file — making the missing slug appear in boards list as a real, active workspace and hiding the user's real boards behind a synthetic empty one.
  • The pointer file itself is left in place. Users can recover their selection by running hermes kanban boards create <slug> and the next read honours the pointer again.
  • HERMES_KANBAN_BOARD env-var resolution is intentionally not validated: it's written by the dispatcher on worker spawn (which already knows the board exists), so a runtime existence check there would only mask dispatcher bugs.
  • Added five unit tests in tests/hermes_cli/test_kanban_boards.py::TestStaleCurrentBoardPointer covering: fallback to default, warning dedupe within a process, no implicit board-directory creation through kb.connect(), recovery via boards create, and absence from list_boards().

How to test

  • Reproduce the issue's exact scenario:
    tmp=$(mktemp -d)
    mkdir -p "$tmp/kanban"
    printf 'missing-board\n' > "$tmp/kanban/current"
    HERMES_HOME="$tmp" hermes kanban boards show
    HERMES_HOME="$tmp" hermes kanban stats
    HERMES_HOME="$tmp" hermes kanban list
    HERMES_HOME="$tmp" hermes kanban boards list
    find "$tmp/kanban" -mindepth 1
    After the fix, every command emits the stale-pointer warning and reports default. kanban/boards/missing-board/ is never created.
  • Run the kanban suite: pytest tests/hermes_cli/test_kanban_boards.py -q (54 passed locally).

What platforms tested on

  • macOS on darwin-arm64 (local)

Fixes #20055

<!-- autocontrib:worker-id=issue-new-e9c1271a kind=pr-open -->

Changed files

  • hermes_cli/kanban_db.py (modified, +29/-1)
  • tests/hermes_cli/test_kanban_boards.py (modified, +62/-0)

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

Description (problem / solution / changelog)

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

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

Closes #20055

Co-authored-by: Steve Kelly [email protected]

Changed files

  • hermes_cli/kanban_db.py (modified, +5/-5)
  • scripts/release.py (modified, +1/-0)
  • tests/hermes_cli/test_kanban_boards.py (modified, +9/-0)

Code Example

tmp=$(mktemp -d)
mkdir -p "$tmp/kanban"
printf 'missing-board\n' > "$tmp/kanban/current"

HERMES_HOME="$tmp" hermes kanban boards show
HERMES_HOME="$tmp" hermes kanban stats
HERMES_HOME="$tmp" hermes kanban list
HERMES_HOME="$tmp" hermes kanban boards list

---

Current board: missing-board
  Display name: Missing Board
  DB path:      /tmp/.../kanban/boards/missing-board/kanban.db
  Tasks:        0 total

---

kanban/boards/missing-board/kanban.db

---

SLUG                      NAME                          COUNTS
    default                   Default                       (empty)
●   missing-board             Missing Board                 (empty)

Current board: missing-board

---

current board 'missing-board' does not exist; create it with `hermes kanban boards create missing-board` or switch back with `hermes kanban boards switch default`
RAW_BUFFERClick to expand / collapse

Bug Description

Kanban can silently treat a stale <root>/kanban/current board pointer as a real board. Some commands synthesize metadata for the missing slug, and other commands can create an empty board directory/DB implicitly. This makes a stale or corrupted current-board pointer look like a valid active board instead of warning and falling back to default or requiring explicit board creation.

Reproduction

Run in an isolated Hermes home:

tmp=$(mktemp -d)
mkdir -p "$tmp/kanban"
printf 'missing-board\n' > "$tmp/kanban/current"

HERMES_HOME="$tmp" hermes kanban boards show
HERMES_HOME="$tmp" hermes kanban stats
HERMES_HOME="$tmp" hermes kanban list
HERMES_HOME="$tmp" hermes kanban boards list

Actual Behavior

boards show exits 0 and reports a synthesized board even though it was never created:

Current board: missing-board
  Display name: Missing Board
  DB path:      /tmp/.../kanban/boards/missing-board/kanban.db
  Tasks:        0 total

After running stats, list, or boards list, Hermes creates the missing board path implicitly:

kanban/boards/missing-board/kanban.db

boards list then presents the stale slug as active:

    SLUG                      NAME                          COUNTS
    default                   Default                       (empty)
●   missing-board             Missing Board                 (empty)

Current board: missing-board

Expected Behavior

If <root>/kanban/current points to a board that does not exist, Kanban should not silently synthesize or create it during read/list/stats operations.

Prefer one of these behaviors:

  1. warn and fall back to default, optionally clearing the stale current pointer, or
  2. return a clear error:
current board 'missing-board' does not exist; create it with `hermes kanban boards create missing-board` or switch back with `hermes kanban boards switch default`

Only hermes kanban boards create <slug> should create a new board.

Code Path / Evidence

The behavior appears to come from the interaction of:

  • hermes_cli/kanban_db.py::get_current_board() returning the normalized slug from <root>/kanban/current without checking board_exists().
  • hermes_cli/kanban_db.py::read_board_metadata() synthesizing metadata for any slug.
  • commands such as stats / list resolving the active board through get_current_board(), then connecting to that board DB path.

hermes kanban boards switch <slug> already validates board_exists() and rejects missing boards, but a stale current pointer bypasses that protection.

Why This Matters

The dashboard and CLI rely on current-board state as the user-facing active workspace. If the pointer drifts to a missing/experimental board slug, users can end up looking at an empty synthetic board and think their real board/tasks disappeared. In a multi-agent Kanban workflow, that is a data-integrity and operator-confidence problem.

Environment

  • Hermes Agent v0.12.0 (2026.4.30)
  • Source commit: b816fd4e2
  • OS: Linux desktop 6.17.0-22-generic x86_64
  • Python: 3.11.15

extent analysis

TL;DR

The most likely fix is to modify hermes_cli/kanban_db.py to check if a board exists before returning its metadata, preventing the synthesis of missing boards.

Guidance

  • Modify get_current_board() in hermes_cli/kanban_db.py to check if the board exists using board_exists() before returning the normalized slug.
  • Update read_board_metadata() to return an error if the board does not exist, instead of synthesizing metadata.
  • Consider adding a warning or error message when a stale current pointer is detected, and provide instructions on how to create the missing board or switch to the default board.
  • Review the code paths of stats, list, and boards list commands to ensure they handle missing boards correctly and do not create them implicitly.

Example

def get_current_board():
    # ...
    slug = normalize_slug(current_board_slug)
    if not board_exists(slug):
        raise ValueError(f"Board '{slug}' does not exist")
    return slug

Notes

The provided code snippet is a suggestion and may require adjustments to fit the existing codebase. The modifications should be tested thoroughly to ensure they do not introduce new issues.

Recommendation

Apply a workaround by modifying the hermes_cli/kanban_db.py file to include the existence check, as this will prevent the synthesis of missing boards and provide a clear error message to the user.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING