test(dialect): real adapter lifecycle coverage + opt-in live-DB CI; prune dead demo scripts - #221
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🧙 Sourcery has finished reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…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
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
full_mutation_lifecycletests inwrite_sqlite.rsandwrite_duckdb.rsare 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 viaassume/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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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
full_mutation_lifecycletests inwrite_sqlite.rsandwrite_duckdb.rsrun the exact grid mutation sequence (insert → update → delete → truncate) through the real adapters, assertingaffected_rowsand reading data back.tests/live_db_tests.rsruns the same lifecycle throughMySqlAdapteragainst real MySQL 8.4 and MariaDB 11.4 from the compose file, gated behindDORA_LIVE_DB_TESTS=1(silent pass otherwise, so plaincargo teststays fast/offline). Verified locally against both live servers.live-db-tests.yml(weekly cron +workflow_dispatch) boots the compose services with--waitand runs the gated tests.#167 — dead scripts pass (conservative, justification per file)
Deleted:
tools/scripts/demo-tour.ts+demo-tour.spec.ts— old Playwright demo recording, superseded bypackages/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; itsdora-runnermenu entry pointed attools/diagnose-tauri-dev.sh, a path that never existed, so the entry was already broken — removed too (go buildclean).Kept deliberately:
db-ops.ts,sync-aur-repo.sh,ci-mac.yml(wired intodora-runner),update-snapcraft-secret.sh(ops utility for secret rotation), fixture generators (fixtures under__tests__/fixtures/data-files/are actively used).Verification
cargo test --libsqlite/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)actionlintclean;go buildcleanCloses #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:
Enhancements:
CI:
Documentation:
Tests:
Chores: