Expand escrow contract test coverage to include edge cases.#549
Expand escrow contract test coverage to include edge cases.#549code3ks wants to merge 4 commits into
Conversation
Add comprehensive edge case tests for escrow contract including: - Large-transfer request expiry before sufficient approvals - Concurrent multi-signer approvals - Large-transfer cancellation and recreation - Fee enabled/disabled scenarios - Partial release followed by refund attempts - Tax withholding with compliance contract - Dispute resolution status changes - Emergency override with/without tax withholding Resolves MettaChain#484
|
Hi @code3ks 👋 thanks for picking up issue #484 — the edge cases listed there (large-transfer expiration, concurrent signer approvals, fee-on/off flows, partial release/full refund, tax withholding, dispute resolution, emergency override) are exactly what the escrow contract needs. Quick heads-up before this can land: this PR's diff is the opposite of what the title and description claim. What the API actually reports
Why this happened (commit chain on this PR)The PR's head is currently Because Why merging it would be destructiveMerging this would silently remove the existing escrow test suite from What I'd suggest instead
If you'd like, I can sketch a non-destructive recovery branch locally (or open an accompanying PR that carries the new edge-case tests forward) — just say the word. Reference: issue #484, which is still OPEN for this work. |
|
Thanks there!
Thanks for the feedback,I’d really appreciate to get a sketch of the non
destructive recovery branch.
Thank you
…On Wed, 24 Jun 2026 at 07:16, nanaf6203-bit ***@***.***> wrote:
*nanaf6203-bit* left a comment (MettaChain/PropChain-contract#549)
<#549 (comment)>
Hi @code3ks <https://github.com/code3ks> 👋 thanks for picking up issue
#484 <#484> — the
edge cases listed there (large-transfer expiration, concurrent signer
approvals, fee-on/off flows, partial release/full refund, tax withholding,
dispute resolution, emergency override) are exactly what the escrow
contract needs.
Quick heads-up before this can land: this PR's diff is the *opposite* of
what the title and description claim.
What the API actually reports
- 1 file changed: contracts/escrow/src/tests.rs
- *+0 / −576* lines
- Net effect: the entire file — including the existing tests the repo
has carried (test_new_contract, test_set_tax_compliance_contract,
etc.) and the new edge-case tests you added — ends up *deleted*, not
expanded.
Why this happened (commit chain on this PR)
The PR's head is currently 8191667. Its commits, in chronological order:
30d03f3 test: expand escrow contract test coverage with edge cases ← your additive work
7c7bc86 Merge branch 'MettaChain:main' into main ← sync of upstream main
757a292 fix: apply rustfmt formatting to escrow tests ← formatting pass
8191667 Merge remote-tracking branch 'origin/main' ← second sync of upstream main
Because baseRefName and headRefName are both main, every "Merge …
MettaChain:main into main" / "Merge remote-tracking branch 'origin/main'"
inside the PR head effectively rebases your additive commit 30d03f3
against upstream main, and the file collapses to the upstream copy of
tests.rs — which is the pre-expansion version. Net result: the additions
from 30d03f3 are thrown away and the file gets deleted because the
upstream main head was behind when the merge conflict was (silently)
resolved to "take upstream."
Why merging it would be destructive
Merging this would silently remove the existing escrow test suite from
main, plus all the new edge-case tests you wrote. That's the opposite of
issue #484 <#484>'s
goal.
What I'd suggest instead
1. Close this PR with the destructive diff.
2. Open a fresh branch off current main, e.g.
feat/issue-484-escrow-edge-cases.
3. Recommit the additive edge-case tests from 30d03f3 (large-transfer
expiration, concurrent signer approvals, transfer cancellation cycles,
fee-enabled/disabled escrow, partial release / full refund, tax
withholding, dispute resolution status changes, emergency override) onto
that feature branch — *not* on a branch that itself is main.
4. Open a new PR with base: main and head:
feat/issue-484-escrow-edge-cases. You'll then have a clean +N / −0
additive diff and no merge-of-main into your PR head.
If you'd like, I can sketch a non-destructive recovery branch locally (or
open an accompanying PR that carries the new edge-case tests forward) —
just say the word.
Reference: issue #484
<#484>, which is
still OPEN for this work.
—
Reply to this email directly, view it on GitHub
<#549?email_source=notifications&email_token=AX64RNABP4T3HU7AYIOB7TL5BNW4XA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZYGY2DENJYGIZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4786425822>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AX64RNG6YHWRTET2JAATBS35BNW4XAVCNFSNUABFKJSXA33TNF2G64TZHM4TOMJTGEZDINBQHNEXG43VMU5TINZSHA2TGNZSGQZKC5QC>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Summary
Adds edge case test coverage for escrow contract.
Tests Added
Closes #484