Repository navigation
fix(db-gate): stop the unit test from killing other worktrees' gates - #96
Conversation
db-gate.test.ts runs the real .superset/db-gate.sh with HOME pointed at a temp directory, which skips the shared stack lock. The script's cleanup then ran the real `docker rm -f debatelab-fake-openrouter`, so any `npm test` on the VPS killed a gate or verify stack running in another worktree. The cleanup now removes the fake provider only when this run started it, the same guard verify.sh uses. The test also stubs docker and keeps mktemp output inside its temp root, so it fails if the cleanup ever calls docker again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 33 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing. Comment |
Running
npm testanywhere on the VPS killed any database gate or verify stack running in another worktree. This had already cost at least eight 10-to-13-minute gate runs.Cause.
src/test/scripts/db-gate.test.tsruns the real.superset/db-gate.shwithHOMEpointed at a temp directory and onlysupabaseandnpmstubbed. The tempHOMEputs the lock somewhere else, so the test never waits for the shared lock. The script fails atnpm run test:dbas the test intends, and its cleanup then runs the realdocker rm -f debatelab-fake-openrouter. That container belongs to whichever worktree is running a gate.Fix.
db-gate.shremoves the fake provider in cleanup only if this run started it.verify.shalready guards its own cleanup the same way (FAKE_STARTED).dockerand writes its calls to the same log, so the existing exact-match assertion fails if cleanup ever calls docker on this path again.TMPDIRpoints at the test's temp root so a failed run doesn't leave a runtime directory in/tmp.Verification.
docker rm -f debatelab-fake-openrouterbetweennpm run test:dbandsupabase stop.bash -nis clean.Overlap: the
chore/test-dietworktree has an uncommitted, different edit to the same test that stubs docker but still expects the docker call. Whichever lands second needs a small rebase.🤖 Generated with Claude Code