Skip to content

test: run the suite against core-api 1.6.69 and cover what its coverage gate flags - #401

Merged
roncodes merged 2 commits into
release/v0.6.72from
fix/tests-against-core-1.6.69
Oct 14, 2026
Merged

roncodes merged 2 commits into
release/v0.6.72from
fix/tests-against-core-1.6.69

Conversation

@roncodes

@roncodes roncodes commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #399, which was merged before its second commit landed on the branch. Together these turn PHP CI / build on #372 green.

1. Harness and seam fixes (the commit #399 missed):

  • DriverControllerAuthFlowsTest (4 tests): the harness never turned the core SMS guard off, so its counters lived in the shared array cache and a second text to the same number inside a file tripped the 60-second cooldown. scripts/pest-bootstrap.php now seeds sms.guard.enabled = false, the default core-api's and storefront's bootstraps already use; the tests that exercise refusals raise them from the provider fake.
  • CustomerControllerHelperSeamsTest: a code is used up by the lookup that accepts it and the live-code query is per purpose, so each check gets its own row and carries for.

2. The 100% coverage gate. It had never run on this branch (the suite failed first). With the tests passing it reported 57 statements short across 13 files of the order-operations work (OrderEdit, Events\\OrderChanged, the two push notifications, OrderEditPolicy, TrackingPublisher, Payload::syncEntities, ApiCacheThrottle and the edit seams in the API payload, entity and order controllers and the internal order controller). The second commit covers every one of them with tests; the one branch that cannot run against the required core (ApiCacheThrottle::telemetryWrite() for a core without withoutInvalidating()) carries a narrow @codeCoverageIgnore with the reason.

Locally all 507 test files pass through scripts/pest-runner.php against fleetbase/core-api 1.6.69, and a coverage run over the files that exercise those 13 classes shows every flagged line covered. No runtime behaviour changes.

… its own row

Against core-api 1.6.69 the suite hit the real guard with its counters in the
shared cache: a second text to the same number inside a file tripped the
60-second cooldown, so driver login tests got a 429 refusal where they expect
the transport failure or the refusal they staged themselves. The bootstrap now
seeds sms.guard.enabled = false, as core-api's and storefront's do; the tests
that exercise refusals raise them from the provider fake.

The helper-seams test reused one code for two lookups and omitted the purpose;
a code is used up by the lookup that accepts it and the live-code query is per
purpose, so each check gets its own row and carries 'for'.
The gate never ran before: the suite failed first. With the tests passing it
reports 57 statements short across the order edit, its event, notifications,
policy, tracking publisher, payload sync and the controllers that begin and
refuse edits. This covers them: an edit's policy, marked changes, schedule,
cash, contact and item detection with the kitchen flag, orders with no or an
unsaved payload, the summary's fallbacks; order.changed's customer channel,
session editor, missing driver and null place; push builders reaching for the
FCM and APN clients; a config that cannot answer, cannot load, and times that
do not parse; route changes queued for tracking; caching switched off; the
controllers' begin, locked-edit and switched-payload cash paths; replaced
drivers told on bulk assignment; and the entity sync's non-array inputs.

The older-core branch in ApiCacheThrottle::telemetryWrite() cannot run against
the core this package requires and is marked for coverage with the reason.
@roncodes roncodes changed the title test: keep the SMS guard off in the harness and give each code lookup its own row test: run the suite against core-api 1.6.69 and cover what its coverage gate flags Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (865d9d8) to head (10a5d91).
⚠️ Report is 122 commits behind head on release/v0.6.72.

Additional details and impacted files
@@                  Coverage Diff                  @@
##             release/v0.6.72      #401     +/-   ##
=====================================================
  Coverage             100.00%   100.00%             
- Complexity             12379     13585   +1206     
=====================================================
  Files                    600       634     +34     
  Lines                  46496     49308   +2812     
=====================================================
+ Hits                   46496     49308   +2812     
Flag Coverage Δ
backend 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roncodes
roncodes merged commit 7378dce into release/v0.6.72 Oct 14, 2026
7 of 8 checks passed
@roncodes
roncodes deleted the fix/tests-against-core-1.6.69 branch October 14, 2026 07:19
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