Skip to content

kanban: materialize a named board's workspaces root when the board is created #63863

Description

@iammichaelhype

Summary

hermes kanban boards create <slug> creates the named board metadata and kanban.db, but does not materialize the board's canonical workspaces/ directory. The directory is only created lazily by scratch-workspace resolution.

That leaves a valid named board in a state where the worker dispatcher exports HERMES_KANBAN_WORKSPACES_ROOT=<kanban-home>/boards/<slug>/workspaces, but the exported directory does not exist when the task uses an explicit dir workspace. Consumers that correctly require this exported root to exist then fail before worker startup.

I reproduced this with official Hermes 0.18.2 at 4281151ae859241351ba14d8c7682dc67ff4c126 and confirmed the relevant behavior is still present on current main at af250d84948179834820a62bfd870c0df6f264a1.

Reproduction

export HERMES_KANBAN_HOME="$(mktemp -d)"
hermes kanban boards create workspace-root-repro --name "Workspace Root Repro"

test -f "$HERMES_KANBAN_HOME/boards/workspace-root-repro/board.json"
test -f "$HERMES_KANBAN_HOME/boards/workspace-root-repro/kanban.db"
test -d "$HERMES_KANBAN_HOME/boards/workspace-root-repro/workspaces"

The first two checks pass; the final check fails. A later worker lane may still export that absent final path.

Expected behavior

Creating a named board should also materialize its canonical workspaces/ root safely and idempotently, or the supported dispatcher should materialize and validate it before exporting it to a worker.

Suggested invariants:

  • create only the final workspaces leaf under the already-selected physical board directory;
  • use an owner-only mode such as 0700;
  • accept an existing physical directory only when its owner and mode are safe;
  • reject symlinks, wrong file kinds, unsafe ownership/mode, and ambiguous replacement;
  • keep creation idempotent under repeated or concurrent board creation;
  • add a regression test covering named-board creation followed by an explicit dir workspace task, not only scratch-workspace resolution.

This report is an upstream behavior note only; I have not changed or forked Hermes source locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/cronCron scheduler and job managementtype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions