Repository navigation
feat(wallet): offer to finish a send whose asset lock is held - #1423
romchornyi wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
🔍 Review in progress (commit 8e50d18) · live progress |
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 <noreply@anthropic.com> 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 |
292b084 to
b9cb7c9
Compare
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.
b9cb7c9 to
d8c1480
Compare
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.
🟡 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)
75c8a20 to
dece9d2
Compare
c26c74c to
9a03eec
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)
9a03eec to
fbc61e7
Compare
462ca1a to
998b237
Compare
fbc61e7 to
f2bed1b
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
f2bed1b to
95fb3a9
Compare
d4b9763 to
c505dca
Compare
95fb3a9 to
5e20f78
Compare
A Core to Platform or 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 <noreply@anthropic.com> SDD-Published-From: abcc8fadb9369590f2862c6e14f8926be8e593cf
5e20f78 to
e814f2a
Compare
c505dca to
8e50d18
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 #1409 (base
feat/external-send-screens).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