Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tools/kanban_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,14 @@ def _handle_create(args: dict, **kw) -> str:
_self_task = kb.get_task(conn, _self_tid)
if _self_task is not None and _self_task.workspace_kind:
workspace_kind = _self_task.workspace_kind
workspace_path = _self_task.workspace_path
# Never inherit a scratch parent's materialized path:
# each scratch child must resolve to its own workspace
# directory (<board>/workspaces/<child-id>), not share
# the parent's. Dir / worktree children keep their
# inherited path so follow-up work lands in the same
# project checkout.
if _self_task.workspace_kind != "scratch":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a regression test for this branch with a claimed scratch parent whose materialized workspace_path is set. Assert the omitted-workspace child remains scratch with workspace_path is None; the current test suite covers only the dir inheritance case.

workspace_path = _self_task.workspace_path
# Keep follow-up children inside the same project so the
# whole subtree shares one repo + branch convention.
if project_id is None and _self_task.project_id:
Expand Down
Loading