Production hardening: linting, coverage, CI, and telemetry#5
Open
IgnazioDS wants to merge 4 commits into
Open
Conversation
- 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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings evalops-workbench to production grade across four areas:
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)Changes
.eslintrc.json— New, configured for next/core-web-vitalspackage.json— Added engines constraint, test:coverage script, @vitest/coverage-v8vitest.config.ts— Added v8 coverage configuration with 80% threshold for src/lib.env.local.example— Clarified zero env var requirements (API-driven configuration).gitignore— Added coverage/ directoryscripts/compute_telemetry_static.py— Exclude .next, coverage/, lock files from LOCsrc/lib/api.test.ts— Test both public fetch functions with error pathssrc/lib/project.test.ts— Verify PROJECT spec completenesssrc/lib/prototype.test.ts— Validate prototype demo datasrc/lib/hooks.test.ts— Enhance useHotkey, useAnimatedNumber, usePolling coverage.github/workflows/nextjs-ci.yml— New CI workflow🚀 Generated with Claude Code