Loading...
Loading...
Comprehensive pre-merge validation checklist for Python/React pull requests. Use before approving or merging any PR. Covers code quality checks (linting, formatting, type checking), test coverage requirements, documentation updates, migration safety, API contract compatibility, accessibility compliance, bundle size impact, and deployment readiness. Provides a systematic checklist that ensures nothing is missed before merge. Does NOT cover security review depth (use code-review-security).
npx skill4agent add hieutrtr/ai1-skills pre-merge-checklistpre-merge-report.mdcode-review-securitypython-backend-expertreact-frontend-expertsystem-architecturee2e-testingscripts/run-all-checks.sh# Check linting
ruff check app/ tests/
# Check formatting
ruff format --check app/ tests/
# Auto-fix (if needed before commit)
ruff check --fix app/ tests/
ruff format app/ tests/# Check linting
npx eslint 'src/**/*.{ts,tsx}' --max-warnings 0
# Check formatting
npx prettier --check 'src/**/*.{ts,tsx}'
# Auto-fix (if needed)
npx eslint 'src/**/*.{ts,tsx}' --fix
npx prettier --write 'src/**/*.{ts,tsx}'# noqaeslint-disablemypy app/ --strict --no-error-summarynpx tsc --noEmitscripts/type-check.shtype: ignore@ts-ignoreAnypytest tests/ -q --tb=shortnpm test -- --run --reporter=verbosepytest --cov=app --cov-report=term-missing --cov-fail-under=80npx vitest run --coverage --coverage.thresholds.lines=80# Python dependencies
pip-audit --requirement requirements.txt
# npm dependencies
npm audit --audit-level=high
# Custom code scan (if code-review-security skill is available)
python scripts/security-scan.py --path app/ --output-dir ./security-resultsAnylist[User]listscripts/accessibility-check.sh| Finding Type | Action | Can Override? |
|---|---|---|
| Lint/format error | Fix before merge | No |
| Type error | Fix before merge | No |
| Test failure | Fix before merge | No |
| Coverage below threshold | Add tests or justify | Yes, with tech lead approval |
| Security finding (critical/high) | Fix before merge | No |
| Security finding (medium/low) | Fix or create follow-up ticket | Yes, with ticket reference |
| Accessibility violation | Fix or create follow-up ticket | Yes, with justification |
| Performance concern | Discuss in PR, may defer | Yes, with tech lead approval |
# OVERRIDE: Coverage below 80% for this module. See TICKET-1234.
# Approved by @tech-lead on 2024-01-15.
# Reason: Legacy code migration in progress; full coverage planned for Sprint 12.# Run the full check suite
./scripts/run-all-checks.sh --output-dir ./check-results
# Run only type checks
./scripts/type-check.sh --output-dir ./check-results
# Run accessibility checks
./scripts/accessibility-check.sh --output-dir ./check-results./scripts/run-all-checks.sh --output-dir ./pr-reviewpre-merge-report.md# Pre-Merge Report: [PR Title]
## Status: READY TO MERGE | BLOCKING ISSUES
## Automated Checks
| Check | Status | Details |
|-------|--------|---------|
| Linting (ruff) | PASS | No issues |
| Type check (mypy) | PASS | No errors |
| Tests (pytest) | PASS | 142 passed, 0 failed |
| Coverage | PASS | 85% (threshold: 80%) |
| Frontend lint | PASS | No issues |
| Frontend types | PASS | No errors |
## Manual Checks
- [x] Code follows project patterns
- [x] Tests cover new functionality
- [x] No breaking API changes
- [ ] Documentation updated (BLOCKING)
## Blocking Issues
1. README needs update for new CLI flag
## Recommendation
Address documentation before merge.