Improve Fleet-Ops server test coverage - #277
Draft
roncodes wants to merge 536 commits into
Draft
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
This is a progressive backend-only coverage PR for Fleet-Ops
./server.server/tests/Unit/...andserver/tests/Feature/...instead of adding more flat root-level coverage files.response()->apiError(...)) and job dispatch branches (Job::dispatch/dispatchIf) are reachable under test — previously these fatally errored and structurally blocked coverage on nearly every controller.Latest Local Coverage
Fresh host run from
COMPOSER_PROCESS_TIMEOUT=0 composer coverage:baseline:Coverage gate verification:
php scripts/coverage-summary.php coverage/clover.xml --fail-under=100correctly fails while coverage is below 100%.Latest Progress
GeometryEngineRegistry(GEOS fallback preserved), the geocoder accepts a container-bound client (fleetops.geocoder), and allTIMESTAMPDIFF/NOW()/LEASTraw SQL goes through new driver-awareUtils::sql*helpers — a real portability win (analytics now run on sqlite).Auth::canpermission gates are now covered for real with seeded spatie permissions —UpdateDriverRequest::authorizeand driver-ping authorization included, retiring the oldest documented blocker.Place::createFromReverseGeocodingLookup,PlaceSearchgoogle branches, and the on-time/top-driver analytics are all newly covered.Validation
Run on the host runtime (asdf PHP 8.4 with Xdebug,
XDEBUG_MODE=coverage), no Docker:php -l server/tests/Feature/Http/Api/DriverControllerHelpersTest.phpphp scripts/pest-runner.php server/tests/Feature/Http/Api/DriverControllerHelpersTest.phpvendor/bin/php-cs-fixer fix --using-cache=no --sequential server/tests/Feature/Http/Api/DriverControllerHelpersTest.php scripts/pest-bootstrap.phpcomposer test:lintcomposer test:unitCOMPOSER_PROCESS_TIMEOUT=0 composer coverage:baselinephp scripts/coverage-summary.php coverage/clover.xml --fail-under=100git diff --checkgit diff --cached --checkCurrent Lowest Coverage Targets
Next backend coverage slices, from the fresh local Clover report:
server/src/Support/Analytics/OnTimeDelivery.phpserver/src/Support/ResolvesOrderServiceStops.phpserver/src/Http/Controllers/Internal/v1/LiveController.phpserver/src/Support/Ai/Capabilities/OperationalQueryCapability.phpserver/src/Http/Controllers/Internal/v1/SearchController.phpNotes