Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Have No Coding Skills. My Team Is 3 AI Models. Here’s the 100-Bug Audit That Saved My Second Startup.

说明与用途

作者没有编码技能,使用三种 AI 模型构建 GrantPro AI。一次 100 个错误的审计发现了可能破坏产品的关键问题。通过数据库级检查、服务器端信用消费、加强 RLS 和 CI 导出测试来修复。平台成功上线。

问题

AI-generated code can contain hidden bugs that jeopardize product functionality and revenue.

结果

Implemented critical fixes that prevented revenue loss, ensured data security, and established a robust audit process, enabling the launch of GrantPro AI.

工作流

  • 1. Build features with AI #1 (React, Supabase, Edge Functions).
  • 2. Design and infrastructure with AI #2.
  • 3. Audit code with AI #3 before any user payment.
  • 4. Identify 100 bugs and 56 quality issues.
  • 5. Fix bugs: database idempotency, remove client-side credit logic, tighten RLS, add CI export tests.
  • 6. Create Invariants Doc and regression tests for auditor.
  • 7. Launch GrantPro AI with live grant tracking.

证据

It came back with ~100 unique bugs and 56 code-quality issues.

来源

The AI configured the Paddle webhook to listen for price IDs. But it accidentally mapped two products to the same priceId.

来源

We moved the idempotency check to the database level (Postgres unique index) instead of the application layer.

来源

The AI wrote the credit deduction in the React frontend. If the user had credits > 0, the UI let them click "Generate" and then called the Edge Function.

来源

We deleted all client-side credit logic. Spending now happens exclusively via a Postgres SECURITY DEFINER RPC that checks the user's balance atomically on the server.

来源

The AI enabled Row Level Security (RLS), but left the SELECT policy open to the anon role for caching purposes.

来源

We dropped the public read policies. If a table contains the "secret sauce" (historical awards, win probabilities), it is locked to service_role or authenticated users only.

来源

The AI forgot to export the handler (export default async function...). The function compiled, but when called by the frontend, it silently failed.

来源

We added a CI gate that explicitly tests the exports of every Edge Function before deployment.

来源

  • 记录日期: 2026-10-25T20:11:18.107Z