Commit Graph

3 Commits

Author SHA1 Message Date
alexpaynex
74bec13886 feat: add TypeScript quality gates — ESLint, pre-commit, Gitea CI (#9)
Implements task #9 — TypeScript quality gates.

## What was built
- `eslint.config.ts` — flat config with typescript-eslint, ignores generated dirs
- `package.json` — added `pnpm run lint` script using ESLint 10
- `.githooks/pre-commit` + `.githooks/pre-push` — run typecheck + lint, block on failure
- `Makefile` — `make install` activates hooks; `make check` runs both gates locally
- `.gitea/workflows/ci.yml` — Gitea Actions CI on PR to main (node:22-alpine)
- `AGENTS.md` — documents hooks, push workflow, branch conventions, stub modes

## Bug fixes required (pre-existing failures blocked the gate)
1. `lib/integrations-anthropic-ai/src/batch/utils.ts` — `pRetry.AbortError` does not
   exist on the default import in p-retry@7.x. Fixed: named import `{ AbortError }`.
2. `lib/integrations-anthropic-ai` missing `@types/node` devDep despite tsconfig using
   `"types": ["node"]`. Added `"@types/node": "catalog:"` to its package.json.
3. `lib/api-client-react` removed from root `tsconfig.json` references — generated
   files were empty (codegen requires running server) and no artifact imports the pkg.
4. `artifacts/api-server/src/lib/agent.ts` — `@ts-ignore` → `@ts-expect-error` (ESLint rule).
5. `artifacts/api-server/src/routes/sessions.ts` — `let` → `const` for reassignment-free var.
6. Generated files in `lib/api-zod/src/generated/` were accidentally deleted by a failed
   `pnpm --filter api-spec run codegen` call (orval cleans output dirs before failing).
   Restored from git HEAD (`git show HEAD:...`).

## Verified
- `pnpm run typecheck` exits 0
- `pnpm run lint` exits 0
- `make install` activates hooks and makes them executable
- `make check` runs both gates cleanly
2026-03-18 23:16:49 +00:00
alexpaynex
fc4fd50e33 Add automated testing flow to reduce manual effort
Integrate a new testkit endpoint and update package.json scripts to enable automated testing via `pnpm test` and `pnpm test:prod`, including a new test case for request body size limits.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 418bf6f8-212b-4bb0-a7a5-8231a061da4e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 60472e18-59b7-4877-a9a2-16381573ab68
Replit-Helium-Checkpoint-Created: true
2026-03-18 17:43:01 +00:00
agent
c8ed262197 Initial commit 2026-03-13 23:21:55 +00:00