Skip to content

release/v0.4.21 - #100

Merged
roncodes merged 6 commits into
mainfrom
release/v0.4.21
Sep 4, 2026
Merged

release/v0.4.21#100
roncodes merged 6 commits into
mainfrom
release/v0.4.21

Conversation

@roncodes

@roncodes roncodes commented Sep 4, 2026

Copy link
Copy Markdown
Member

Release branch for v0.4.21, the patch release that restores QPay checkout.

First release cut with the new release/v0.0.0 convention.

What this branch carries

  • Version bumped to 0.4.21 in package.json, composer.json, extension.json.
  • RELEASE.md written for v0.4.21.

That's all — the workflow change for the new convention is owned by #97, not duplicated here.

Merge order (all four, in this order)

# PR Why it must come first
1 fleetbase/fleetbase#641 The reusable workflow on main still rejects anything that isn't dev-v*. Until this lands, a release/v* merge is refused with Head branch 'release/v0.4.21' is not a dev-v* release branch.
2 #97 The caller gate here still matches dev-v only. Without it the tag job is skipped silently — no tag, no publish, and a green check.
3 #99, #98 Merge into this branch. The notes describe both, so they must be in before the tag is cut.
4 this PR Merging to main fires the tag job, which pushes v0.4.21 and chains into create-release.yml and the publish jobs.

Steps 1 and 2 are independent of each other in content but both are required before step 4. Merging #97 before #641 is harmless; merging this PR before either is not.

If the tag job is skipped or fails anyway

The recovery path is unchanged — land the fix on main, then:

gh workflow run release.yml -R fleetbase/storefront -f version=0.4.21

workflow_dispatch bypasses the branch-name gate entirely, so it works regardless of the convention state.

Replace CatalogAndProductsSeeder and CheckoutOrdersSeeder with two
declarative seeders built on a shared fixtures concern:

- StoreSeeder seeds one complete store: order config, location with
  weekly hours, sandbox Stripe gateway, categories, products with
  variants and addons, published catalog, customers, an open cart, a
  pending checkout, a month of cash and Stripe orders across statuses,
  and reviews.
- NetworkSeeder seeds a marketplace: network gateway, network
  categories, five member stores (one uncategorised) and network-tagged
  orders across them.

Fixes carried over from the old seeders: core product categories are
now purged between runs, addon categories carry their store owner so
they show in the console, order statuses survive the FleetOps tracking
reset, orders are spread over the last month, and schema column lookups
are cached per table. Each seeder tags and purges only its own fixtures
while still cleaning up legacy storefront-testing data.

Also fix Network::setOptionsAttribute, which stored a raw array and made
any network save with options fail; it now encodes JSON like Store.
…etwork

Network::categories() filtered on 'network_category', a value nothing
writes, so the relation was always empty; it now matches the
'storefront_network' categories the console and v1 API use.
Network::createCategory set the owner type from 'network:storefront',
which resolves to a nonexistent class; it now resolves to the Network
model. Covered by the network category behaviour test.
QPay returns `expires_in` on /v2/auth/token as an ABSOLUTE UNIX
TIMESTAMP, not a lifetime in seconds — a live response carries
1788603222, which is 2026-09-05T10:13:42Z, roughly a day out.

setAuthToken() read it as a duration and cached the token for
`expires_in - 60` SECONDS: 1,788,603,162s, about 56.7 years. The first
token minted after deploy was therefore pinned in the cache
permanently, and once QPay expired it server-side (~24h later) every
storefront call kept sending that dead bearer token. QPay answered
NO_CREDENTIALS / "Хандах эрхгүй байна. Нэвтрэнэ үү." for correct
credentials, which broke checkout invoice creation, the capture-qpay
callback, checkout status polling, and the ebarimt receipt path.

Mint a fresh token per authentication, as before the caching was added.
That costs one round trip per QPay call, which is what the caching was
saving — not a trade worth making on a payment path. Reintroducing reuse
requires deriving the TTL from the epoch and keying on the credentials
so rotation invalidates it.

The test added with the caching mocked expires_in as 3600 — a duration,
the same wrong assumption as the code — so it agreed with the bug and
passed. It is replaced with regression coverage that uses a real
epoch-shaped response and asserts each authentication re-mints.
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7f0ba99) to head (3ee3da9).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #100   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
+ Complexity      1775      1772    -3     
===========================================
  Files            135       135           
  Lines           7785      7778    -7     
===========================================
- Hits            7785      7778    -7     
Flag Coverage Δ
backend 100.00% <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.

Cuts the patch release carrying the QPay authentication fix (#99) and the
network model repairs and testing seeder split (#98).

The release/v* workflow gate is deliberately NOT changed here — #97 owns
that, with fleetbase/fleetbase#641 behind it. Both must land before this
branch is merged, or the tag job either skips (old gate) or is refused by
the reusable workflow (gate updated, reusable workflow not yet).
refactor: split testing seeders into complete store and network fixtures
fix: stop caching the QPay access token past its real expiry
@roncodes
roncodes merged commit 490f9e5 into main Sep 4, 2026
12 of 13 checks passed
@roncodes
roncodes deleted the release/v0.4.21 branch September 4, 2026 12:06
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