worktree finish deletes .sdlc/pipeline.db when the main checkout had none at start #1306
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1306
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In a project set up with
/os-sdlc:setup-projectin the same session, the main checkout has no.sdlc/pipeline.dbyet.worktree start ticket-2therefore did not link it (linked: .cc-osonly).os-sdlc-implementation-opencreated the database inside the worktree.worktree finish ticket-2removed the worktree and the database with it. After that,os-sdlc-implementation-report 1failed:no implementation 1. The implement skill orders the report afterworktree finish, so the report was lost.The next worktree (ticket-3) linked
.sdlc/pipeline.dbcorrectly, 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-2printedlinked: .cc-os;worktree start ticket-3printedlinked: .cc-os, .sdlc/pipeline.db.Possible fixes
setup-project(orimplementation-open) creates the database in the main checkout, orworktree startalways links the path.os-sdlc-implementation-reportbefore/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.
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.