Skip to content

Increase AI server test coverage#4

Draft
roncodes wants to merge 43 commits into
mainfrom
feature/ai-server-coverage
Draft

Increase AI server test coverage#4
roncodes wants to merge 43 commits into
mainfrom
feature/ai-server-coverage

Conversation

@roncodes

@roncodes roncodes commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

This draft PR wires backend coverage reporting into the AI package CI and brings ./server backend coverage to 100%.

Coverage reporting was also fixed for class coverage. The summary no longer reports 0.00% classes when Clover omits aggregate coveredclasses; it derives class coverage from file-level metrics instead.

Current Coverage

Latest successful backend CI run: 29675093569

Metric Current Covered / Total
Line coverage 100.00% 1332 / 1332 statements
Method coverage 100.00% 152 / 152 methods
Class coverage 100.00% 23 / 23 classes

Latest Clover check reports no uncovered backend statements.

Coverage Added

  • Added regression coverage for the class coverage summary calculation.
  • Expanded backend Pest coverage across attachment resolution, task/session controllers, admin endpoints, query executor authorization paths, provider guards, usage labels, task apply/session flows, and task/provider error handling.
  • Added protected query/helper seams where needed so tests can exercise backend branches without executing real database queries.
  • Excluded only framework-bound adapter defaults from coverage: package-load guards, Eloquent static query/create adapters, Laravel Setting/Auth/DB facade adapters, and the isolated Anthropic test-error HTTP boundary. Their calling behavior is covered through injectable/overridable helpers.
  • Fixed test formatting under the repository PHP CS Fixer rules so CI lint remains stable.

Validation

  • composer lint
  • php -l on touched backend source/test files
  • git diff --check
  • git diff --cached --check
  • GitHub Actions backend build passed with coverage artifact
  • GitHub Actions frontend build passed

Notes

Local composer test:unit remains blocked in this shell because Pest dependencies are not installed locally (Unable to find Pest. Run composer install first.). CI installs dependencies and is the authoritative backend test/coverage signal for this PR.

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