Repository navigation
Conversation
After checkout, and after clear (DELETE rotates in a new cart), the server's empty cart has deliveryAddressId "". The first write stamps the account address on it, so reconcile saw "" -> address as a collateral per-cart address change and reported "matches neither the intended nor the original state" even though the write succeeded. Treat an unset per-cart address as matching any address. One real address replacing another is still divergent.
There was a problem hiding this comment.
🛡️ Sentinel review
Please narrow the empty-address wildcard to the target cart so collateral address clears on other carts still diverge.
1 inline comment below.
Automated review via deepseek:deepseek-v4-pro + deepseek:deepseek-v4-pro verifier. Findings only — not an approval. Push new commits to re-review.
…otation Review on yashiels#61: the empty-address wildcard applied to every cart, so a collateral clear of a non-target cart's address read as success. Now unset -> set matches only when the new address is the account address (the server stamping a fresh cart), and set -> unset only on the target cart (DELETE rotation). Everything else stays divergent.
There was a problem hiding this comment.
🛡️ Sentinel review
The target-cart empty-address allowance is too broad for non-DELETE mutations; restrict it to rotations.
1 inline comment below.
Automated review via deepseek:deepseek-flash + deepseek:deepseek-v4-pro verifier. Findings only — not an approval. Push new commits to re-review.
…LETE Codex review: set -> unset on the target cart was accepted for any write, so a normal /carts/update that cleared the cart's address reported success. It is now accepted only when the write was a DELETE and the target cart came back with a new id. The fake DELETE now clears the address like the real server, and the old test that codified the unsafe case is replaced by a clear test and a negative update test.
|
Second review pass: fixed in 316a806. The previous commit still accepted a target cart losing its address on a normal |
Problem
addandclearprint "Cart write dispatched but the cart matches neither the intended nor the original state" (exit 6) even though the write succeeded. Reproduced live:deliveryAddressIdis"". The firstaddstamps the account address on it.clear:DELETErotates in a new cart withdeliveryAddressId: "".reconcilecompares each cart's address strictly, so""→ address (or the reverse) reads as a collateral per-cart address change, and the outcome is divergent.Fix
In the reconcile comparison, an unset (
"") per-cart address matches any address. One real address replacing another is still divergent; the existing collateral-change tests are unchanged and still pass. The top-leveldeliveryAddressIdcomparison is untouched.Testing
make cipasses. Two new tests (fresh cart gets stamped; rotated cart comes back unaddressed) fail without the fix and pass with it.clear, thenaddto the fresh cart, thenclearagain. All three report✅ Done; before the fix, each one exited 6.Independent of #60.