Skip to content

fix(testing): isolate and guard database package tests - #587

Merged
imshashank merged 4 commits into
mainfrom
review/guard-database-tests
Nov 16, 2026
Merged

imshashank merged 4 commits into
mainfrom
review/guard-database-tests

Conversation

@imshashank

@imshashank imshashank commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Prevents mutable @orbit/db tests from inheriting a development database. The other six packages already selected isolated test databases; the database package had no preload.

The new preload requires a loopback PostgreSQL server, a strict orbit_test_ target and a matching current_database() result before test modules load. It routes the package to its own orbit_test_db base and lane. Local setup, CI provisioning, lane cleanup protection and documentation now include all seven bases.

Current head 7d49cf7ea37330fc3d1addfeb0d9c6c658a8e8f4 normally merges main 5a0d42ec7fbb32526298376eacaf9906c3737a6b. Blob and file-mode comparison confirms the exact disjoint union of the reviewed 12 guard files and all 32 current-main files changed since the original base, with no additional changes. All static checks and normal push hooks passed after integration. Independent source review is complete; fresh exact-head CI and the ready-event preview controller are pending.

Earlier validation:

  • Clean bun run verify on original guard head 90c51ce4952cac0903cc0fef0ef589e3371de241: 7,031 passed, zero failures; exact source tree unchanged. The latest integrated full suite has not been rerun locally.
  • Reproduced six unsafe child-startup cases before the fix; all eight real child-process regressions passed, including valid startup and refusing a nonexistent database before the test body.
  • Actual Bun 1.3.14 and Node 24.21 guards confirmed the selected local databases, valid synthetic application configuration and absent provider credentials.
  • Previous current-main integration bc7cb81e passed all six CI jobs, both configured browser suites, Docker gateway checks and copied standalone smoke, plus CodeQL, documentation and links.

No shipped client behavior or production migration changes.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Noveum/orbit
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 5a0d42e
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c442057-3279-4899-9d80-47c944cbc30c
Commits

Reviewing files that changed from the base of the PR and between 5a0d42e and 7d49cf7.

Files selected for processing: 12

  • .github/workflows/ci.yml
  • CLAUDE.md
  • CONTRIBUTING.md
  • docs/mcp-grant-rollout.md
  • docs/testing.md
  • packages/db/bunfig.toml
  • packages/db/src/ensure-test-databases.ts
  • packages/db/src/test-lane-drop.ts
  • packages/db/tests-preload.ts
  • packages/db/tests/test-lane-drop.test.ts
  • packages/db/tests/test-preload.test.ts
  • packages/db/tsconfig.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added documentation Docs, the README, or anything that explains Orbit tests Test coverage and test infrastructure area: database Schema, migrations, queries, seed ci Workflows, tooling and repo automation labels Nov 16, 2026
@imshashank
imshashank marked this pull request as ready for review November 16, 2026 19:08
@imshashank
imshashank requested a review from pulkitxm as a code owner November 16, 2026 19:08
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
orbit Ready Ready Preview Nov 16, 2026 7:22pm UTC

Request Review

@imshashank
imshashank merged commit 27b73b5 into main Nov 16, 2026
18 checks passed
@imshashank
imshashank deleted the review/guard-database-tests branch November 16, 2026 19:22

This branch was successfully deployed

1 active deployment
Preview — 7d49cf7e Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: database Schema, migrations, queries, seed ci Workflows, tooling and repo automation documentation Docs, the README, or anything that explains Orbit tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant