Skip to content

test: reach 100% backend coverage - #84

Open
roncodes wants to merge 2 commits into
mainfrom
feature/storefront-server-coverage-100
Open

test: reach 100% backend coverage#84
roncodes wants to merge 2 commits into
mainfrom
feature/storefront-server-coverage-100

Conversation

@roncodes

Copy link
Copy Markdown
Member

Summary

  • adds a deterministic Pest backend harness and focused contract tests across controllers, services, models, resources, commands, notifications, observers, middleware, requests, rules, routes, and provider integrations
  • exercises payment initialization and failure handling for Stripe and QPay, checkout capture and recovery, network and multi-store orders, integrated vendors, food trucks, customer authentication and verification, and commerce resource shapes
  • fixes the smallest production issues exposed by runtime tests, including checkout pickup-store resolution, storefront order configuration projection, and the Twilio-specific exception path
  • updates the coverage summary to derive class coverage from per-class statement metrics when Clover omits coveredclasses

Final coverage

  • Lines: 100.00% (6798/6798)
  • Methods: 100.00% (667/667)
  • Classes: 100.00% (134/134)
  • Raw Clover scan: 0 uncovered statements

Validation

  • composer test:unit
  • XDEBUG_MODE=coverage composer coverage:baseline
  • composer coverage:summary
  • raw coverage/clover.xml uncovered-statement scan
  • composer lint -- --sequential
  • git diff --check

All commands pass locally. The normal parallel composer lint command cannot open its localhost worker socket in the restricted local sandbox, so the same formatter was run successfully with its supported sequential mode.

Coverage exclusions

  • StorefrontServiceProvider parent-provider guards: excluded only for installed-parent dependency fallbacks that cannot be absent once the child provider class is loaded in this package runtime.
  • Storefront concurrent configuration creation fallback: excluded only for the post-conflict return reached by a true concurrent insert race; the normal creation and retrieval contracts are runtime-tested.
  • Checkout invalid-cart fallback: excluded because Cart::retrieve always returns either a persisted cart or a new Cart instance by contract, so a falsy result is unreachable.

Documentation and API impact

  • No public endpoint, payload, authentication, billing, or gateway contract changes.
  • No API specification or public documentation update is required.
  • Gateway behavior changes are test-only seams and failure-path coverage; production payment semantics are preserved.

@roncodes roncodes added type:chore Maintenance or chore agent:ready Issue is ready for AI agent triage or implementation needs-human-review Requires human review before proceeding labels Jul 26, 2026
Add a Codecov upload step to the backend CI using codecov-action@v5 with
the organization CODECOV_TOKEN, and a coverage badge to the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:ready Issue is ready for AI agent triage or implementation needs-human-review Requires human review before proceeding type:chore Maintenance or chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant