Conversation
… a store error A token pool's commitment tree that does not build from the leaves its scan kept (append, checkpoint, anchor or witness failing) came back as ShieldedMerkleWitnessUnavailable, which #6276 made code 88: "still syncing, try again shortly". No sync repairs such a tree, so every retry failed the same way. It is now ShieldedStoreError (the generic code), like the note pool's store faults. A note past the leaves kept stays code 88. Registry: row 88 names the token pool case (token transfer, unshield) and the token purchase from the pool among the spends that raise it, and the numbering notes say 80 and 83-88 are merged on v5.2-dev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit 3918bca) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
Token transfers and unshields now return store error code 6 when the wallet cannot rebuild the token-pool tree, while a selected note beyond the retained leaves still returns code 88 before anything is broadcast. Linux wallet tests and Kotlin SDK checks passed; the Swift SDK check failed because the simulator could not launch the example app’s test runner, with no evidence tying that failure to the patch. PR Hygiene and the automated review check remain pending.
🟡 3 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: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.2-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 6: gpt-6.2-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 7: gpt-6.2-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — The change only reclassifies tree-build failures inspend_paths, leaving tree construction, spend behavior, and the retryable case for notes beyond the stored leaves unchanged. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort high); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort high); 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(zai below 15% reserve: 5h 72% left, weekly 0% left) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— ffi-engineer (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— platform-versioning (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— rust-quality (completed, effort medium); 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 `packages/rs-platform-wallet/src/wallet/shielded/token_pool_tests.rs`:
- [SUGGESTION] packages/rs-platform-wallet/src/wallet/shielded/token_pool_tests.rs:941-952: The regression test passes even if an invalid retained leaf still returns code 88
Impact: If `spend_paths` starts returning code 88 for an invalid retained leaf again, hosts will tell users to sync and retry a token transfer or unshield that still cannot complete, without this test catching the regression.
The test would stay green if `spend_paths` stopped using the new mapper and returned `ShieldedMerkleWitnessUnavailable` again. It calls `tree_build_error` directly with constructed errors, while the FFI tests start with errors that are already classified. Insert a noncanonical 32-byte commitment such as `[0xff; 32]` at position zero in the in-memory SQLite fixture and assert that `spend_paths` returns `ShieldedStoreError`. The value passes the wallet’s length check but makes GroveDB’s `append` return `InvalidFieldElement`, exercising the production mapping without a prover or network call. Keep the existing past-the-leaves test for the retryable case.
In `packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md`:
- [SUGGESTION] packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md:216: The code 88 guidance promises the next sync will fill gaps in the token-pool leaves
Impact: Hosts following the registry can tell users to retry after the next sync even when a gap in the retained token-pool leaves falls before the range that sync reads.
A token spend can return code 88 again after a successful incremental sync. `spend_paths` stops at the first missing leaf, while `scan_pool` resumes from the lowest participating account’s watermark rounded down to a chunk boundary. A gap before that starting point is not reread. The registry now applies the credit-pool checkpoint explanation to both cases. In the registry and the Rust variant docs, distinguish a credit-pool note that needs a checkpoint from a token-pool note that needs a scan to fill the missing range. Both refusals happen before broadcast, so retrying is safe, but the next sync is not guaranteed to clear both.
- [SUGGESTION] packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md:216: The registry still lists code 88 as proposed and free after it merged on v5.2-dev
Impact: Maintainers resolving an error-code collision on `v5.2-dev` get conflicting guidance about whether code 88 is already assigned or can still move.
The detailed entry can lead maintainers to treat an assigned code as movable. The updated numbering notes correctly record that #6276 merged code 88 on `v5.2-dev`, but the row still says “Proposed” and “free on both release lines” under a heading that says proposal numbers may move. Record the entry as merged on `v5.2-dev` outside the open-proposals table, and remove the availability claim or label it as historical. A merge on that branch does not imply a stable SDK release.
|
Bots are done — your move: post |
…aths and correct the code 88 notes The regression test called the error mapper directly, so it stayed green if spend_paths stopped using it. It now keeps a leaf that is not a field element and asserts spend_paths returns ShieldedStoreError. Code 88 docs (registry row and the Rust variant): the next sync clears the credit pool case, but a token pool note past the kept leaves is cleared only when the scan reads the missing positions. The scan resumes from the lowest account watermark, so a gap below it stays until the pool is scanned from the start. Registry: rows 80 and 83-88 say where they are merged instead of "Proposed", row 88 no longer says its number is free, and the proposals heading says a merged row's code no longer moves. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
New on this head: This revision clarifies the code 88 registry and retry guidance, and updates the regression test to exercise the store-error mapping through spend_paths. Rust workspace tests, Kotlin SDK build and tests, and the Swift frozen-schema check passed; the Swift SDK build and tests are pending.
🟡 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: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.2-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.2-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — The diff narrowly changes how spend_paths classifies tree-rebuild failures, leaving tree construction, spend logic, and the retryable missing-leaf case unchanged. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort high); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort high); 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(zai below 15% reserve: 5h 100% left, weekly 0% left) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— platform-versioning (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— rust-quality (completed, effort medium); 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 `packages/rs-platform-wallet/src/error.rs`:
- [SUGGESTION] packages/rs-platform-wallet/src/error.rs:1401-1403: Code 88 guidance calls for a full rescan when an ordinary sync can refill the gap
Impact: An app developer troubleshooting code 88 after a token transfer or unshield may advise users to clear and rescan their shielded state even when an incremental sync can restore the missing leaves.
A full rescan is unnecessary if the missing leaf is in the first chunk the next sync rereads. `scan_pool` rounds the lowest account watermark down to a chunk boundary (`token_pool.rs:1522–1528`), and `apply_chunk` inserts missing leaves before the per-account watermark check that skips note decryption (`token_pool.rs:1387–1408`). In this Rustdoc and in registry row 88, use the rounded-down scan start as the cutoff: a gap before that point needs a scan that starts at or before the gap and reads it. A shielded Clear is one way to restart from zero, not a requirement.
|
Bots are done — your move: post |
… as the code 88 cutoff A sync rereads from the lowest account watermark rounded down to a chunk boundary, so it does refill a gap in the kept leaves at or after that point. Only a gap before it needs a scan that starts at or before the gap; a shielded Clear is one way to get one, not a requirement. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
New on this head: This docs-only revision clarifies that token-pool sync resumes at the lowest participating account watermark rounded down to a chunk boundary. Both references now explain that recovery requires a scan that reads the gap, and that clearing shielded state is one way to restart from position zero. Rust workspace tests and the Swift and Kotlin SDK checks passed; review and PR Hygiene checks remain pending.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.2-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.2-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — The diff narrowly reclassifies tree-build failures inspend_pathswhile preserving the retryable path for notes beyond the scanned leaves, without changing tree construction or spend logic. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort high); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort high); 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(zai below 15% reserve: 5h 100% left, weekly 0% left) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— platform-versioning (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— rust-quality (completed, effort medium); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.
No unresolved findings remain from the prior review on this head.
…ee-build-error # Conflicts: # packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md
… are merged Row 88 still said #5865's plan-spend mapper must map the code when it lands. It landed, and its plan spends go through map_spend_result, which keeps 88. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
New on this head: The latest commit documents that executing a shielded spend against a plan still returns code 88 when a Merkle witness is unavailable, before proof construction or broadcast. Linux Rust wallet tests and the Kotlin SDK build and tests passed; the Swift SDK build and tests are pending.
🟡 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: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.2-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 6: gpt-6.2-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 7: gpt-6.2-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — The diff narrowly changes how token-pool tree build failures are reported, with tests distinguishing those failures from retryable sync errors and no change to tree construction or spend execution. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort high); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort high); 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(zai below 15% reserve: 5h 100% left, weekly 0% left) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— ffi-engineer (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— platform-versioning (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— rust-quality (completed, effort medium); 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 `packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md`:
- [SUGGESTION] packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md:224: The registry treats spend-plan codes 77–79 and 81 as movable after they merged
Impact: When resolving a collision on `v5.2-dev`, maintainers get guidance that can lead them to renumber an assigned spend-plan code instead of the open PR's code.
Renumbering the merged assignment would change the integer that existing bindings expect. This commit updates row 88 to say that #5865 merged, but the same row still describes codes 77–79 and 81 as held by open branches. Their individual rows and the numbering notes also still say “Proposed,” even though base commit `6d9e346d383` (#5865) assigns all four values in `PlatformWalletFFIResultCode`. The table says the open PR renumbers when it collides with a row marked “Merged on.” Mark the four assignments as merged on `v5.2-dev` in their rows and the numbering notes, and make row 88’s allocation explanation explicitly historical. Leave the numeric values unchanged.
|
Bots are done — your move: post |
…efore it, not from the start The code 88 diagnostic said a gap before the token scan's resume point needs a scan from the start. A pass that starts at or before the gap reads the missing leaves too (apply_chunk stores every leaf); a shielded Clear is one way to restart at position 0. The host docs already said so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
New on this head: This update clarifies that recovering from a token-pool scan gap requires a scan that starts at or before the gap; Clear is one way to restart at position zero. The Kotlin SDK emulator check failed with “User not authenticated” in the unchanged masternode voting-key signing test, outside the shielded spend path; PR Hygiene is pending.
🟡 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: A token spend blocked by an older scan gap tells users both to retry shortly and to start over —
packages/rs-platform-wallet/src/wallet/shielded/token_pool.rs:1253-1257(thread)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.2-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 6: gpt-6.2-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 7: gpt-6.2-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — The diff makes a small, targeted change to error handling in spend_paths, with regression coverage and matching SDK documentation, without changing tree construction or transaction behavior. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort high); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort high); 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(zai below 15% reserve: 5h 100% left, weekly 0% left) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— ffi-engineer (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— platform-versioning (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— rust-quality (completed, effort medium); 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 `packages/rs-platform-wallet/src/wallet/shielded/token_pool.rs`:
- [SUGGESTION] packages/rs-platform-wallet/src/wallet/shielded/token_pool.rs:1253-1257: A token spend blocked by an older scan gap tells users both to retry shortly and to start over
(carried; thread: https://github.com/dashpay/platform/pull/6309#discussion_r4719367376)
|
Bots are done — your move: address HashEngineering left a review thread unresolved, then post |
…thout code 19's retry prefix A token pool note past a scan gap returns code 88 after every sync, so "try again shortly" was wrong advice for it. Code 88 now carries the wallet's Display alone on every path (map_spend_result, which the identity create also uses, and the blanket conversion); code 19 keeps its prefix. The credit pool's 88 text now says to retry after the next shielded sync, the token pool's already says how to get past a gap. Registry row 88, the FFI, Rust, Swift and Kotlin docs say so; tests pin that both wallet texts carry their guidance and no 88 path adds the prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
New on this head: Code 88 now forwards the wallet’s own diagnostic through both FFI paths: credit-pool notes advise retrying after the next shielded sync, while token-pool gaps require a scan that reaches the missing leaves. Code 19 keeps its existing wording, and token-pool tree-build failures still return code 6. The Kotlin SDK emulator build and tests passed; PastaClaw review and PR Hygiene were pending, and no local builds or tests were run.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.2-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 6: gpt-6.2-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 7: gpt-6.2-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — The change is confined to classifying shielded wallet failures and exposing that classification consistently across SDKs, without changing tree construction or transaction execution. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort high); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort high); 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(zai below 15% reserve: 5h 100% left, weekly 0% left) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— ffi-engineer (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— platform-versioning (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— rust-quality (completed, effort medium); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.
No unresolved findings remain from the prior review on this head.
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.
- Other codes shipped in v5.1.0 are still listed as proposals — The stable v5.1.0 tag contains codes 47–61 and 68–76, but their unchanged registry rows still label them as proposed. That can mislead maintainers into treating shipped ABI values as available for renumbering.
- Follow-up: Use #6360 to move these codes to the shipped table and update its heading.
|
Bots are done — your move: address HashEngineering left a review thread unresolved, then post |
|
/self-reviewed |
|
Ready for review — |
HashEngineering
left a comment
There was a problem hiding this comment.
Re-approving at 3918bca. All three follow-ups from my earlier review are addressed: 83–87 moved to the shipped table as released in v5.1.0 (the rest of the shipped-in-5.1.0 cleanup is tracked in #6360), the code 88 docs in the FFI enum and Kotlin KDoc now cover the token pool cases and the scan-gap recovery, and CommitmentTreeError is imported.
The extra change in 3918bca looks right to me: code 88 now carries only the wallet's diagnostic on both mapping paths (map_spend_result, used by identity create too, and the blanket conversion), code 19 keeps its prefix, and both places that construct ShieldedMerkleWitnessUnavailable now say how to get past the refusal (credit pool: retry after the next shielded sync; token pool: a scan that starts at or before the gap, or a Clear). Kotlin changes are doc and test fixture only; isRetryable is unchanged.
Locally at 3918bca: platform-wallet token_pool + select_recorded_spends tests 45/45, platform-wallet-ffi witness tests 3/3 (--all-features), clippy -D warnings clean on both crates.
|
Policy satisfied — this can merge. |
Brings in #6309 (code 88 carries the wallet's own diagnostic without code 19's prefix; token pool scan gap guidance; codes 83-87 shipped in v5.1.0). Conflicts were docs and fixtures only: the code 88 docs in Swift, Kotlin and the registry keep #6309's text plus this PR's NotSent class and `payment:` field; the host test fixtures take the real 88 message with this PR's classed constructors; registry row 76 keeps this PR's RefusedBeforeDispatch sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue being fixed or feature implemented
Follow-up to #6276, from @HashEngineering's review there.
spend_pathsintoken_pool.rsmapped everyCommitmentTreeErrorfrom rebuilding a token pool's tree (append,checkpoint,anchor,witness) toShieldedMerkleWitnessUnavailable. #6276 gave that variant code 88 ("wallet is still syncing, try again shortly"), so a token transfer or unshield whose pool tree does not build told the host to retry after sync. No sync repairs such a tree, so every retry failed the same way. Nothing was broadcast, so no funds were at risk.What was done?
ShieldedStoreError(generic code 6), like the note pool's store faults (tree_build_error).ShieldedMerkleWitnessUnavailable(88): a sync does fix that one.ERROR_CODE_REGISTRY.md:v5.2-dev.How Has This Been Tested?
should_report_a_token_pool_tree_that_does_not_build_as_a_store_error.cargo test -p platform-wallet --features shielded(2840) and-p platform-wallet-ffi(640) pass, as do clippy, fmt and the parity manifest check.Breaking Changes
A token transfer or unshield whose token pool tree does not build returns code 6 (
ErrorWalletOperation) instead of 88. Hosts should not have been retrying it.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull request🤖 Generated with Claude Code
PR Hygiene ·
3918bcakotlin-sdk(packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/errors/DashSdkError.kt,packages/kotlin-sdk/sdk/src/test/kotlin/org/dashfoundation/dashsdk/errors/DashSdkErrorTest.kt) — approved by HashEngineeringrs-platform-wallet-ffi(packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md,packages/rs-platform-wallet-ffi/src/error.rs,packages/rs-platform-wallet-ffi/src/shielded_send.rs) — approved by HashEngineeringrs-platform-wallet(packages/rs-platform-wallet/src/error.rs,packages/rs-platform-wallet/src/wallet/shielded/operations.rs,packages/rs-platform-wallet/src/wallet/shielded/token_pool.rsand 1 more) — approved by HashEngineeringswift-sdk— you own itWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit