Skip to content

Production hardening: linting, coverage, CI, and telemetry#5

Open
IgnazioDS wants to merge 4 commits into
mainfrom
prod/production-hardening
Open

Production hardening: linting, coverage, CI, and telemetry#5
IgnazioDS wants to merge 4 commits into
mainfrom
prod/production-hardening

Conversation

@IgnazioDS

Copy link
Copy Markdown
Owner

Summary

Brings evalops-workbench to production grade across four areas:

  1. Static Analysis — ESLint configuration with next/core-web-vitals, all checks passing
  2. Test Coverage — src/lib now at 95.89% line coverage (exceeds 80% threshold)
  3. CI/CD — GitHub Actions workflow validates lint, types, coverage, and build on every PR
  4. Honest Telemetry — Fixed LOC count to exclude build artifacts (7937 LOC authored source)

Test Plan

  • npm run lint — PASS (no ESLint errors)
  • npm run type-check — PASS (TypeScript clean)
  • npm run test:coverage — PASS (src/lib 95.89% coverage, exceeds 80% threshold)
  • npm run build — PASS (Next.js build successful)
  • New tests created for api.ts, project.ts, prototype.ts, and hooks.ts
  • Verified that coverage/ and .next are gitignored

Changes

  1. .eslintrc.json — New, configured for next/core-web-vitals
  2. package.json — Added engines constraint, test:coverage script, @vitest/coverage-v8
  3. vitest.config.ts — Added v8 coverage configuration with 80% threshold for src/lib
  4. .env.local.example — Clarified zero env var requirements (API-driven configuration)
  5. .gitignore — Added coverage/ directory
  6. scripts/compute_telemetry_static.py — Exclude .next, coverage/, lock files from LOC
  7. src/lib/api.test.ts — Test both public fetch functions with error paths
  8. src/lib/project.test.ts — Verify PROJECT spec completeness
  9. src/lib/prototype.test.ts — Validate prototype demo data
  10. src/lib/hooks.test.ts — Enhance useHotkey, useAnimatedNumber, usePolling coverage
  11. .github/workflows/nextjs-ci.yml — New CI workflow

🚀 Generated with Claude Code

IgnazioDS and others added 4 commits June 10, 2026 02:25
- Create .eslintrc.json with next/core-web-vitals configuration
- Add node engines constraint (>=20.0.0) to package.json
- Add test:coverage script and @vitest/coverage-v8 dev dependency
- Configure vitest coverage with v8 provider and 80% threshold for src/lib
- Update .env.local.example to reflect zero environment variable requirements
- Add coverage/ directory to .gitignore

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add tests achieving 95.89% line coverage for src/lib:
- api.test.ts: test fetchPublicStats and fetchBenchmarkLatest with happy path,
  error handling, and network failure scenarios
- project.test.ts: verify PROJECT exports all required fields with valid URLs
- prototype.test.ts: validate PROTOTYPE_METRICS, PROTOTYPE_CASES, PROTOTYPE_COMMANDS,
  and PROTOTYPE_REPORT with well-formed data
- hooks.test.ts: enhance coverage for useHotkey, useAnimatedNumber, and usePolling
  with keyboard event matching, animation timing, and cleanup

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update compute_telemetry_static.py to exclude .next build output, coverage/
html reports, and lock files (package-lock.json, tsconfig.tsbuildinfo) from
source line count. This ensures honest telemetry reporting per the
eleventh.dev contract.

LOC count: 7937 (authored source only, no vendored/generated code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Create .github/workflows/nextjs-ci.yml that runs on push to main and all PRs.
Workflow validates:
- ESLint rules (npm run lint)
- TypeScript types (npm run type-check)
- Test coverage threshold (npm run test:coverage)
- Build success (npm run build)

Uses Node 20 per package.json engines constraint.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evalops-workbench Ready Ready Preview, Comment Jun 9, 2026 6:29pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant