Skip to content

test(dialect): real adapter lifecycle coverage + opt-in live-DB CI; prune dead demo scripts - #221

Merged
remcostoeten merged 1 commit into
masterfrom
chore/housekeeping-tests-ci
Jul 26, 2026
Merged

test(dialect): real adapter lifecycle coverage + opt-in live-DB CI; prune dead demo scripts#221
remcostoeten merged 1 commit into
masterfrom
chore/housekeeping-tests-ci

Conversation

@remcostoeten

@remcostoeten remcostoeten commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What

Groups the last two audit-batch issues plus the MySQL verification (#171 gets a closing comment, no code needed).

#208 — docker-compose.databases.yml becomes real test infrastructure

  • Zero-infra dialect coverage: full_mutation_lifecycle tests in write_sqlite.rs and write_duckdb.rs run the exact grid mutation sequence (insert → update → delete → truncate) through the real adapters, asserting affected_rows and reading data back.
  • Live wire-protocol coverage: new tests/live_db_tests.rs runs the same lifecycle through MySqlAdapter against real MySQL 8.4 and MariaDB 11.4 from the compose file, gated behind DORA_LIVE_DB_TESTS=1 (silent pass otherwise, so plain cargo test stays fast/offline). Verified locally against both live servers.
  • CI: new live-db-tests.yml (weekly cron + workflow_dispatch) boots the compose services with --wait and runs the gated tests.
  • Docs: AGENTS.md now documents the compose port map — notably MySQL on 3307, MariaDB on 3306.

#167 — dead scripts pass (conservative, justification per file)

Deleted:

  • tools/scripts/demo-tour.ts + demo-tour.spec.ts — old Playwright demo recording, superseded by packages/promo/record-hero-flow.mjs; only referenced each other.
  • tools/scripts/drizzle-update-lsp-demo.ts — one-off LSP promo script, zero references (the recorded .webm asset lives on independently).
  • scripts/diagnose-tauri-dev.sh — unreferenced dev diagnostic; its dora-runner menu entry pointed at tools/diagnose-tauri-dev.sh, a path that never existed, so the entry was already broken — removed too (go build clean).

Kept deliberately: db-ops.ts, sync-aur-repo.sh, ci-mac.yml (wired into dora-runner), update-snapcraft-secret.sh (ops utility for secret rotation), fixture generators (fixtures under __tests__/fixtures/data-files/ are actively used).

Verification

  • cargo test --lib sqlite/duckdb lifecycle: pass (incl. --features duckdb-engine)
  • DORA_LIVE_DB_TESTS=1 cargo test --test live_db_tests: 2/2 pass against live containers (caught a stale-container port-binding gotcha, documented in AGENTS.md)
  • actionlint clean; go build clean

Closes #208
Closes #167

Summary by Sourcery

Strengthen adapter lifecycle coverage across SQLite, DuckDB, MySQL, and MariaDB with new unit and live integration tests, document the supporting local database infrastructure, add a CI job to run the live tests, and clean up obsolete demo and diagnostic scripts.

New Features:

  • Add end-to-end mutation lifecycle tests for SQLite and DuckDB write adapters covering insert, update, delete, and truncate operations.
  • Introduce opt-in live MySQL and MariaDB adapter lifecycle tests backed by Docker-compose database containers.

Enhancements:

  • Document local database container setup and port mappings, including non-default MySQL and MariaDB ports, for manual and automated testing.
  • Add a dedicated CI workflow to periodically run live database adapter tests against real MySQL/MariaDB instances.

CI:

  • Create a scheduled and manually triggerable GitHub Actions workflow to start database containers and run gated live adapter tests.

Documentation:

  • Extend AGENTS.md with instructions and connection URLs for local database containers used by live adapter tests.

Tests:

  • Add comprehensive adapter lifecycle tests for SQLite, DuckDB, MySQL, and MariaDB to validate grid mutation behavior against both in-memory and live databases.

Chores:

  • Remove unused demo and diagnostic scripts and the corresponding dora-runner menu entry for diagnosing Tauri dev startup issues.

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
dora Ready Ready Preview, Comment Jul 26, 2026 4:55pm

@sourcery-ai

sourcery-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

🧙 Sourcery has finished reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@remcostoeten, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cebb2407-8fae-4da5-84c3-f3122b37d186

📥 Commits

Reviewing files that changed from the base of the PR and between ff36fe9 and 1db1453.

📒 Files selected for processing (10)
  • .github/workflows/live-db-tests.yml
  • AGENTS.md
  • apps/desktop/src-tauri/src/database/adapter/write_duckdb.rs
  • apps/desktop/src-tauri/src/database/adapter/write_sqlite.rs
  • apps/desktop/src-tauri/tests/live_db_tests.rs
  • scripts/diagnose-tauri-dev.sh
  • tools/dora-runner/scripts.go
  • tools/scripts/demo-tour.spec.ts
  • tools/scripts/demo-tour.ts
  • tools/scripts/drizzle-update-lsp-demo.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/housekeeping-tests-ci

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

Comment @coderabbitai help to get the list of available commands.

…rune dead demo scripts

docker-compose.databases.yml is now real test infrastructure instead of aspirational: in-memory SQLite/DuckDB lifecycle tests (insert→update→delete→truncate through the real WriteAdapters), env-gated live MySQL/MariaDB adapter tests wired to the compose services (DORA_LIVE_DB_TESTS=1, verified locally against both servers), a weekly/manual live-db-tests.yml CI job, and the port map (MySQL on 3307!) documented in AGENTS.md.

Dead-script pass: demo-tour.ts/.spec.ts and drizzle-update-lsp-demo.ts (superseded by packages/promo recorders), diagnose-tauri-dev.sh plus its dora-runner entry that pointed at a path that never existed. db-ops.ts, sync-aur-repo.sh and ci-mac.yml stay — they are wired into dora-runner.

Closes #208
Closes #167

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The full_mutation_lifecycle tests in write_sqlite.rs and write_duckdb.rs are nearly identical; consider extracting a shared helper or macro to reduce duplication and keep future changes to the lifecycle sequence in one place.
  • In live_db_tests.rs, the env-gating logic currently causes tests to silently pass after printing a message; consider using #[ignore] with a small wrapper or a custom helper that returns early via assume/assert-style semantics to make skipped vs. executed runs more explicit in test output and IDE tooling.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `full_mutation_lifecycle` tests in `write_sqlite.rs` and `write_duckdb.rs` are nearly identical; consider extracting a shared helper or macro to reduce duplication and keep future changes to the lifecycle sequence in one place.
- In `live_db_tests.rs`, the env-gating logic currently causes tests to silently pass after printing a message; consider using `#[ignore]` with a small wrapper or a custom helper that returns early via `assume`/`assert`-style semantics to make skipped vs. executed runs more explicit in test output and IDE tooling.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@remcostoeten
remcostoeten merged commit 7e3ee59 into master Jul 26, 2026
10 checks passed
@remcostoeten
remcostoeten deleted the chore/housekeeping-tests-ci branch July 26, 2026 17:10
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.

test(dialect): docker-compose.databases.yml is aspirational — no test, script, or CI job uses it Clean up dead scripts and old CI

1 participant