# Returns and store credit on the same starting release

One operator wrote three shop requests and a policy oracle before the draw. The previous trial gave Python a small general-purpose fix for newly named guarantees. We applied that very same patch to the adapter used by Alloy, issued the missing v5 in a copy of its own v4 book, and kept the two existing v5 books. All three held exactly the same edition, catalog bindings, effect, permissions and evaluator timeout. There was one scripted approval to catch Alloy up. Its Java solver and relational model generator needed zero edits.

The [freeze](display-freeze.json) covers the evaluator sources, the combined freeze/draw script, the candidates, the test grid, the oracle and the starting edition. Its SHA-256 was posted to VERIFY's GitHub issue 196 before a single operating-system random draw. Candidate 2 of 3 was selected. The test operator knew the candidate families. One operator translated the selected request into two declarations shared by all arms. All three received structured input. No participant discovery, live model, outside merchant or engineering-time comparison was conducted.

The frozen v5 check compares three promises at eight amounts for all four combinations of two purchase facts. The same oracle checks v6. The full checkout uses a self-hosted Spree store, synthetic USD tender, single-item orders, test-only shoppers and store credit. It creates one prior display order and 24 fresh orders per arm. A read-only test observer evaluates return eligibility using the edition and SKU pinned to the real order. Spree actually issues the credit. An amount too small to earn credit can settle without an item's missing classification. Each credit hold is counted once per affected purchase. We left those facts unanswered. No person was interrupted. The run also attempts an unauthorized issue, retries the authorized issue, reopens the release book, and repeats each settled credit operation.

## Store interruption

The [recovery record](display-recovery.json) identifies the affected case. During the Python leg the store throttled one synthetic customer registration and cached its HTTP 429 response. After the limit reset, a retry returned the cached response with 599 requests available. Direct PostgreSQL checks found zero customers and zero orders for that test email. The operator reissued just the registration, verified the email, then continued with the original payment, order and credit operation keys. We retained prior receipts and added pacing to the common test driver. This took one operator intervention in the Python leg. It changed no evaluator, policy, release library or production store connector. The three runs cannot support a wall-clock ranking.

## Replay

Use a disposable store. First follow checkout-trial.md through v4 and named-trial.md through v5. Retain those books separately. Extract the published capacity kit into a fresh directory. In that extraction apply the previous named-rule fix to the shared Python and Alloy adapter. This change is already included in the fully equipped v5 baseline for the comparison.

```sh
patch -p1 < python-named-rule.patch
mkdir -p java
javac -cp "$ALLOY_JAR" -d java ReadProfiles.java
export ALLOY_CP="$PWD/java:$ALLOY_JAR"
mkdir matched
python3 three_arm_trial.py equalize matched --v4 /path/to/successive --v5 /path/to/named-replay
```

For replay of the published card, use the following command in place of a fresh random draw. A new invocation of the draw command is a different experiment. Use your store's own edition and catalog fingerprints.

```sh
python3 - <<'PY'
import hashlib, json, uuid
from pathlib import Path
directory = Path("matched")
freeze = directory / "freeze.json"
published = json.loads(Path("display-results.json").read_text())["draw"]
with (directory / "draw.json").open("x") as out:
    json.dump(dict(published, freeze_sha256=hashlib.sha256(freeze.read_bytes()).hexdigest(),
                   run="replay-" + uuid.uuid4().hex[:12]), out)
PY
python3 display_return_trial.py matched /path/to/private-store /path/to/catalog.json
python3 display_ledger.py matched/results.json matched/ledger.json psql -d spree_production
```

The last command requires read access to your test store's PostgreSQL database. The public download contains no credentials or customer data. The order references are for synthetic test purchases.
