worktree finish deletes .sdlc/pipeline.db when the main checkout had none at start #1306

Open
opened 2026-10-23 23:04:11 +00:00 by jared · 1 comment
Owner

Problem

In a project set up with /os-sdlc:setup-project in the same session, the main checkout has no .sdlc/pipeline.db yet. worktree start ticket-2 therefore did not link it (linked: .cc-os only). os-sdlc-implementation-open created the database inside the worktree. worktree finish ticket-2 removed the worktree and the database with it. After that, os-sdlc-implementation-report 1 failed: no implementation 1. The implement skill orders the report after worktree finish, so the report was lost.

The next worktree (ticket-3) linked .sdlc/pipeline.db correctly, because by then the main checkout had a new, empty database. Implementation IDs restarted at 1.

Evidence

decision-model, 2026-10-23: worktree start ticket-2 printed linked: .cc-os; worktree start ticket-3 printed linked: .cc-os, .sdlc/pipeline.db.

Possible fixes

  • setup-project (or implementation-open) creates the database in the main checkout, or worktree start always links the path.
  • Or the implement skill runs os-sdlc-implementation-report before /os:worktree finish.

Discoverer: /home/jared/dev/ruby-gems/decision-model, session b6d48eed-a394-4b5d-ac38-c8bee60b0902, 2026-10-23. First os-sdlc run in a newly set-up project lost its run report.

## Problem In a project set up with `/os-sdlc:setup-project` in the same session, the main checkout has no `.sdlc/pipeline.db` yet. `worktree start ticket-2` therefore did not link it (`linked: .cc-os` only). `os-sdlc-implementation-open` created the database inside the worktree. `worktree finish ticket-2` removed the worktree and the database with it. After that, `os-sdlc-implementation-report 1` failed: `no implementation 1`. The implement skill orders the report after `worktree finish`, so the report was lost. The next worktree (ticket-3) linked `.sdlc/pipeline.db` correctly, because by then the main checkout had a new, empty database. Implementation IDs restarted at 1. ## Evidence decision-model, 2026-10-23: `worktree start ticket-2` printed `linked: .cc-os`; `worktree start ticket-3` printed `linked: .cc-os, .sdlc/pipeline.db`. ## Possible fixes - `setup-project` (or `implementation-open`) creates the database in the main checkout, or `worktree start` always links the path. - Or the implement skill runs `os-sdlc-implementation-report` before `/os:worktree finish`. -------- **Discoverer:** /home/jared/dev/ruby-gems/decision-model, session b6d48eed-a394-4b5d-ac38-c8bee60b0902, 2026-10-23. First os-sdlc run in a newly set-up project lost its run report.
Author
Owner

From #1589 port check: NOT FIXED. Links#link_pipeline_db returns [] when the main checkout has no .sdlc/pipeline.db (plugins/os-git/lib/os_git/worktree/links.rb:119-125). Finish#remove then forces removal when all untracked files are inside the link list (plugins/os-git/lib/os_git/worktree/finish.rb:52-54), and PIPELINE_DB is in that list (links.rb:70-71). So a real db created inside the worktree is still deleted at finish. Not closed.

From #1589 port check: NOT FIXED. Links#link_pipeline_db returns [] when the main checkout has no .sdlc/pipeline.db (plugins/os-git/lib/os_git/worktree/links.rb:119-125). Finish#remove then forces removal when all untracked files are inside the link list (plugins/os-git/lib/os_git/worktree/finish.rb:52-54), and PIPELINE_DB is in that list (links.rb:70-71). So a real db created inside the worktree is still deleted at finish. Not closed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1306
No description provided.