noCV
CHECK-103 · Exercise costly failure paths

Cover discount and tax rounding at the documented boundary

Practice briefBugIntermediate

A 10% promotion on three 19.99 items produces a one-cent difference between the cart and receipt. Add cases that pin down order-level versus line-level rounding.

Focused work estimate
1h 45m + prerequisites
Priority in the scenario
High
Engineering practice
Boundary testing · Money arithmetic · Contract testing

Estimated field mix

  • Quality engineering100%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A small commerce team has happy-path browser tests but still ships rounding and retry defects. Model a fictional shop using synthetic products, a local payment double, and explicit cart rules before adding regression coverage.

Setup prerequisites

  • Create or provide a local checkout fixture application.
  • Model products, tax rules, inventory, and a payment-provider double using synthetic data.

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Tests use the agreed line-discount-then-tax rule and include a half-cent boundary.
  • Cart, order, and payment request totals must agree in minor units.
  • A discount greater than the eligible subtotal is rejected or capped according to an explicit contract.

Implementation constraints

  • Do not reproduce the production rounding helper in expected-value code.

Verification to include

  • Assert concrete expected totals for zero, one, and three eligible items.
  • Introduce a round-at-order-end defect in the fixture and show the relevant case fails.

Deliverables

  • Pricing boundary matrix and regression tests

Rollout and recovery

Gate pricing changes with these deterministic cases; update expectations only with a reviewed rule change.

Value of the work

For the engineer: Practice risk-based test selection, stable browser automation, and diagnosis of intermittent failures.

For the team: Review whether a test suite catches business regressions and explains failures without creating noisy release gates.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.