fix(kanban): ignore stale current board pointers (salvages #20063) - #20183
Merged
Conversation
1 task
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stale
<root>/kanban/currentpointers no longer makehermes kanban boards show / stats / listsilently 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/currentfile 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 onboard_exists(normed). Stale slugs fall through toDEFAULT_BOARD. Env var (HERMES_KANBAN_BOARD) still wins as before, even against a stale file.tests/hermes_cli/test_kanban_boards.py: newtest_stale_file_pointer_falls_back_to_defaultcovers the regression.scripts/release.py: AUTHOR_MAP entry for @steezkelly.Validation
currentpointing atmissing-boardget_current_board() → "missing-board",boards showsynthesizes metadata,stats/listcreateskanban/boards/missing-board/kanban.db,boards listshows it as activeget_current_board() → "default", no synthesis, no directory creation,list_boards()→["default"]HERMES_KANBAN_BOARD=xwith stale filehermes kanban boards switch <slug>board_exists, unaffectedtest_kanban_{boards,db,cli,core_functionality})missing-boardboard synthesizeddefault, no directory createdCloses #20055
Co-authored-by: Steve Kelly stevekelly622@gmail.com