Repository navigation
feat(wallet): offer to finish a send whose asset lock is held - #1423
romchornyi wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
🕓 Review not started yet because this PR is a draft.
Commit 888305c. Normal review starts when eligible; priority review starts as soon as a slot is available. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The lock-held outcome is wired coherently through the executor, router, flow, sheet, and existing recovery service. Static verification finds two blocking issues: the new ViewModel omits Combine despite using ObservableObject and Published, and the externally visible fourth outcome is not recorded in the ADR or feature documentation required by the repository rules. The production resumer is covered only through a fake in the new tests; the simulator test remains in progress, so no CI result is available yet.
🔴 2 blocking | 🟡 1 suggestion(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a cross-cutting behavioral change spanning send outcome handling, asset-lock recovery, SwiftUI flow state, localization, project configuration, and tests, but it does not directly alter the critical funds-movement implementation itself. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldViewModel.swift`:
- [BLOCKING] DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldViewModel.swift:18: Import Combine for ObservableObject and Published
This new source imports only Foundation but declares SendLockHeldViewModel as ObservableObject and uses @Published. Both symbols are provided by Combine, which Foundation does not re-export, so the app target cannot compile this file. Add the missing import before Foundation.
- [SUGGESTION] DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldViewModel.swift:28-31: Exercise the production lock-resume path
The new ViewModel tests inject a fake HeldAssetLockResuming, so they do not verify that LiveHeldAssetLockResumer passes the captured outpoint into AssetLockRecoveryService.retry, that funding types 4 and 5 select the correct resume routes, or that the real recovery result and authorization behavior work with the persisted lock and recipient records. This is the new Finish action for a money-moving flow. Add a focused funded-wallet simulator or integration check covering Finish success, PIN cancellation, and recovery for the affected funding types.
In `DashWallet/Sources/UI/Payments/ExternalSend/Domain/SendOutcome.swift`:
- [BLOCKING] DashWallet/Sources/UI/Payments/ExternalSend/Domain/SendOutcome.swift:41-43: Record and document lockHeld as the fourth send outcome
This change adds lockHeld as a fourth externally visible send outcome, but ADR-0040 still chooses exactly three outcomes and the external-send feature summary still describes only sent, not sent, and in progress. That is a cross-module payment-state contract change affecting the executor, router, flow, and UI. Under ADR-0001, the decision must be recorded in the same PR: revise the Proposed decision or add a superseding Proposed ADR, update docs/adr/README.md, and update the feature summary so it no longer claims that every post-source failure finishes on its own.
Out-of-scope follow-up suggestions (1)
These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.
- Track the Core-to-Identity held-lock recovery gap — The Core-to-Identity path still maps a post-lock failure from topUpIdentityWithFunding to inFlight, whose existing UI promises that the transfer will finish on its own. The new lock-held sheet cannot handle that route because the SDK call does not return an asset-lock outpoint; this is an adjacent pre-existing limitation rather than a regression in the changed routes, but the misleading state should not be left untracked.
- Follow-up: Create or link a follow-up issue for Core-to-Identity held-lock recovery or an honest non-resuming result once the SDK exposes the required outpoint and recipient data.
| // limitations under the License. | ||
| // | ||
|
|
||
| import Foundation |
There was a problem hiding this comment.
✅ Resolved at
5ce63dab; see the replies below.
🔴 Blocking: Import Combine for ObservableObject and Published
This new source imports only Foundation but declares SendLockHeldViewModel as ObservableObject and uses @published. Both symbols are provided by Combine, which Foundation does not re-export, so the app target cannot compile this file. Add the missing import before Foundation.
| import Foundation | |
| import Combine | |
| import Foundation |
source: gpt-6.1-sol (phase2-reviewer: general)
There was a problem hiding this comment.
Fixed in d868dff. The file now imports Combine, like the other External Send view models.
There was a problem hiding this comment.
Resolved (re-reviewed at 5ce63dab): SendLockHeldViewModel.swift now imports Combine before Foundation, providing the ObservableObject and Published declarations required by the app target.
| /// The money left the source into an asset lock that is recorded, and the Platform step did not finish: it stays | ||
| /// in the lock until the lock is resumed. | ||
| case lockHeld(HeldAssetLock) |
There was a problem hiding this comment.
✅ Resolved at
5ce63dab; see the replies below.
🔴 Blocking: Record and document lockHeld as the fourth send outcome
This change adds lockHeld as a fourth externally visible send outcome, but ADR-0040 still chooses exactly three outcomes and the external-send feature summary still describes only sent, not sent, and in progress. That is a cross-module payment-state contract change affecting the executor, router, flow, and UI. Under ADR-0001, the decision must be recorded in the same PR: revise the Proposed decision or add a superseding Proposed ADR, update docs/adr/README.md, and update the feature summary so it no longer claims that every post-source failure finishes on its own.
source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.1-sol (phase2-reviewer: general)
There was a problem hiding this comment.
Fixed in d868dff. ADR-0040 (still Proposed) now records the fourth outcome, lockHeld, and its Finish resume. The index row and the feature summary describe four outcomes and no longer say that every failure after the money left finishes on its own. The file name stays the same so existing links keep working.
There was a problem hiding this comment.
Resolved (re-reviewed at 5ce63dab): The original cross-module documentation omission is fixed: ADR-0040 now records lockHeld and its Finish behavior, the ADR index reflects the updated title, and the external-send feature summary describes all four outcomes. The remaining stale sentence is a narrower documentation inconsistency reported separately on this head.
| struct LiveHeldAssetLockResumer: HeldAssetLockResuming { | ||
| func resume(_ lock: HeldAssetLock) async throws -> AssetLockRecoveryService.Outcome { | ||
| try await AssetLockRecoveryService().retry( | ||
| fundingTypeRaw: lock.fundingTypeRaw, txidWire: lock.txidWire, vout: lock.vout) |
There was a problem hiding this comment.
⏭️ Deferred (maintainer decision; not blocking) at
5ce63dab; see the replies below.
🟡 Suggestion: Exercise the production lock-resume path
The new ViewModel tests inject a fake HeldAssetLockResuming, so they do not verify that LiveHeldAssetLockResumer passes the captured outpoint into AssetLockRecoveryService.retry, that funding types 4 and 5 select the correct resume routes, or that the real recovery result and authorization behavior work with the persisted lock and recipient records. This is the new Finish action for a money-moving flow. Add a focused funded-wallet simulator or integration check covering Finish success, PIN cancellation, and recovery for the affected funding types.
source: gpt-6.1-sol (phase2-reviewer: general)
There was a problem hiding this comment.
Partly fixed in d868dff: LiveHeldAssetLockResumer now takes its retry as a seam, and a test checks that it passes the held outpoint and funding type (4 and 5) to the retry. Deferred: Finish against a real build (success, PIN cancel, both funding types) will be a Maestro flow with a Debug fault switch after the lock, tracked in #1422.
There was a problem hiding this comment.
Deferred (re-reviewed at 5ce63dab): The new seam test verifies that LiveHeldAssetLockResumer forwards the held outpoint and funding types 4 and 5. The remaining funded-wallet Finish success and PIN-cancellation flow is a reasonable, tracked deferral to the Maestro work in #1422.
…rt Combine Review round 1 on #1423: - ADR-0040 (Proposed) records the fourth outcome, lockHeld, and the index and feature summary no longer promise that every failure after the money left finishes on its own. - SendLockHeldViewModel imports Combine. - LiveHeldAssetLockResumer takes its retry as a seam; a test checks it passes the held outpoint and funding type (4 and 5) to the retry. Co-Authored-By: Claude Opus 5.5 <[email protected]> SDD-Published-From: bfd878ad49301f452978fc68c12b47292148716c
|
On the out-of-scope note about Core → Identity: it is already tracked in #1422. That route still reports a held lock as in progress because the SDK call returns no outpoint. The outpoint will come from dashpay/platform#5928 (a held-lock delivery state), and after that the route moves to |
d868dff to
5ce63da
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The exact head correctly implements the lockHeld outcome, carries the recorded lock through Finish, and documents the four-outcome external-send contract. Exact-head CI reports the simulator tests, accessibility audit, target-membership check, recovery check, workflow lint, and title validation passing; one internal contradiction remains in ADR-0040's decision paragraph.
🟡 1 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a substantial but contained change to external-send outcome handling, recovery orchestration, SwiftUI flow, localization, and tests, but it does not itself alter consensus, cryptography, key handling, storage migrations, or the underlying funds-movement implementation. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md`:
- [SUGGESTION] docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md:35: Update the ADR decision statement to include lockHeld
The revised ADR records `lockHeld` in the paragraph below, but the main Decision statement still says that the executor reports one of three outcomes and that any doubt is reported as `inFlight`. This makes the architecture record internally contradictory: a recorded held lock is now intentionally distinct from an unknown submitted result and offers Finish rather than the in-progress behavior. Rewrite this sentence to describe the four outcomes and distinguish `lockHeld` from `inFlight`.
| @@ -29,6 +34,12 @@ later adds a fourth outcome for Shielded → Identity. | |||
|
|
|||
| **Chosen:** option 1, the executor reports one of three outcomes and only `notSent` offers Retry; any doubt is reported as `inFlight`. Balances update with a delay after SPV or Platform sync, so a balance check could miss a payment that already left; the three outcomes follow the SDK's own no-retry contract. | |||
There was a problem hiding this comment.
✅ Resolved at
75c8a203; see the replies below.
🟡 Suggestion: Update the ADR decision statement to include lockHeld
The revised ADR records lockHeld in the paragraph below, but the main Decision statement still says that the executor reports one of three outcomes and that any doubt is reported as inFlight. This makes the architecture record internally contradictory: a recorded held lock is now intentionally distinct from an unknown submitted result and offers Finish rather than the in-progress behavior. Rewrite this sentence to describe the four outcomes and distinguish lockHeld from inFlight.
source: gpt-6.1-sol (phase2-reviewer: general)
There was a problem hiding this comment.
Fixed in 75c8a20: the Decision statement now names the four outcomes and separates lockHeld (a recorded lock, Finish) from inFlight (submitted, outcome unknown).
There was a problem hiding this comment.
Resolved (re-reviewed at 75c8a203): The requested main Decision sentence now names all four outcomes and separates lockHeld from inFlight. A separate residual wording issue remains in the sentence's final “three outcomes” clause and is reported as a new documentation finding.
5ce63da to
75c8a20
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The exact-head implementation correctly adds the held-lock outcome and Finish flow, and the reported CI checks for tests, target membership, accessibility, workflow lint, recovery, and title validation succeeded. Two documentation comments remain stale: ADR-0040 still refers to three outcomes in its final clause, and SendOutcome's contract comment does not describe the lockHeld/Finish case.
🟡 1 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Follow-up candidates (optional) (1)
New non-blocking observations on code unchanged since the last full review. No inline threads are opened for them and later reviews do not repeat them: fix forward or track separately if they are worth it.
🟡 Suggestion: Update the SendOutcome contract comment for lockHeld
DashWallet/Sources/UI/Payments/ExternalSend/Domain/SendOutcome.swift:35-36
The type comment still describes only notSent and inFlight. The new lockHeld outcome is neither an in-progress unknown result nor a Retry case: it represents a recorded asset lock and offers Finish instead. Update the comment so callers and maintainers do not misclassify this payment state.
/// What happened to a send. Only `notSent` offers Retry and only `lockHeld` offers Finish; a submitted payment whose result is unknown is `inFlight` (ADR-0040).
source: muse-spark-1.3-contributor (phase1-reviewer: general)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a substantial, cross-cutting UI and send-flow change that alters recovery behavior for held asset locks and funds movement, but it does not itself change consensus, cryptography, key handling, or other critical-surface implementation criteria. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Code unchanged since the last final review (
5ce63dab): 1 new suggestion(s) listed as follow-up candidates, not posted inline - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md`:
- [SUGGESTION] docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md:35: Fix the stale “three outcomes” clause in the revised Decision
The revised Decision statement now correctly names four outcomes and distinguishes lockHeld from inFlight, but the final clause still says “the three outcomes follow the SDK's own no-retry contract.” This leaves the ADR internally contradictory. Change that clause to refer to all four outcomes.
| ## Decision outcome | ||
|
|
||
| **Chosen:** option 1, the executor reports one of three outcomes and only `notSent` offers Retry; any doubt is reported as `inFlight`. Balances update with a delay after SPV or Platform sync, so a balance check could miss a payment that already left; the three outcomes follow the SDK's own no-retry contract. | ||
| **Chosen:** option 1, extended by the revision below to four outcomes: the executor reports `sent`, `notSent`, `inFlight` or `lockHeld`, and only `notSent` offers Retry. A doubt about a submitted payment is reported as `inFlight`; a recorded asset lock whose Platform step did not finish is `lockHeld`, which offers Finish instead. Balances update with a delay after SPV or Platform sync, so a balance check could miss a payment that already left; the three outcomes follow the SDK's own no-retry contract. |
There was a problem hiding this comment.
✅ Resolved at
8d747f92; see the replies below.
🟡 Suggestion: Fix the stale “three outcomes” clause in the revised Decision
The revised Decision statement now correctly names four outcomes and distinguishes lockHeld from inFlight, but the final clause still says “the three outcomes follow the SDK's own no-retry contract.” This leaves the ADR internally contradictory. Change that clause to refer to all four outcomes.
source: muse-spark-1.3-contributor (phase1-reviewer: general)
There was a problem hiding this comment.
Fixed in 8d747f9: ADR-0040's revised Decision and the executor test contract comment now say four outcomes.
There was a problem hiding this comment.
Resolved (re-reviewed at 8d747f92): The closing clause of ADR-0040’s Decision now says four outcomes, consistent with the list at the start.
75c8a20 to
dece9d2
Compare
dece9d2 to
462ca1a
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The held-lock outcome is correctly modeled, routed through the existing authenticated recovery path, and covered by the reported passing unit, target-membership, and accessibility checks on the reviewed head. One documentation inconsistency remains in ADR-0040 and should be corrected for the decision record to match the four-outcome implementation.
🟡 1 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Still open from earlier rounds (1)
- 🟡 Suggestion: Fix the stale “three outcomes” clause in the revised Decision —
docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md:35(thread)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a substantial but contained change to external-send flow, asset-lock recovery UI, routing, localization, and tests; although it resumes funds movement, the diff does not alter consensus, cryptography, signing, key handling, or coin selection. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md`:
- [SUGGESTION] docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md:35: Fix the stale “three outcomes” clause in the revised Decision
(carried; thread: https://github.com/dashpay/dashwallet-ios/pull/1423#discussion_r4580746639)
462ca1a to
998b237
Compare
998b237 to
ef21ed4
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The implementation correctly adds the recorded-lock outcome and authenticated resume path, with the relevant routing, SwiftUI flow, target membership, and seam coverage present. Two documentation comments remain stale: ADR-0040 still refers to three outcomes, and the executor test contract still says three outcomes. The simulator test check is still in progress; no failed code check is present in the supplied CI snapshot.
🟡 2 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
1 finding(s) not shown inline (the lines are not part of this PR's diff)
🟡 Suggestion: Update the executor test contract comment to mention four outcomes
DashWalletTests/ExternalSend/ExternalSendExecutorTests.swift:25
This test suite now exercises .lockHeld, including executor mapping and held-lock routing, but its suite-level contract comment still says the executor has "one of three outcomes." Update the comment so it accurately describes the production contract covered by these tests.
/// the binding fee, broadcast only on `send`, one of four outcomes, one log line per outcome.
source: gpt-6.1-sol (phase2-reviewer: general)
Still open from earlier rounds (1)
- 🟡 Suggestion: Fix the stale “three outcomes” clause in the revised Decision —
docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md:35(thread)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — The change is large and intricate and modifies funds-movement recovery in ExternalSendExecutor, ShieldedTransferCoordinator, and AssetLockRecoveryService integration, including when a previously broadcast asset lock is resumed. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `DashWalletTests/ExternalSend/ExternalSendExecutorTests.swift`:
- [SUGGESTION] DashWalletTests/ExternalSend/ExternalSendExecutorTests.swift:25: Update the executor test contract comment to mention four outcomes
This test suite now exercises `.lockHeld`, including executor mapping and held-lock routing, but its suite-level contract comment still says the executor has "one of three outcomes." Update the comment so it accurately describes the production contract covered by these tests.
In `docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md`:
- [SUGGESTION] docs/adr/0040-report-three-send-outcomes-and-retry-only-when-nothing-left-the-source.md:35: Fix the stale “three outcomes” clause in the revised Decision
(carried; thread: https://github.com/dashpay/dashwallet-ios/pull/1423#discussion_r4580746639)
ef21ed4 to
d4b9763
Compare
d4b9763 to
c505dca
Compare
c505dca to
8e50d18
Compare
|
Round 7 (8d747f9): the holder can leave Finish during the proof wait; four outcomes in ADR-0040 and the executor test contract; develop's new |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
This revision lets users leave Finish during a proof wait and updates the ADR and executor test to describe four outcomes. A late recovery success can still change the flow’s screen after Close. Exact-head CI passed the simulator tests, target-membership, accessibility, workflow-lint, and recovery checks; this static review did not observe Finish on a funded wallet.
🔴 1 blocking | 🟡 2 suggestion(s)
Still open from earlier rounds (1)
- 🔴 Blocking: Require evidence of a recoverable lock before offering Finish —
DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift:916-918(thread)
Follow-up candidates (optional) (2)
New non-blocking observations on code unchanged since the last full review. No inline threads are opened for them and later reviews do not repeat them: fix forward or track separately if they are worth it.
🟡 Suggestion: Explain how to check the transfer when leaving Confirm early
DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendOutcomeRouter.swift:61-62
runTwoStep enables Close while the Core funding call is pending. ConfirmViewModel.closeWhileWaitingForNetwork() immediately reports .inFlight, and confirm() then drops the actual outcome, so a later .lockHeld never reaches this new branch. The resulting toast says the send can take a few minutes to finish but gives no way to discover that the lock needs manual recovery. Keep Close available and preserve the warning not to send again, but tell users that the result is not yet known and that they can check the original transaction details.
source: muse-spark-1.3-contributor (phase1-reviewer: general)
🟡 Suggestion: Update the SendOutcome contract comment for four outcomes
DashWallet/Sources/UI/Payments/ExternalSend/Domain/SendOutcome.swift:35-39
The enum header still sends every error not proven to be pre-broadcast to .inFlight, contradicting the new .lockHeld case and its Finish action. The .inFlight case comment also promises that sync will settle it, although that case is used when the outcome is unknown. Document which action each outcome permits without promising automatic completion.
/// What happened to a send. Only `notSent` offers Retry and only `lockHeld` offers Finish (ADR-0040).
enum SendOutcome {
case sent
/// The outcome is unknown; offers neither Retry nor Finish.
source: muse-spark-1.3-contributor (phase1-reviewer: general)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.2-sol(effort low) — The change adds a send outcome and an asynchronous recovery flow, but it delegates funds movement to the existing recovery service without changing how transactions are built, signed, or broadcast. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Code unchanged since the last final review (
c82ec02a): 2 new suggestion(s) listed as follow-up candidates, not posted inline - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldViewModel.swift`:
- [SUGGESTION] DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldViewModel.swift:126-128: Do not present unverified lock consumption as confirmed
`AssetLockRecoveryService` can return `.completionUnconfirmed` from an advisory already-consumed report, without verified consumption. The lock can remain nonterminal, and the advisory record excludes it from bulk recovery while transaction details still allows an explicit recheck. Closing the new sheet with “Already spent — nothing to transfer” tells the user to stop looking even though the transfer may still need attention. Say that completion could not be verified and point the user to the original transaction details without suggesting a new payment.
In `DashWallet/Sources/UI/Payments/ExternalSend/ExternalSendFlow.swift`:
- [SUGGESTION] DashWallet/Sources/UI/Payments/ExternalSend/ExternalSendFlow.swift:424-425: Ignore late Finish results before changing the closed flow’s screen
A successful resume after Close sets the published `step` to `.sent` before `finish()` reaches its `isEnded` guard. No second finish event is emitted, but the step change still drives the sheet’s presentation binding while the host may be dismissing. Guard before changing `step`, and extend the close-during-Finish test to assert that the late completion leaves the step unchanged, not just that it emits no second event.
In `DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift`:
- [BLOCKING] DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift:916-918: Require evidence of a recoverable lock before offering Finish
(carried; thread: https://github.com/dashpay/dashwallet-ios/pull/1423#discussion_r4618784253)
| case .completionUnconfirmed: | ||
| return .info(NSLocalizedString( | ||
| "Already spent — nothing to transfer", comment: "Asset-lock retry found the lock already consumed")) |
There was a problem hiding this comment.
✅ Resolved at
e0d58356; see the replies below.
🟡 Suggestion: Do not present unverified lock consumption as confirmed
AssetLockRecoveryService can return .completionUnconfirmed from an advisory already-consumed report, without verified consumption. The lock can remain nonterminal, and the advisory record excludes it from bulk recovery while transaction details still allows an explicit recheck. Closing the new sheet with “Already spent — nothing to transfer” tells the user to stop looking even though the transfer may still need attention. Say that completion could not be verified and point the user to the original transaction details without suggesting a new payment.
source: gpt-6.2-sol (phase2-reviewer: security-auditor)
There was a problem hiding this comment.
Fixed in 52f1d5e: .completionUnconfirmed no longer claims the lock was spent. It reads "Couldn't confirm the transfer finished. Check it in the original transaction's details." (new key in all 43 locales); the test pins the text.
There was a problem hiding this comment.
Resolved (re-reviewed at e0d58356): Your revised copy is present in all 43 main-app catalogs. The ViewModel test verifies that .completionUnconfirmed points to the original transaction without claiming the lock was spent.
| private func finishedLockHeld(_ result: SendLockHeldViewModel.Result) { | ||
| switch result { |
There was a problem hiding this comment.
✅ Resolved at
b0ff0ad0; see the replies below.
🟡 Suggestion: Ignore late Finish results before changing the closed flow’s screen
A successful resume after Close sets the published step to .sent before finish() reaches its isEnded guard. No second finish event is emitted, but the step change still drives the sheet’s presentation binding while the host may be dismissing. Guard before changing step, and extend the close-during-Finish test to assert that the late completion leaves the step unchanged, not just that it emits no second event.
| private func finishedLockHeld(_ result: SendLockHeldViewModel.Result) { | |
| switch result { | |
| private func finishedLockHeld(_ result: SendLockHeldViewModel.Result) { | |
| guard !isEnded else { return } | |
| switch result { |
source: gpt-6.2-sol (phase2-reviewer: general)
There was a problem hiding this comment.
Resolved (re-reviewed at b0ff0ad0): Your isEnded guard now runs before the result switch, so a late completion cannot move a closed flow to .sent.
8d747f9 to
b0ff0ad
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 2 only (queue backlog)
Changes requested: 1 blocker
- Require evidence of a recoverable lock before offering Finish —
DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift:956-958(thread, carried)
Impact: A user who confirms a non-Max Core-to-Shielded send whose recipient record fails to save is told their Dash is held and offered Finish, even though the SDK abandoned the lock before broadcast.
New on this head: This revision uses the shared scroll layout for the held-lock sheet and ignores Finish results that arrive after the send flow closes. At the reviewed head, the simulator suite, test-target membership check, workflow lint, recovery check, and accessibility audit passed; the review check was pending.
🔴 1 blocking | 🟡 2 suggestion(s)
Still open from earlier rounds (2)
- 🔴 Blocking: Require evidence of a recoverable lock before offering Finish —
DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift:956-958(thread) - 🟡 Suggestion: Do not present unverified lock consumption as confirmed —
DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldViewModel.swift:126-128(thread)
Review provenance
Source: reviewer 1: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.2-sol(effort low) — The diff adds a recovery outcome and a user-triggered SwiftUI flow that reuses the existing authenticated retry service without changing how funds are moved. - Phase 1 reviewers: not run (skipped for throughput: 15 PRs queued, above the 10 limit)
- Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldSheet.swift`:
- [SUGGESTION] DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldSheet.swift:33: The Finish sheet's scroll area extends below the sheet at its height cap
Impact: When large text or a short screen pushes the Finish sheet to its height cap, the bottom of the scroll area extends past the visible body even at the end of scrolling.
The scroll view calculates its end position for a taller viewport than the capped sheet provides. This revision switches to `CappedSheetBody`, which subtracts 72 points from the cap (`ConfirmSheet.swift:175–192`). The pinned DashUIKit `BottomSheet` puts an 18-point grabber and a navigation bar at least 74 points high above the body, leaving at least 20 points less room than the helper assumes. The body's 20-point bottom padding can absorb the nominal difference, so this does not establish that Close is unreachable. Size the viewport from the actual space below the header, or derive its cap from the same header and detent sizing inputs as DashUIKit.
In `DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift`:
- [BLOCKING] DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift:956-958: Require evidence of a recoverable lock before offering Finish
(carried; thread: https://github.com/dashpay/dashwallet-ios/pull/1423#discussion_r4618784253)
In `DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldViewModel.swift`:
- [SUGGESTION] DashWallet/Sources/UI/Payments/ExternalSend/Sending/SendLockHeldViewModel.swift:126-128: Do not present unverified lock consumption as confirmed
(carried; thread: https://github.com/dashpay/dashwallet-ios/pull/1423#discussion_r4623377934)
| showBackButton: .constant(false), | ||
| showsCloseButton: false, | ||
| onClose: onClose, | ||
| content: { CappedSheetBody { sheetBody } }) |
There was a problem hiding this comment.
✅ Resolved at
e0d58356; see the replies below.
🟡 Suggestion: The Finish sheet's scroll area extends below the sheet at its height cap
Impact: When large text or a short screen pushes the Finish sheet to its height cap, the bottom of the scroll area extends past the visible body even at the end of scrolling.
The scroll view calculates its end position for a taller viewport than the capped sheet provides. This revision switches to CappedSheetBody, which subtracts 72 points from the cap (ConfirmSheet.swift:175–192). The pinned DashUIKit BottomSheet puts an 18-point grabber and a navigation bar at least 74 points high above the body, leaving at least 20 points less room than the helper assumes. The body's 20-point bottom padding can absorb the nominal difference, so this does not establish that Close is unreachable. Size the viewport from the actual space below the header, or derive its cap from the same header and detent sizing inputs as DashUIKit.
source: gpt-6.2-sol (phase2-reviewer: general, security-auditor)
There was a problem hiding this comment.
There was a problem hiding this comment.
Resolved (re-reviewed at e0d58356): Your shared sizing fix is present on this head: the Finish sheet uses CappedSheetBody, which subtracts the 18-point grabber and 74-point titled bar before sizing the scroll viewport, including Close.
| private func finishedLockHeld(_ result: SendLockHeldViewModel.Result) { | ||
| switch result { |
There was a problem hiding this comment.
Resolved (re-reviewed at b0ff0ad0): Your isEnded guard now runs before the result switch, so a late completion cannot move a closed flow to .sent.
b0ff0ad to
52f1d5e
Compare
|
Moving to draft: Finish keys on the SDK's verdict that a held lock is recoverable, which dashpay/platform#5928 adds (#1427). Without it the held-lock outcome would map back to |
52f1d5e to
e0d5835
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
Changes requested: 1 blocker
- Require evidence of a recoverable lock before offering Finish —
DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift:953-973(thread, carried)
Impact: A user confirming an exact-amount Core → Shielded send can be told their Dash is held and offered Finish when a local storage failure stopped the asset lock before broadcast.
New on this head: The rebase narrows Finish to Core → Shielded sends, fixes the sheet’s scroll height at its cap, and directs users to the original transaction when completion cannot be confirmed. The held-lock tests passed on this head; the simulator suite’s only failure was the same unchanged scanner-prefetch assertion that also failed on the stacked base.
🔴 1 blocking
Still open from earlier rounds (1)
- 🔴 Blocking: Require evidence of a recoverable lock before offering Finish —
DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift:953-973(thread)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.2-sol(effort low) — The diff adds a send outcome and an interactive recovery flow, but delegates funds movement to the existing authenticated retry service without changing transaction construction or spending rules. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(lane failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift`:
- [BLOCKING] DashWallet/Sources/UI/Payments/ExternalSend/Services/ExternalSendExecutor.swift:953-973: Require evidence of a recoverable lock before offering Finish
(carried; thread: https://github.com/dashpay/dashwallet-ios/pull/1423#discussion_r4618784253)
Out-of-scope follow-up suggestions (1)
These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.
- Scanner-prefetch test depends on the app’s selected network —
testTheScannerPrefetchesOnlyARequestTheSendHonorsuses a testnet address atExternalSendFlowTests.swift:600, but prefetch validation readsWalletEnvironment.networkKind, which defaults to mainnet. The assertion failed on both the exact head (run 45464906780) and the stacked base (run 45464900749); this PR does not change the assertion, fixture, or parser.- Follow-up: Fix the test on the stacked Send screens branch by making its network and address fixture agree without depending on persisted app state.
| static func result( | ||
| phase: ShieldedTransferCoordinator.Phase, lastFailure: Error?, lockKept: Bool | ||
| phase: ShieldedTransferCoordinator.Phase, lastFailure: Error?, heldLock: HeldAssetLock? | ||
| ) -> CoreTwoStepResult { | ||
| switch phase { | ||
| case .success: | ||
| return .completed | ||
| case .submittedUnconfirmed: | ||
| return .unconfirmed | ||
| default: | ||
| return .failed(lastFailure ?? UnfinishedTransfer(), assetLockRecorded: lockKept) | ||
| if let heldLock { return .lockHeld(heldLock) } | ||
| return .failed(lastFailure ?? UnfinishedTransfer(), assetLockRecorded: false) |
There was a problem hiding this comment.
Still applies (re-reviewed at e0d58356): Agreed that disabling the only Finish producer would make the feature unreachable; waiting in draft avoids shipping that version. The rebase removes the type-4 producer, but the type-5 persistence failure still reaches Finish on this head, so this stays open until the PR reads the SDK verdict.
| case .completionUnconfirmed: | ||
| return .info(NSLocalizedString( | ||
| "Already spent — nothing to transfer", comment: "Asset-lock retry found the lock already consumed")) |
There was a problem hiding this comment.
Resolved (re-reviewed at e0d58356): Your revised copy is present in all 43 main-app catalogs. The ViewModel test verifies that .completionUnconfirmed points to the original transaction without claiming the lock was spent.
| showBackButton: .constant(false), | ||
| showsCloseButton: false, | ||
| onClose: onClose, | ||
| content: { CappedSheetBody { sheetBody } }) |
There was a problem hiding this comment.
Resolved (re-reviewed at e0d58356): Your shared sizing fix is present on this head: the Finish sheet uses CappedSheetBody, which subtracts the 18-point grabber and 74-point titled bar before sizing the scroll viewport, including Close.
e0d5835 to
4f23f5c
Compare
|
Round 10: the held-lock sheet ( |
4f23f5c to
2ad01f7
Compare
2ad01f7 to
4adde32
Compare
A Core to Shielded send whose Platform step failed after the asset lock was broadcast and recorded was reported as inFlight, with the "It will finish on its own" Toast, but nothing finished it: only Rebroadcast in the transaction details resumes the lock. The executor now reports such a send as lockHeld, carrying the lock's outpoint and funding type. It opens its own sheet: "Your Dash is held for this transfer. Finish it now, or later from the transaction details." Finish runs the same resume as Rebroadcast (AssetLockRecoveryService.retry, which asks for the PIN); Close leaves the lock for the transaction details. inFlight keeps meaning submitted with an unknown result. A Core to Identity send still reports inFlight: its top-up call returns no outpoint to resume. Co-Authored-By: Claude Opus 5.5 <[email protected]> SDD-Published-From: 2e78910ed28abdc6a8338da34812f0fedb71bf3e
4adde32 to
888305c
Compare
Issue being fixed or feature implemented
Closes #1422. A Core → Platform address or Core → Shielded send whose Platform step failed after the asset lock was broadcast and recorded was reported as "Send in progress. It will finish on its own", but nothing finished it: only Rebroadcast in the transaction details resumes such a lock.
Stacked on #1502 (base
feat/external-send-platform-identity).What was done?
SendOutcome.lockHeld(HeldAssetLock)(funding type, txid, vout): set only when the coordinator recorded the lock it built and the second step did not complete..inFlightkeeps meaning "submitted, result unknown".SendLockHeldSheet+SendLockHeldViewModel: "Transfer not finished — Your Dash is held for this transfer. Finish it now, or later from the transaction details."AssetLockRecoveryService.retry, which asks for the PIN): completed → "Sent" toast; already spent / waiting for sync → the same info toasts Rebroadcast shows; PIN cancelled → the sheet stays; other error → a generic message, Finish can run again.DWLoggerline per Finish: funding type, outcome, error type.Not covered: Core → Identity still reports
.inFlight, becausetopUpIdentityWithFundingreturns no outpoint to resume. No launch-time resume (waits for dashpay/platform#5824, the recipient recorded with the lock).How Has This Been Tested?
scripts/ci/check_test_target_membership.pyandscripts/a11y_audit.py --checkpass.Breaking Changes
None.
Checklist:
🤖 Generated with Claude Code