noCV
ARULE-102 · Constrain rule input

Resolve overlapping promotions with an explicit tie-break policy

Practice briefTaskIntermediate

Two promotions match the same part and the chosen discount depends on database return order.

Focused work estimate
2h 30m + prerequisites
Priority in the scenario
Medium
Engineering practice
Determinism · Business rules

Estimated field mix

  • Backend100%

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 fictional parts supplier combines contract prices with promotions. Sales needs repeatable quotes when rules change during checkout.

Setup prerequisites

  • Create synthetic products and integer minor-unit prices.
  • Implement a small local quote API.

Preceding work

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

Acceptance criteria

  • Define priority and stable-ID tie breaking.
  • Return the winning rule and losing-match reasons.
  • Evaluation is independent of input array order.

Implementation constraints

  • Use integer arithmetic and a documented rounding boundary.

Verification to include

  • Shuffle matching rules and retain the same price.
  • Exercise equal priorities and invalid discount bounds.

Deliverables

  • Deterministic resolver and ordering tests

Rollout and recovery

Compare decisions on synthetic quotes; retain the previous resolver version for rollback.

Value of the work

For the engineer: Practice deterministic rule evaluation, revision control and bounded execution.

For the team: Review explainable commercial rules without trusting opaque price changes.

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.