docs: seed worktrees with a copy of real userdata instead of banning it #4949
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit into
main fromrefs/pull/4949/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
t3dotgg(GitHub profile, opens in a new tab) closed this
- @@ -85,4 +85,12 @@85858686 ## Test data878788-An empty database is a bad test. Seed your worktree's `.t3` instead of pointing at live state:88+An empty database is a bad test. Seed your worktree's `.t3` with a copy of real data instead of pointing at live state:89+90+Copy from `~/.t3/userdata` (the developer's real data, the most realistic test set) or `~/.t3/dev`. Worktree state lives at `<worktree>/.t3/userdata`.91+Snapshot the database with `VACUUM INTO`, which is safe even while a server has the source open and yields one consistent file:92+93+ ```bash94+ mkdir -p .t3/userdata95+ rm -f .t3/userdata/state.sqlite* # VACUUM INTO refuses to overwrite96+ bun -e "new (require('bun:sqlite').Database)(process.env.HOME + '/.t3/userdata/state.sqlite', { readonly: true }).run(\"VACUUM INTO '.t3/userdata/state.sqlite'\")"
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
f7a82e93-fd31-415b-a626-d5d664c90c61You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share