Improve Fleet-Ops server test coverage#277
Draft
roncodes wants to merge 48 commits into
Draft
Conversation
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. The current batch expands executable coverage across the package bootstrap harness, route registration, reporting schema contracts, telematics helpers, Lalamove integration value/request flows, resource serialization, support contracts, and request/resource formatting.The branch now verifies coverage locally through the same server workflow coverage command used in CI, while keeping the 100% line fail-under gate in place for the final target.
Coverage Progress
What Changed
server/src/routes.phpis executed and important API/internal groups and endpoints are asserted.FleetOpsReportSchema, including table registration, relationships, computed columns, and transformer contracts.VehicleandVehicleWithoutDriver.barryvdh/laravel-dompdfto^3.1so PHP CI fresh installs resolve Dompdf 3.x instead of the security-blocked Dompdf 2.x line.Local Validation
composer test:lintpasses.composer test:unitpasses.XDEBUG_MODE=coverage composer test:coverage:cloverpasses and writescoverage/clover.xml.XDEBUG_MODE=coverage composer coverage:baselinepasses and reports the latest coverage percentages above.composer.jsonresolves successfully and selectsbarryvdh/laravel-dompdf v3.1.2/dompdf/dompdf v3.1.6, matching CI's ignored-lock install behavior.git diff --checkandgit diff --cached --checkpass.XDEBUG_MODE=coverage composer coverage:checkcorrectly fails below the configured 100% line threshold, currently at 16.79%; this confirms the final fail-under gate is wired and still enforcing the end goal.Known Local Gate Status
composer lint,composer test:unit, andXDEBUG_MODE=coverage composer coverage:baseline; those paths were verified locally before pushing this batch.composer testcommand also runscomposer test:types. Running it locally outside the sandbox reaches PHPStan and fails with the existing source-analysis backlog (13,300PHPStan errors acrossserver/src). That type gate is not currently part of.github/workflows/server.yml, but it remains a separate local cleanup item beforecomposer testcan be called fully green.Next Coverage Targets
SyncTelematicDevicesJob,OrderFilter,Contact,Maintenance,DeviceEvent,Sensor, and maintenance schedule internals.