Link pipeline.db in a new worktree even when the main database does not exist yet #840

Closed
opened 2026-09-30 13:17:19 +00:00 by jared · 1 comment
Owner

Problem

os:worktree start links <worktree>/.sdlc/pipeline.db to the main checkout's database only when the main database file already exists. When the link is missing, a pipeline run in that worktree writes its implementation rows to a local .sdlc/pipeline.db. git worktree remove then deletes those rows, and no report can find the implementation later.

Observed

The live worktree .claude/worktrees/sequel-runner has no pipeline.db link. Its .sdlc/ holds only project.yaml, tickets, suite.lock, and .gitignore. The main .sdlc/pipeline.db is a real file. It is not known whether the main database was absent when that worktree started, or whether the worktree is older than the link code.

plugins/os/lib/worktree/start_command.rb:105-112   symlink_pipeline_db returns early unless File.file?(owning_db)

Reproduce

mv .sdlc/pipeline.db /tmp/pipeline.db.bak     # main database absent
/os:worktree start probe
ls -la .claude/worktrees/probe/.sdlc/          # no pipeline.db link
mv /tmp/pipeline.db.bak .sdlc/pipeline.db

Origin

  • Trigger: #836 triage, 2026-09-30 (checking that implementation rows survive git worktree remove)
  • Improvised this session: none
  • Chain: rows can be lost on worktree removal ← no pipeline.db link in the worktree (.claude/worktrees/sequel-runner/.sdlc) ← symlink_pipeline_db skips the link when the main database is absent (plugins/os/lib/worktree/start_command.rb:105-112) ← DESIGN
  • Root candidate: this ticket
  • Where: plugins/os/lib/worktree/start_command.rb (symlink_pipeline_db)
  • Session: 61db8071-7255-4d2c-8436-5f9c6ac52caa
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/61db8071-7255-4d2c-8436-5f9c6ac52caa.jsonl
## Problem `os:worktree start` links `<worktree>/.sdlc/pipeline.db` to the main checkout's database only when the main database file already exists. When the link is missing, a pipeline run in that worktree writes its implementation rows to a local `.sdlc/pipeline.db`. `git worktree remove` then deletes those rows, and no report can find the implementation later. ## Observed The live worktree `.claude/worktrees/sequel-runner` has no `pipeline.db` link. Its `.sdlc/` holds only `project.yaml`, `tickets`, `suite.lock`, and `.gitignore`. The main `.sdlc/pipeline.db` is a real file. It is not known whether the main database was absent when that worktree started, or whether the worktree is older than the link code. ``` plugins/os/lib/worktree/start_command.rb:105-112 symlink_pipeline_db returns early unless File.file?(owning_db) ``` ## Reproduce ``` mv .sdlc/pipeline.db /tmp/pipeline.db.bak # main database absent /os:worktree start probe ls -la .claude/worktrees/probe/.sdlc/ # no pipeline.db link mv /tmp/pipeline.db.bak .sdlc/pipeline.db ``` ## Origin - Trigger: #836 triage, 2026-09-30 (checking that implementation rows survive `git worktree remove`) - Improvised this session: none - Chain: rows can be lost on worktree removal ← no `pipeline.db` link in the worktree (`.claude/worktrees/sequel-runner/.sdlc`) ← `symlink_pipeline_db` skips the link when the main database is absent (`plugins/os/lib/worktree/start_command.rb:105-112`) ← DESIGN - Root candidate: this ticket - Where: plugins/os/lib/worktree/start_command.rb (symlink_pipeline_db) - Session: 61db8071-7255-4d2c-8436-5f9c6ac52caa - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/61db8071-7255-4d2c-8436-5f9c6ac52caa.jsonl
Author
Owner

Resolution

Done: Closed as not a defect at the user's direction.

Evidence: User 2026-09-30: worktree creation makes the pipeline.db symlink and sets up the database if it does not exist.

Follow-ups: none

## Resolution **Done:** Closed as not a defect at the user's direction. **Evidence:** User 2026-09-30: worktree creation makes the pipeline.db symlink and sets up the database if it does not exist. **Follow-ups:** none
jared closed this issue 2026-09-30 13:24:10 +00:00
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#840
No description provided.