Repository navigation
Improve test coverage with Vitest #71
Description
Activity
/bounty $250
💎 $250 bounty • Outerbase (YC W23)
Steps to solve:
- Start working: Comment
/attempt #71with your implementation plan - Submit work: Create a pull request including
/claim #71in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
❗ Important guidelines:
- To claim a bounty, you need to provide a short demo video of your changes in your pull request
- If anything is unclear, ask for clarification before starting as this will help avoid potential rework
- Low quality AI PRs will not receive review and will be closed
- Do not ask to be assigned unless you've contributed before
Thank you for contributing to outerbase/starbasedb!
Attempt Started (UTC) Solution Actions 🟢 @AlonePenguin Jun 01, 2026, 01:07:27 PM #263 Reward 🟢 @Rafly0078 Jun 03, 2026, 03:26:57 PM #268 Reward 🟢 @TechEnthusGH Jun 03, 2026, 06:06:14 PM #269 Reward 🟢 @tunguz May 11, 2026, 10:11:28 PM #149 Reward 🟢 @INDICUMA May 11, 2026, 11:47:29 PM #150 Reward 🟢 @Mykidzou May 12, 2026, 05:44:09 AM #151 Reward 🟢 @Iineman2 May 12, 2026, 06:54:13 AM #153 Reward 🟢 @joshpi-1345 May 12, 2026, 07:13:11 AM #156 Reward 🟢 @Gimyoonsoo May 12, 2026, 07:09:44 AM #155 Reward 🟢 @ScryUser May 12, 2026, 07:41:20 AM #159 Reward 🟢 @hieunt170746 May 12, 2026, 07:45:19 AM #157 Reward 🟢 @kanjk0olb0y-a11y May 12, 2026, 07:09:07 AM #154 Reward 🟢 @kaziiza May 12, 2026, 09:52:18 AM #163 Reward 🟢 @kingzzoov-ctrl May 12, 2026, 09:19:20 AM #162 Reward 🟢 @akamabu May 12, 2026, 09:13:13 AM #161 Reward 🟢 @obmakesomething May 12, 2026, 10:09:53 AM #164 Reward 🟢 @thedalbee May 12, 2026, 02:46:57 PM #165 Reward 🟢 @shengtenghou4-star May 12, 2026, 02:55:17 PM #166 Reward 🟢 @xingxi0614-cpu May 12, 2026, 04:25:06 PM #169 Reward 🟢 @mt211211 May 12, 2026, 06:58:24 PM #170 Reward 🟢 @KaannKara May 12, 2026, 07:23:16 PM #171 Reward 🟢 @Treasure520520 May 12, 2026, 07:57:13 PM #176 Reward 🟢 @popsiclelmlm May 12, 2026, 08:35:40 PM #185 Reward 🟢 @newmattock May 12, 2026, 08:23:40 PM #182 Reward 🟢 @treydoe1 May 12, 2026, 09:18:48 PM #186 Reward 🟢 @TheWaste11202 May 12, 2026, 10:48:04 PM #187 Reward 🟢 @jorgeschulz May 12, 2026, 10:33:47 PM #189 Reward 🟢 @lisiqi1983 May 13, 2026, 02:45:22 AM #199 Reward 🟢 @JetMatrix May 13, 2026, 02:13:31 AM #197 Reward 🟢 @benbenlijie May 13, 2026, 03:25:39 AM #200 Reward 🟢 @taherdhanera May 13, 2026, 09:13:41 AM #204 Reward 🟢 @richboyneedcash May 13, 2026, 03:30:05 PM #207 Reward 🟢 @imaanmulji May 13, 2026, 05:53:26 PM #209 Reward 🟢 @himanalot May 13, 2026, 06:19:32 PM #210 Reward 🟢 @duct-tape2 May 14, 2026, 09:15:59 AM #211 Reward 🟢 @sureshchouksey8 May 14, 2026, 10:55:02 AM #214 Reward 🟢 @RupteRyuxh May 14, 2026, 08:37:31 PM WIP 🟢 @singhaditya21 Jun 15, 2026, 05:57:30 AM #277 Reward 🟢 @oocheol May 18, 2026, 04:10:28 AM #226 Reward 🟢 @manuelsampedro1 May 18, 2026, 10:18:32 PM #227 Reward 🟢 @mkcash May 19, 2026, 09:20:28 AM WIP 🟢 @Qian001A May 22, 2026, 11:47:30 AM #242 Reward 🟢 @gebibd00-jpg May 22, 2026, 11:03:09 AM #241 Reward 🟢 @Myc911 Apr 23, 2026, 02:48:29 AM WIP 🟢 @dominyyin-sudo May 23, 2026, 05:50:38 AM #247 Reward 🟢 @pofuhermes-bit Apr 23, 2026, 06:45:21 AM WIP 🟢 @varshith257 Jan 24, 2025, 04:26:08 PM #74 Reward 🟢 @aybanda Jan 24, 2025, 06:00:30 PM WIP 🟢 @adliebe May 27, 2026, 09:11:55 AM #252 Reward 🟢 @jasperan May 27, 2026, 11:39:15 AM #253 Reward 🟢 @kpassito May 27, 2026, 06:37:55 PM #254 Reward 🟢 @Entr0zy May 30, 2026, 11:45:23 AM #257 Reward 🟢 @kodedihp May 30, 2026, 01:00:31 PM WIP 🟢 @attaboy11 May 30, 2026, 10:36:10 PM #261 Reward - Start working: Comment
/attempt #71
Algora profile Completed bounties Tech Active attempts Options @varshith257 25 bounties from 11 projects Scala, Rust,
TypeScript & moreCancel attempt /attempt #71
Algora profile Completed bounties Tech Active attempts Options @aybanda 2 bounties from 2 projects TypeScript, Python,
Julia & moreCancel attempt @Brayden There are a few bugs in implementations that are getting found during tests. I am fixing them too along with the testing. Could I draft PR?
@Brayden There are a few bugs in implementations that are getting found during tests. I am fixing them too along with the testing. Could I draft PR?
You may absolutely fix issues along the way. Feel free to draft a PR @varshith257!
@Brayden I have opened
and fixing few more implementations caught in the way in testing
💡 @varshith257 submitted a pull request that claims the bounty. You can visit your bounty board to reward.
🎉🎈 @varshith257 has been awarded $250! 🎈🎊
/attempt #71
- added a commit that references this issue
on Apr 23, 2026 /attempt #71
Implementation plan:
- Reproduce current Vitest + coverage baseline on main
- Fix the RLS regression causing failing coverage tests
- Add meaningful tests for uncovered branches/modules (starting with allowlist and worker entry flow)
- Re-run
pnpm test -- --coverageand only submit if thresholds pass
I'll include
/claim #71in the PR body and a short demo video if I get this green.76 remaining items
/attempt #71
I am adding focused regression coverage for cache safety when a SQL batch mixes reads and mutations. The tests verify that neither cache reads nor cache writes occur for SELECT-plus-DELETE batches, including the optional-params paths. This is scoped to src/cache/index.test.ts and does not overlap the existing cache-bypass or malformed-cache-result PRs.
Follow-up after the newer same-issue #71 activity from @Saiaaax:
- Attempt: Improve test coverage with Vitest #71 (comment)
- PR [codex] test cache behavior for batched mutations #282: [codex] test cache behavior for batched mutations #282
My active #71 reward claim remains PR #204: #204
Algora claim remains Pending for USD 250: https://algora.io/claims/2uVVaQ6TGDBDrJuhCurrent contributor-side status rechecked now:
- PR Expand Vitest coverage and fix import, cron and RLS failures #204 is open and non-draft.
- The bounty-claim label is present.
- The PR body includes
/claim #71. - GitHub shows the remaining state as maintainer review-required / BLOCKED, not a requested contributor-side change.
Scope remains distinct: PR #204 covers interface template hydration, interface primitives, public package entrypoints, and JSON import validation coverage. The newer PR #282 is a cache batched-mutation coverage slice, so it does not replace or overlap PR #204. No contributor-side blocker is pending from my side unless maintainers request a specific revision.
/attempt #71
Will add Vitest test coverage across the codebase.
PR #285 submitted improving Vitest test coverage (30 new tests for csv, allowlist, index). Ready for review.
/attempt #71
Plan: add focused Vitest coverage for
plugins/interface/utils/index.tsx. The tests covercn()conditional/conflicting Tailwind classes andgetAssetImportTagsFromManifest()behavior for current-page scripts, shared chunks, CSS assets, unrelated pages, and the no-page case. The PR is test-only and avoids hard-coding Vite hash filenames by deriving expectations from the committed manifest./attempt #71
Plan: add a separate Vitest suite for
plugins/interface/index.tsxcovering InterfacePlugin metadata, route/middleware registration, request data-source capture, template mount rendering, exact route matching, and parameterized route matching. This is test-only and does not change production behavior./attempt #71
Plan: `src/import/csv.ts` (the CSV import route) had no dedicated test file, unlike its JSON/dump import siblings. Adding `src/import/csv.test.ts` covering: unsupported Content-Type, empty body, missing multipart file, empty/header-only CSV, raw `text/csv` and JSON-wrapped CSV ingestion, column mapping, malformed rows being skipped, partial insert failures, and malformed JSON payloads. Following the existing mocking pattern used in `json.test.ts`.
/attempt #71
Prepared a narrow Hyperdrive lifecycle regression slice in #290: close the client after query rejection, preserve the original query error if cleanup also rejects, and cover cleanup-only failures with/without waitUntil. Ten focused Hyperdrive cases plus the existing operation tests pass locally (21 tests); the PR includes a short recorded-results demonstration and the unchanged baseline failures.
This does not complete the repository-wide 75% coverage goal. The issue has a Rewarded label: is this distinct slice still eligible for a reward, and if so, what scope/amount would apply? Keeping the PR draft pending that clarification; no full-$250 claim.
/attempt #71
/attempt #71
Plan: Add behavior-focused Vitest test coverage with zero production changes:
src/allowlist/index.test.ts: 9 new tests covering admin bypass, disabled mode, source table filtering, rejection audits, and fail-closed handling (bringing allowlist from 0% to >97% statements).src/import/dump.test.ts: 3 edge-case tests covering SQLite header stripping, multiline comments without semicolons, and formData error responses (reaching 100% statements).src/plugin.test.ts: 2 tests covering plugin registrycurrentPluginsaccess andUnimplementedErrorskip handling (reaching 100% statements).
All 30/30 focused tests passing green.
/attempt #71
Implementation plan: focused Vitest coverage slice for the three uncovered plugin surfaces (cron incl. utils + alarm scheduling, resend sendEmail incl. error paths, clerk construction + sessionExistsInDb + authenticate early exits) plus a minimal fault-isolation fix in the cron callback route found while testing (unhandled rejection aborted sibling delivery). PR #293 carries /claim #71. Validated locally: 28 new tests green, prettier clean, full-suite failures limited to pre-existing RLS tests that fail on unmodified main.
/attempt #71
I have opened PR #296 which fixes the 4 failing RLS tests and brings Vitest test coverage above 75% across ALL metrics:
- Statements: 94.13% (threshold: 75%)
- Branches: 79.60% (threshold: 75%)
- Functions: 93.98% (threshold: 75%)
- Lines: 94.49% (threshold: 75%)
All 245 tests pass with zero failures: #296
Hi @Brayden — I would like to apply for a paid contribution to this test-coverage task.
I work with AI assistance and disclose it. A concrete example of my verification work is this standalone locale-sorting experiment, with 1,115 assertions and explicit limitations: https://gist.github.com/jfxyl12345-beep/a14e98e5bae3adf466cf78092f650a54 . It is not a Starbase integration or a client engagement.
I see your original
/bounty $250comment and the many existing coverage PRs. Rather than submitting overlapping tests, I propose starting from the current main branch and the CI command, measuring the uncovered behavior, then agreeing on one remaining area with meaningful invalid-input and failure-path assertions. The deliverable would include the tests, exact command output and coverage report, plus any minimal regression fix required by those tests.Before implementation, could you confirm whether this bounty still accepts a new contributor, which existing PR or module you want prioritized, and the current payment/acceptance process for a Singapore-based contributor? I do not claim to have run this project's tests yet, and would not count a partial coverage contribution as satisfying the whole >75% requirement.
Thank you,
Peter🛠️ Antigravity Technical Solution & Verified Patch Proposal
We have conducted a thorough root-cause analysis and verified patch implementation for this issue.
- Interactive Technical Proposal & Evidence: job-ghb-outerbase-starbasedb-71
- Verification Guarantee: 100% automated test assertions passed, zero regressions detected.
- Bounty Payout Rail:
0x24A2151Ec787a2C5c81412A888c3a9d9eEc3beEA(EVM) /lamvukyo3001@gmail.com(PayPal)
Submitted by Sovereign Fleet Runner: @lamkyo (github_secondary)
Is your feature request related to a problem? Please describe.
Currently the test coverage of the project is nearly non-existent. We do have and use Vitest as a dependency in the Starbase project already that future tests should also use. The idea is to begin accumulating test coverage throughout the entire project.
Goal is to bring test coverage up to above 75% with meaningful tests.
Describe the solution you'd like
Important: Tests should not just be made for line coverage, they should also include meaningful tests that help reveal when issues arise. For example, if we were to write a test for our LiteREST code to see if making a request fetched data we would pass it potentially:
-1ornullas a valueWhen PR's are made we run the following Github test action (https://github.com/outerbase/starbasedb/blob/main/.github/workflows/test.yaml) that verifies the project can execute a
pnpm iand then run tests withpnpm test. All tests added should be executed during that samepnpm testcommand.Describe alternatives you've considered
N/A
Additional context
N/A