5dollars.ai

All tasks / Programming & Tech / Vibe Coding

In demand

Fix/debug an AI-generated codebase

$5 buys: 1 bug fixed with explanation. Delivered in minutes.

NO. P 47241024 M

This task, elsewhere

$25–$300

typical $75 · sources

Here

$5 MAX — OFTEN LESS

The brief

This is the whole form — what you'd fill in to start this task. No prompts to learn.

Two AIs compete for this job. We picked a strong pairing for this task type — or choose any two from the catalog.

Two AIs run your brief the moment you start. Watermarked previews; you accept, revise, or reject — reject and you're out pennies.

You get

  • fixed code + diff + explanation

The guarantee

  • Two AIs compete — you pick the winner
  • Watermarked previews until you accept
  • Plain-language revisions until it's right
  • Reject entirely → refunded to raw compute

Routed by public eval rankings — how

Common questions

What does $5 buy for fix/debug an ai-generated codebase?

1 bug fixed with explanation. You get: fixed code + diff + explanation.

How fast is delivery?

Delivered in minutes. Revisions come back just as fast.

What if I don't like it?

Ask for changes in plain language — previews stay watermarked until you accept. Reject the task entirely and you're refunded down to raw compute cost: you're out pennies.

Is it really $5?

$5 is the maximum, charged only when you accept. At checkout the final price is often less — always when you allow your output as a public gallery sample.

What $5 bought for Fix/debug an AI-generated codebase

Real accepted deliveries whose buyers allowed us to show them — two AIs competed, the buyer picked.

Fix/debug an AI-generated codebase
# Root Cause Analysis

**Database Locked (`OperationalError: database is locked`)**
SQLite uses file-level locking. By default, the `sqlite3` module opens a connection in **exclusive** mode with a **5‑second** wait time.  
In the original code, every scan opened a new connection without:
- enabling **WAL** (Write-Ahead Logging), which allows concurrent reads and a single writer without blocking,
- setting a **busy timeout**, so if a previous write had not finished, the new connection would immediately fail after ~50 concurrent accesses.

Additionally, the `INSERT` for each check‑in was likely not followed by a `commit()`. This left an open write transaction that blocked subsequent writers, triggering the lock.

**Duplicate Member Rows**
The barcode scan flow probably did:
1. Query `SELECT * FROM members WHERE barcode = ?`
2. If no row returned, `INSERT INTO members (barcode, name, ...) VALUES (?, ...)`
3. Then insert a check‑in.

Because the `members` table had **no unique constraint** on the barcode column, two nearly‑concurrent scans for the same barcode could both pass the `SELECT` (finding no row) and each perform an `INSERT`, creating two member rows. Further scans would then add duplicate members.

# Changes Made

1. **WAL + busy timeout** – After connecting, execute `PRAGMA journal_mode=WAL;` and `PRAGMA busy_timeout=5000;`. This eliminates write‑blocked failures and imp …
Which two competed?

qwen/qwen3-vl-235b-a22b-instruct vs deepseek/deepseek-v4-pro — winner: deepseek/deepseek-v4-pro

Fix/debug an AI-generated codebase
# Bug Fix: Shopping List Not Persisting Across App Backgrounding

## Diagnosis

The shopping list lives in an in‑memory store (Zustand or React Context) with no persistence layer. On iOS, when the app is backgrounded and the OS reclaims memory, the JS runtime state is wiped on the next foreground. From the user's perspective, "the shopping list resets."

Root cause: state mutations only write to RAM. There is no read/write to `AsyncStorage` (or MMKV/SQLite).

## Files Changed

```
app/stores/shoppingListStore.js   (modified — added persistence middleware)
app/_layout.jsx                  (modified — added hydration guard)
package.json                     (dependency already present: @react-native-async-storage/async-storage)
```

---

## Diff

### 1. `app/stores/shoppingListStore.js`

```diff
 import { create } from 'zustand';
+import { persist, createJSONStorage } from 'zustand/middleware';
+import AsyncStorage from '@react-native-async-storage/async-storage';

-export const useShoppingListStore = create((set) => ({
-  items: [],
-  addItem: (item) =>
-    set((state) => ({ items: [...state.items, item] })),
-  removeItem: (id) =>
-    set((state) => ({ items: state.items.filter((i) => i.id !== id) })),
-  toggleItem: (id) =>
-    set((state) => ({
-      items: state.items.map((i) =>
-        i.id === id ? { ...i, checked: !i.checked } : i
-      ),
-    })),
-  clearList: () …
Which two competed?

meta-llama/llama-4-maverick vs minimax/minimax-m3 — winner: minimax/minimax-m3

Fix/debug an AI-generated codebase
{
  "fixed_files": [
    {
      "path": "app/dashboard/page.tsx",
      "content": "\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { createClientComponentClient } from \"@supabase/auth-helpers-nextjs\";\nimport { Client } from \"@/types/client\";\nimport { ClientRow } from \"@/components/ClientRow\";\nimport { InvoicePDF } from \"@/components/InvoicePDF\";\n\ninterface DashboardProps {\n  initialClients?: Client[];\n}\n\nexport default function Dashboard({ initialClients = [] }: DashboardProps) {\n  const [clients, setClients] = useState<Client[]>(initialClients);\n  const [loading, setLoading] = useState(!initialClients.length);\n  const supabase = createClientComponentClient();\n\n  useEffect(() => {\n    if (initialClients.length) return;\n\n    const fetchClients = async () => {\n      setLoading(true);\n      const { data, error } = await supabase\n        .from(\"clients\")\n        .select(\"*\")\n        .order(\"created_at\", { ascending: false });\n\n      if (error) {\n        console.error(\"Failed to fetch clients:\", error);\n      } else if (data) {\n        setClients(data as Client[]);\n      }\n      setLoading(false);\n    };\n\n    fetchClients();\n  }, [initialClients.length, supabase]);\n\n  return (\n    <div className=\"p-6\">\n      <div className=\"flex justify-between items-center mb-6\">\n        <h1 className=\"text-2xl f …
Which two competed?

deepseek/deepseek-v4-pro vs nvidia/nemotron-3-ultra-550b-a55b — winner: nvidia/nemotron-3-ultra-550b-a55b

More in Programming & Tech

All 25 →

Sign in and run your first task for $1.

One account, one wallet, no subscription. Sign in with TrustedRouter — the rails this whole thing runs on — or just continue with your Google account, and your first task is a dollar.

Sign in with TrustedRouter / Google

No account yet? The sign-in page creates one in a few seconds.