The decision: When an offline approval has expired, compare the current request with the saved request and obtain fresh authority before any consequential action. An unchanged amount and recipient do not renew the old approval. A changed request needs its own review even when the saved approval’s time window has not yet ended.
What DN ran: Fifteen local cases passed against a small, original JavaScript policy. Eight cases exercise timing and request changes; seven reject invalid inputs. The records are synthetic. No workflow engine, wallet, AP2 implementation or payment provider was tested, and every valid result returns execution_authorized: false. The run was recorded at 2026-12-01T17:37:29.167Z using Node v24.22.3.
The old receipt tells you what was approved then
Consider a hypothetical team that saved approval for a R125 service payment while a reviewer was offline. The team returns to the job after the approval’s declared expiry. The saved record is valuable evidence of the earlier decision. It does not establish that the approver still holds the same authority, that the recipient and price remain acceptable, or that the payment has not already been accepted elsewhere.
The narrow task is to prepare the current request for a fresh decision. DN’s approval-to-refund reconciliation guide covers the wider purchase lifecycle. Its payment and refund ledger cannot by itself settle whether an expired authority record should be replaced. This fixture makes that time-and-payload boundary explicit.
The local rule, stated completely
The saved record supplies an approval ID and an expiry in integer Unix epoch seconds. Both the saved and proposed request identify the tenant, job, recipient, amount in declared minor units, currency, purpose and policy version. The module compares those seven request fields exactly.
For this DN teaching policy, expiry is now >= expires_at_epoch. That equality rule is a declared local choice, not a finding about all mandate protocols or workflow engines. An expired record yields “fresh authority required.” A changed request within the declared window yields “changed request requires review.” An unchanged request before expiry yields “within declared window only.” None is an execution approval.
| Input or result | Contract | Boundary |
|---|---|---|
| Amount | Nonnegative JavaScript safe integer, in the currency’s declared minor units. | No floating-point cash calculation; the module does not validate an external price or balance. |
| Currency | Exactly three uppercase letters. | Syntax check only; this is not a complete currency-code registry. |
| Expiry and current time | Explicit nonnegative safe integer epoch seconds. | The caller supplies time; no trusted-clock service or clock-drift measurement is included. |
| Changed fields | Exact comparison of tenant, job, recipient, amount, currency, purpose and policy version. | A field match does not verify a signature, account ownership or authority. |
| Execution authorization | Always false. | The output prepares review; it cannot sign, submit, renew or authorize a payment. |
Three expired-approval cases
All three examples use the same synthetic saved amount: 12,500 ZAR minor units, or R125.00. The proposed increase to 14,000 minor units is R140.00: a R15.00 increase, equal to 12% of the saved amount. These are constructed numbers, not a live quote or an actual payment.
| Case | Current request | Comparison result | Required review disposition |
|---|---|---|---|
| Unchanged after expiry | Same recipient, R125.00, same task and policy. | No compared fields changed. | Fresh authority required; unchanged content does not extend time. |
| Amount changed after expiry | Same recipient, R140.00. | Amount changed by R15.00 / 12%. | Fresh authority required, with the amount change visible. |
| Recipient changed after expiry | New synthetic recipient, R125.00. | Recipient changed. | Fresh authority required, with the recipient change visible. |
The remaining valid cases test the exact expiry instant, one second before it, and policy-version, currency and tenant changes before expiry. Equality at expiry produces the expired disposition. One second before expiry with the same payload produces only the time-window label. A policy, currency or tenant change before expiry still requires review.
The seven invalid cases cover a blank recipient, missing amount, fractional minor-unit amount, unsafe integer amount, lowercase currency, missing expiry and invalid clock input. Each raises an explicit error. Missing values are not replaced with zero, an empty recipient or “now.”
The fresh review needs a new decision record
First confirm that the reviewer currently has authority for this tenant and task. Then present the complete current request and the changed fields together. A highlighted amount difference is useful, but it should not hide an unchanged recipient or currency that still needs confirmation.
If the authorized process approves an expired or changed request, record a new decision ID and a new expiry, preserving a link to the earlier record. Editing the old timestamp would erase the distinction between the old decision and the new one. The fixture does not create that decision, verify the reviewer’s identity or silently renew a saved approval.
Before any consequential replay, the actual integration must also reconcile its acceptance and execution state. The offline worksheet cannot know whether an earlier action reached a provider. Its output remains a review instruction even when its local comparisons pass.
Where AP2 is relevant, and where this fixture stops
The current AP2 specification defines signed checkout and payment mandate concepts. Its Payment Mandate page includes payee, amount, currency and transaction binding, with optional issued-at and expiry fields. Its agent-authorization guidance describes approval and verification responsibilities. Those records illustrate why request content and authority deserve explicit treatment.
This DN schema is not an AP2 mandate, and the local module is not a conformance test or cryptographic verifier. It deliberately requires an expiry for its teaching scenario even though AP2’s published payment-mandate schema makes that field optional. It neither verifies a signature nor tests revocation, payment acceptance or settlement. The comparison rule should be adapted only within an integration’s actual authorization contract.
A useful offline handoff
For the hypothetical team, the handoff consists of the old decision ID, the current request, the declared clock value, the policy version, the changed-field list and the required reviewer. It should carry a visible statement that no execution permission was produced. Private recipient and account details should stay within the team’s authorized process; the public pack contains only clearly synthetic labels.
DN’s permission-revocation guide explains why a separate authority mechanism may also need attention. Use Decision Briefs for the research evidence supporting a system choice, while the real authorization decision remains with the relevant operator and integration.
Download and reproduce the fifteen cases
Download the complete synthetic results or the verification pack. Extract it and run node reproduce.mjs with Node supporting ECMAScript modules. The pack includes policy.mjs, the test inputs and expected dispositions, results, source references, methodology and checksums. It uses no external packages, network calls or persistent credential store.
A rerun can verify the supplied policy for these cases. It cannot establish that a real workflow has the same guard or that a user has approved anything. Recheck the fixture when the compared fields, expiry boundary or input types change. The original DN teaching code and synthetic records are CC BY 4.0; cited protocol materials retain their own terms.
Frequently asked questions
Can an unchanged request reuse an expired approval?
This DN teaching policy requires fresh authority once the declared expiry is reached, even if all compared request fields are unchanged. The actual integration’s authorization contract must govern real actions.
Does a passing result approve or send a payment?
No. Every valid result returns execution_authorized: false. The module compares synthetic records and prepares review instructions; it cannot sign or submit a payment.
Is this an AP2 or workflow-engine compliance test?
No. No AP2 implementation, workflow engine, wallet or payment provider was run. The expiry rule and comparison fields are explicitly defined DN teaching policy.
Corrections and commercial disclosure
To request a correction, use the DN contact page and include this article’s URL, the affected record ID and a dated primary source. Corrections should identify the changed claim and preserve the earlier evidence version. The free evidence pack contains the method and limitations.
This article contains no affiliate links. The optional DN Research Desk offers a scoped research service; a paid engagement does not purchase a favorable conclusion, runtime certification or permission to transact. Start with the free records before commissioning a deeper review.