Phaseline by VERIFYGet the checker
Tutorial Refund approvals

Compare two refund rules

Joe wants to waive refund approvals. Compare his proposal with the rule the shop already approved, then find the first customer transaction that changes.

Phaseline · issued approval
guarantee manager_approval when order_total > 50000 USD_cents
Phaseline · proposed waiver
guarantee manager_approval when false

Review a complete refund edition

Approved · release 1
Refunds over $500 require manager approval.
Proposed · release 2
Refunds do not require manager approval.

Find the first difference

RefundCurrent ruleProposed rule
$499.99No approvalNo approval
$500.00No approvalNo approval
$500.01Manager approvalNo approval
The owner’s decision

Mary Jane can keep the rule or approve the waiver for a new version. Finding the $500.01 case gives her a concrete decision to make. The proposal alone leaves the current rule in force.

The same case in Rego

Rego
package shop.refunds

import rego.v1

default requires_manager := false
requires_manager if input.cents > 50000

This Rego policy returns true at 50,001 cents. Rego can also compare two versions when both are supplied. Phaseline’s job inside VERIFY is to bring the approved predecessor into the comparison when Joe never mentions it.

Rego reference