Skip to content

fix(cli): resolve DB identity on delegated worktree updates (#746)#841

Open
paarthsikka wants to merge 1 commit into
repowise-dev:mainfrom
paarthsikka:fix/746-worktree-seed-db-identity
Open

fix(cli): resolve DB identity on delegated worktree updates (#746)#841
paarthsikka wants to merge 1 commit into
repowise-dev:mainfrom
paarthsikka:fix/746-worktree-seed-db-identity

Conversation

@paarthsikka

Copy link
Copy Markdown
Contributor
  • Strip REPOWISE_DB_URL from os.environ during delegated run_update so it honors the copied DB
  • Add atomic try/except rollbacks to seed staging and rename phases
  • Guard sweep_stale_seed_backups with an mtime staleness check
  • Pass full=False instead of full=force to prevent re-embedding everything on update
  • Skip updating entirely when dry_run=True to prevent bogus output
  • Persist --coverage setting explicitly provided in init to config.yaml

Summary

Related Issues

Fixes #746
Builds on #747

Test Plan

  • Tests pass (pytest)
  • Lint passes (ruff check .)
  • Web build passes (npm run build) (if frontend changes)

Checklist

  • My code follows the project's code style
  • I have added tests for new functionality
  • All existing tests still pass
  • I have updated documentation if needed

…-dev#746)

- Strip REPOWISE_DB_URL from os.environ during delegated run_update so it honors the copied DB
- Add atomic try/except rollbacks to seed staging and rename phases
- Guard sweep_stale_seed_backups with an mtime staleness check
- Pass full=False instead of full=force to prevent re-embedding everything on update
- Skip updating entirely when dry_run=True to prevent bogus output
- Persist --coverage setting explicitly provided in init to config.yaml
@repowise-bot

repowise-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

✅ Health: 7.6 (unchanged)

📋 At a glance
1 file changed health · 3 hotspots touched · 3 new findings introduced · 5 co-change pairs left out · 2 files with recent fix history.

Files & modules (2)
  • packages (2 files)
    • .../cli/worktree.py
    • .../init_cmd/command.py
  • tests (1 file)
    • tests/integration/test_cli.py

⚠️ Change risk: moderate (riskier than 38% of this repo's commits · raw 8.3/10)
This change's risk is driven by:

  • more lines added than baseline
  • more scattered than baseline

🩹 Review priority (files here with the most recent bug-fix history — defects cluster, so review these first)

File Score Δ Why
.../cli/worktree.py 8.3 → 6.1 ▼ -2.2 🔻 introduced nested complexity, brain method, error handling · ✅ resolved io in loop

💡 .../cli/worktree.py: Flatten the control flow. Pull early-return guards to the top, extract the deepest branch into a helper, and consider replacing nested conditionals with a strategy table or dispatch dict.

🔎 More signals (2)

🔥 Hotspots touched (3)

  • .../cli/worktree.py — 1 commits/90d, 3 dependents · primary owner: Raghav Chamadiya (100%)
  • .../init_cmd/command.py — 19 commits/90d, 1 dependents · primary owner: Raghav Chamadiya (93%)
  • tests/integration/test_cli.py — 9 commits/90d, 1 dependents · primary owner: Raghav Chamadiya (48%)

🔗 Hidden coupling (1 file)

  • .../init_cmd/command.py co-changes with these files (not in this PR):
    • docs/CLI_REFERENCE.md (9× — 🟢 routine)
    • .../init_cmd/workspace.py (7× — 🟢 routine)
    • docs/USER_GUIDE.md (5× — 🟢 routine)
    • .../cli/helpers.py (5× — 🟢 routine)
    • docs/CHANGELOG.md (4× — 🟢 routine)

📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-14 21:11 UTC
Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] worktree seed + delegated update writes new-file pages to the wrong DB / repo identity (not a selection-budget issue)

1 participant