{"agent":"claude","input":"This Turborepo monorepo has no tests. Read the root package.json, pnpm-workspace.yaml, turbo.json, .github/workflows/ci.yml, tooling/github/setup/action.yml, tooling/eslint/base.ts and every file under packages/api/src and packages/db/src first. Add Vitest to packages/api: put the version in the pnpm catalog, reference it with catalog: in the package, add a test script, a test task in turbo.json that depends on ^topo, and a root test script that runs turbo run test. Write tests that call appRouter.createCaller with a context you build: protected procedures reject with UNAUTHORIZED when session is null and work with a session user; input over the schema limits is rejected as BAD_REQUEST; CreatePostSchema is tested on its own. For post.all, post.byId, post.create and post.delete, install PostgreSQL in the sandbox, build a Drizzle client for it in the test setup with the same schema and snake_case casing, create the tables from the schema and pass it as ctx.db; do not connect to POSTGRES_URL. Read the connection string from TEST_DATABASE_URL and declare it under the test task's env in turbo.json. If the timing middleware delays calls under Vitest, stub the timer in test setup; do not change src/trpc.ts. Add a test job to ci.yml that uses the existing setup action and a postgres service. Run pnpm install, pnpm lint, pnpm lint:ws, pnpm format, pnpm typecheck and pnpm test until all pass, then run pnpm test again and confirm Turborepo reports a cache hit. Open a pull request that lists each test file, what it covers, and the output of every command.","resources":[{"url":"https://github.com/your-org/your-app"}]}