Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,36 @@ jobs:
if: matrix.node-version == 20
run: npm run test:coverage

- name: Validate coverage thresholds
if: matrix.node-version == 20
run: |
# Extract coverage percentages from lcov report
LINES_COV=$(grep -A 3 'Lines' coverage/lcov-report/index.html | grep -oP '\d+\.\d+%' | head -1 | tr -d '%')
BRANCH_COV=$(grep -A 3 'Branches' coverage/lcov-report/index.html | grep -oP '\d+\.\d+%' | head -1 | tr -d '%')

echo "Lines coverage: ${LINES_COV}%"
echo "Branch coverage: ${BRANCH_COV}%"

# Check minimum thresholds (lines: 70%, branches: 60%)
if (( $(echo "$LINES_COV < 70" | bc -l) )); then
echo "ERROR: Lines coverage ${LINES_COV}% is below threshold of 70%"
exit 1
fi

if (( $(echo "$BRANCH_COV < 60" | bc -l) )); then
echo "ERROR: Branch coverage ${BRANCH_COV}% is below threshold of 60%"
exit 1
fi

echo "Coverage thresholds met!"

- name: Upload coverage to Codecov
if: matrix.node-version == 20
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: false
fail_ci_if_error: true

# ===========================================
# Lint and Format
Expand Down Expand Up @@ -153,11 +176,9 @@ jobs:

- name: Run npm audit
run: npm audit --audit-level=high
continue-on-error: true

- name: Run Snyk security scan
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Benchmark v3 value analysis assets (value report, metrics JSON, Python analyzers) quantifying code reduction, security, and maintainability.
- Migration guide for v1.x→v2.x with validation commands and troubleshooting tips (`docs/MIGRATION.md`).
- Audit log capturing quality rounds, coverage goals, and remediation status (`docs/audits/AUDIT_LOG.md`).

### Changed
- V3 scenario implementations rewritten to be leaner while keeping production patterns; benchmark datasets and results refreshed.
- README now highlights 30-second setup, value-focused examples, and updated benchmark summary.
- CI now enforces coverage thresholds (70% lines / 60% branches) and blocks on npm audit/Snyk failures.

### Fixed
- `serverVersion` alignment to 2.0.0 with safer env parsing for cache TTL and log levels.
- Structured error responses across tools via `errors.ts` integration.

### Security
- Profile/category resource lookups now validate IDs to prevent path traversal.
- Logger supports correlation IDs for request-scoped tracing; code analyzer rejects inputs over 1MB to avoid DoS-style processing.

## [2.0.0] - 2026-01-28

### Added - Smart Enforcement System
Expand Down
Loading