Repository navigation
feat: rewrite Dash Evo Tool onto the new platform-wallet - #860
Conversation
|
Important Review skippedToo many files! This PR contains 527 files, which is 427 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (579)
You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
refactor: complete data.db unwire — shielded + DashPay (stacked on #860)
Doc sync —
|
SPV-start fix (PROJ-001, CRITICAL) + consolidated gap report —
|
DetKv per-object refactor + platform bump to
|
Mock/stub findings + SPV progress + DashPay fund-routing —
|
Platform dep bump →
|
Dead-code cleanup + gap-audit reconciliationPushed 2 commits (
Net: open-gap count holds at 17, but the audit books are accurate and a previously-hidden wiring defect (PROJ-012) is now surfaced as a real finding. 🤖 Co-authored by Claudius the Magnificent AI Agent |
Seedless wallet rehydration (PROJ-010) + platform → PR #3692Pushed 5 commits (
Planning docs (rode along): rehydration design (
🤖 Co-authored by Claudius the Magnificent AI Agent |
Fix: no-password hydrated wallets couldn't sign (Smythe SEC-001/002)
Symptom: after the seedless rehydration, a no-password HD wallet hydrated as Root cause: seeds reach Fix (one chokepoint, every path funnels through it):
The account-xpub fund-routing gate and seedless load path are untouched. 613 lib tests pass, clippy clean. Smythe re-verify in flight.
🤖 Co-authored by Claudius the Magnificent AI Agent |
JIT secret-access refactor — HD seed no longer parked in memory (R3 complete)Pushed 24 commits ( Core (
QA (three independent passes)
Also ( CHANGELOG + user-story WAL-006 updated for the new unlock model.
🤖 Co-authored by Claudius the Magnificent AI Agent |
NEW since last push — Settings Disconnect fix + persister-gap marker + nonce-ownership upstream issue (
|
NEW since last push — re-pin to dashpay/platform#3828: persister-loop fix + Orchard security patch + shielded-API port (
|
NEW since last push — fix PROJ-028/030 nullifier-cursor regression + v0.10-dev feature-parity audit (
|
|
I checked the asset-lock recovery angle from the JS SDK discussion. The identity paths look correct in this PR: But I do not think PR 860 fully handles the same issue for the non-identity asset-lock flows yet:
Those manual paths bypass the upstream So the fresh asset-lock transaction itself is tracked better than JS SDK, but these DET call sites still have a post-asset-lock / pre-final-accounting gap: Platform submit failures or confirmation ambiguity can leave a valid tracked lock in an intermediate/reusable state, and successful submits are not consistently marked Suggested fix: route these non-identity flows through the upstream wallet orchestrators, or mirror the same orchestration locally: resume/upgrade tracked proof, |
|
Verified your analysis against current source — it holds. Here's how PR #860 now addresses it. Shielded asset-lock flow ( Platform-address flows ( Also surfaced by review: the four sibling shielded spend fns ( All tracked in 🤖 Co-authored by Claudius the Magnificent AI Agent |
|
Correction to my earlier reply. I previously said the platform-address consume/retry orchestration was upstream-gated and not possible from DET. That was wrong — it is reachable through the public What landed (pushed):
Commits: Thanks for the catch — your read on the recovery gap was correct, and so was the implication that DET should route through the upstream orchestration. 🤖 Co-authored by Claudius the Magnificent AI Agent |
Two reliability fixes from live testing — crash visibility + DAPI ban storm (
|
Re-pin platform deps to PR dashpay/platform#3828 branch (
|
NEW since last push —
|
Follow-up landed —
|
NEW since last push — shielded backend retired in favour of upstream
|
NEW since last push —
|
Session update — 5 commits pushed (
|
|
Pushed The B-2 barrier is verified as an interim stopgap (closes the common coordinator-thread drain race). The durable fix — a reusable cancel + await-exit shutdown primitive ( 🤖 Co-authored by Claudius the Magnificent AI Agent |
…nner after DB clear Three grumpy-review findings, all touching the network-database-clear path: - The Network Chooser and the top panel derived a network's display label independently and disagreed after a database clear (e.g. one side showing "Regtest", the other "Local"). Extracted the single source of truth, chooser_network_label(), and routed both call sites through it. - The DPNS contested-names screen rendered its own inline error banner in addition to the global MessageBanner AppState already displays for the same backend-task error, showing the failure twice. Removed the inline render path — MessageBanner is now the sole path for this screen's backend-task errors. - A scheduled-vote-sweep failure raised while no local voting identity exists is expected background noise (there's nothing to sweep for), but it surfaced as a persistent error banner with no way to dismiss it short of navigating away. AppState now recognizes ScheduledVoteSweepFailed wrapping a NoVotingIdentity source via scheduled_vote_sweep_is_quiet() and handles it without a banner. Targeted tests pass; clippy and fmt clean. Co-Authored-By: Codex Sol <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
…uccess token refreshes Two grumpy-review findings: - Document/claim fetch results were matched back to the screen that requested them by type alone, not by which specific dispatch they answered. A stale error from an earlier, already-superseded fetch could arrive after a newer identical redispatch had already succeeded and suppress or overwrite that success. Introduced a process-monotonic dispatch id (BackendTaskContext::for_dispatch), threaded through AppAction/AppState, so each screen's correlate_fetch_action() / should_suppress_backend_task_error() can tell an outdated response from the one it's actually waiting on. - sync_token_balances_now() reported success whenever it merely *called* the upstream sync, even when upstream's own single-flight guard silently skipped the pass because another refresh was already running (is_syncing() true) — the UI showed balances as fresh when no sync actually happened. Added TokenBalanceSyncOutcome (Performed/AlreadyInFlight) so callers can distinguish a completed refresh from a skipped one, and a new TaskError:: TokenBalanceRefreshSkipped for the skipped case. Targeted suites pass (contracts_documents_screen, view_token_claims_screen, token-balance backend, wallet-outcome unit tests); clippy clean. Co-Authored-By: Codex Sol <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
…erflow The advanced-send screen coalesced duplicate Platform output/input rows by summing their amounts with plain arithmetic addition — a crafted or pasted set of duplicate rows near the Platform credit range's upper bound panicked the app on overflow (debug builds) or silently wrapped (release builds) instead of being rejected as invalid input. Switched aggregation to checked_add, returning the new typed TaskError::AdvancedPlatformOutputsOverflow / AdvancedPlatformInputsOverflow on overflow. Also added AdvancedPlatformAmountInvalid and AdvancedPlatformOutputAddressInvalid so the surrounding parse failures get dedicated typed variants instead of falling through to a generic error. Red-before/green-after confirmed (old code panicked on the overflow case; new code returns the typed error). ui::wallets::send_screen 14/14 pass; clippy clean. Co-Authored-By: Codex Sol <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
…g callers (grumpy-review)
… against overflow (grumpy-review)
…success token refreshes (grumpy-review) # Conflicts: # src/wallet_backend/mod.rs
… sticky sweep banner after DB clear (grumpy-review)
… seed encoding (grumpy-review)
Co-Authored-By: Codex GPT-5 <noreply@openai.com>
…s, Settings Closes the UX-003 gap found by the PR892 QA sweep and re-confirmed against current HEAD: the global nav switcher was wired into Wallets, Identity Hub, and Masternodes but not the other four root screens. Verified via Codex Sol (gpt-5.6-sol, high effort): clippy clean, 5 new kittest cases green. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Closes two gaps from the PR892 QA sweep, re-confirmed against current HEAD: SND-005 (no confirmation dialog before broadcasting a send, in either the simple or Advanced Options path) and SND-014 (fee-reserve/balance-too-low hint only rendered inside an unreachable validation branch). Verified via Codex Sol (gpt-5.6-sol, high effort): clippy clean, 80 wallet-screen tests + 9 amount-input tests green, including 3 new regression tests proven red before the fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Closes a QA-found gap from the PR860 delta sweep: the Token Creator screen's "Creating token..." banner never dismissed on successful token creation (leaked BannerHandle), same bug class as an earlier-fixed sticky-banner issue but not covered by that fix. Verified via Codex Sol (gpt-5.6-sol, high effort): clippy clean, new regression test proven red before the fix, green after. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Delta re-test against the 2026-07-14/15 175-story sweep: WAL-032 (new story, PASS), 34 baseline-FAIL stories re-verified (large majority now fixed), category-representative PASS spot-checks (DPN/DPY/MN/DEV — DEV-005 upgraded FAIL->PASS, all 8/8 Platform Info tools now working), plus TOK-011 (FIXED) and ALK-002 (still failing, unchanged from baseline). Session was resumed mid-run after an unrelated tooling kill; resumed cleanly from checkpoints. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
thepastaclaw
left a comment
There was a problem hiding this comment.
Preliminary review — Codex only
Carried-forward prior findings: prior-5, prior-6, and prior-7 remain valid; prior-1 is outdated, while prior-2 through prior-4 are fixed. New findings in the latest delta: the token-refresh outcome inference is racy, and the simple Core-to-Platform confirmation misstates the recipient amount. Additional cumulative current-head inspection: the proposed Core aggregate-overflow blocker was dropped because its UI arithmetic predates the PR base and the claimed reachable failure was not established.
Validated blockers were found in the Codex precheck. Sonnet is deferred until a fresh Codex revalidation clears the blocker gate.
Review provenance
- Codex reviewers:
gpt-5.6-sol— general (failed_pre_evidence),gpt-5.6-sol— general (failed_pre_evidence),gpt-5.6-sol— general (failed_pre_evidence),gpt-5.6-sol— general (failed_pre_evidence),gpt-5.6-sol— general (failed_pre_evidence),gpt-5.6-sol— general (failed_pre_evidence),gpt-5.6-sol— general (failed_pre_evidence),gpt-5.6-sol— general (completed) - Verifier:
gpt-5.6-sol— verifier - Sonnet: not run (deferred by blocker gate)
🔴 2 blocking
3 carried-forward finding(s) already raised on this PR; not re-posting as new inline comments.
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `src/wallet_backend/mod.rs`:
- [BLOCKING] src/wallet_backend/mod.rs:124-131: Token refresh ownership cannot be inferred from before/after status samples
Upstream `IdentitySyncManager::sync_now()` atomically claims `is_syncing` and returns no outcome when another pass owns it. The reads before and after that call are not tied to its ownership. If this call completes and the periodic loop claims the flag before the second sample, DET returns `AlreadyInFlight`, skips `refresh_token_balances()`, and surfaces `TokenBalanceRefreshSkipped` even though the requested pass completed. The DET snapshot therefore remains stale. Upstream must return an explicit performed/skipped outcome, or expose an atomic completion generation that DET can use instead of reconstructing ownership from independent samples.
In `src/ui/wallets/send_screen.rs`:
- [BLOCKING] src/ui/wallets/send_screen.rs:2988-2995: Simple confirmation hides that the fee reduces the recipient amount
For a Core-to-Platform send, `current_fee_preview()` returns `FeePreview::deducted_from_amount`, and the prepared backend task sets `fee_deduct_from_output: true`. The final confirmation nevertheless says the entered amount will be sent to the destination and ignores `recipient_receives_credits`. The recipient receives less than the amount the confirmation claims. Include the calculated recipient amount or explicitly state that the fee is deducted from the entered amount, matching the advanced confirmation.
|
Follow-up: the review feedback below that was still unaddressed at merge time has been triaged and fixed in #902 (13 distinct findings — 2 HIGH, 4 MEDIUM, 7 LOW). Each unresolved thread was independently re-verified against current code before being marked; several bot auto-resolutions here were incorrect (commit-diff heuristic, not semantic verification) and have been corrected. Threads now resolved reference this comment for context. 🤖 Co-authored by Claudius the Magnificent AI Agent |
…ad push branch (#898) * ci: run tests and clippy on every non-draft pull request The `pull_request` triggers for both gates were path-filtered, so a PR that touched no Rust source got no test, clippy, or fmt run at all — and reported green anyway. A skipped gate and a passing gate are indistinguishable at the merge button, which makes "CI is green" mean "green, or it never ran". Drop the `paths` filter from both `pull_request` triggers so every non-draft PR runs the full gate. Pushes to master / v*-dev stay path-filtered, where the filter is a pure cost saving and nothing gates on the result. Add `workflow_dispatch` to both. Draft PRs are suppressed by the existing `draft != true` guard and previously had no way to run CI at all; a manual run now covers them (against the branch head, not the PR merge commit). Fix the push trigger's dead `main` branch entry — this repo's release branch is `master`, so pushes to it matched nothing and ran no tests. Document the resulting local-vs-CI split in CLAUDE.md: CI owns the full sweep, so local runs should stay narrowly scoped to the change rather than duplicating what CI is about to do. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018m6b2TRP1e6S3uQHcaq3Cq * ci: allow manual runs, cover the toolchain, drop the dead push branch Address review feedback on the previous commit: keep the `paths` filters (documentation changes should not spend CI minutes) and take CLAUDE.md out of this PR entirely — it collides with PR #860, which rewrites the same section of that file, so it ships separately against #860's branch. Three changes remain, all narrow: - Add `workflow_dispatch` to both workflows. Draft PRs are suppressed by the existing `draft != true` guard and previously had no way to run CI at all — the only route to a green check was marking the PR ready for review. A manual run now covers them; it tests the branch head rather than the PR merge commit. - Add `rust-toolchain.toml` to the path filters. The file pins the toolchain for every build, but matched no filter, so a toolchain bump triggered neither tests nor clippy. `**/*.rs` already covers build.rs and all crate sources, so the filters otherwise fire on any Rust code change and on no documentation change, which is the intent. - Drop the push branch list down to `v*-dev`. It previously listed `main`, which does not exist in this repo, and `master` is release-only — neither needs a push-triggered run. The path lists are shared between the `push` and `pull_request` triggers via a YAML anchor so the two cannot drift apart; GitHub Actions has supported anchors since 2025-09-18, and path filters are a documented use case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018m6b2TRP1e6S3uQHcaq3Cq * ci: run the toolchain the project actually pins Review feedback: the previous commit added rust-toolchain.toml to the path filters, but neither job used the file's compiler, so the trigger proved nothing. Both installed a toolchain by name with `override: true`, and a rustup directory override takes precedence over rust-toolchain.toml. Worse than a hollow trigger, the test job named `stable` while the project pins 1.92 — so the suite has never run on the pinned toolchain at all. Clippy named 1.92, matching only because the number was duplicated by hand; the next bump would have silently kept linting the old compiler. Install via actions-rust-lang/setup-rust-toolchain with no toolchain input, so both jobs take the channel and components straight from rust-toolchain.toml. That file becomes the single source of truth, and — since a change to it now triggers both workflows — a toolchain bump is tested and linted by the compiler it introduces. Clippy's components move into the file for the same reason. Two of the action's defaults are pinned rather than inherited: it defaults RUSTFLAGS to `-D warnings`, which would newly fail the test job on any warning (Clippy owns that gate, and its own step already passes the flag), and it defaults to its own cargo cache, which the existing actions/cache step already covers. Also drops actions-rs/toolchain from both jobs; the action is archived, and dtolnay/rust-toolchain would not fix this because it takes its toolchain from its @ref rather than reading rust-toolchain.toml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018m6b2TRP1e6S3uQHcaq3Cq --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix(wallets): disclose deducted fees in confirmations Co-Authored-By: Claude GPT-5 <noreply@anthropic.com> * fix: harden identity deposit onboarding Reconcile deposit state from wallet snapshots, prevent duplicate address requests, and preserve retry controls on derivation failures. Co-Authored-By: Claude GPT-5 Codex <noreply@anthropic.com> * fix: harden app task and network guards Release scheduled-vote sweep guards after panicking task joins and require explicit network confirmation when legacy settings I/O cannot restore the saved network. Co-Authored-By: OpenAI Codex GPT-5 <noreply@openai.com> * docs(gui-testing): make scenario launch portable Co-Authored-By: Codex GPT-5 <noreply@openai.com> * docs(gui-testing): vendor GUI launch procedure Co-Authored-By: Codex GPT-5 <noreply@openai.com> * test(settings): pin legacy wire fixture Co-Authored-By: Codex GPT-5 <noreply@openai.com> * fix(migration): guard partial settings import Co-Authored-By: Codex GPT-5 <noreply@openai.com> * fix: harden wallet history hydration and soften token-sync banner Skip corrupt transaction-history rows instead of aborting wallet registration, and surface a skipped token-balance refresh as an info banner instead of a sticky error (the balance is very likely still fresh from the periodic sync loop that raced it). Co-Authored-By: OpenAI Codex GPT-5 <noreply@openai.com> * docs: log PR #860 follow-up fixes in changelog Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: address PR 902 review findings Addresses bbca6608394e, e9bdf38afeeb, SEC-001, SEC-002, SEC-004, SEC-005, SEC-007, PROJ-002, PROJ-003, PROJ-004, CODE-002, CODE-003, CODE-004, CODE-005, CODE-007, CODE-008, CODE-009, CODE-010, CODE-012, CODE-013, CODE-014, and CODE-015. Co-Authored-By: Claude GPT-5 <noreply@anthropic.com> * docs: correct changelog and gui-testing docs per PR 902 review (DOC-001..003) - CHANGELOG: add the missing token-balance-refresh-status entry (DOC-002). - docs/gui-testing/README.md + scenarios/TEMPLATE.md: resolve the test binary via `cargo metadata`'s target_directory instead of assuming `${CARGO_TARGET_DIR:-target}`, which silently breaks when the target dir is redirected via .cargo/config.toml rather than the env var (DOC-001). Also stop implying the desktop-gui automation skill is required (DOC-003). Co-Authored-By: Codex Sol <noreply@openai.com> --------- Co-authored-by: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Co-authored-by: Claude GPT-5 <noreply@anthropic.com> Co-authored-by: OpenAI Codex GPT-5 <noreply@openai.com>
) Upstream landed a full rewrite (581 files, new platform-wallet/ wallet_backend crates, egui 0.33->0.35, dash-sdk rev bump, src/spv/ removed) since our original fork point. Rather than merge that through OrchardPay's ~101 mostly-mechanical rebrand-diff files, this re-forks from upstream's current v1.0-dev tip and reapplies: - The dash-evo-tool -> OrchardPay rebrand pass (crate name/path, env vars, app-dir paths, log filenames, Flatpak/macOS bundle IDs, user agent string) across every living file. Historical docs/ai-design/ QA-campaign records are deliberately left untouched — they document what upstream actually observed testing the real "Dash Evo Tool" at the time, and rewriting them would misrepresent history. Real upstream GitHub issue/repo references (e.g. dashpay/dash-evo-tool dashpay#660, dashpay#889) are likewise left pointing at the real upstream, not rewritten into a nonexistent dashpay/orchardpay repo. - The 5 ORCHARDPAY-TODO(dashpay-legacy) markers and LEGACY module doc comments flagging DashPay's contact/messaging code as superseded by OrchardPay's ZK-based model (docs/orchardpay/PROTOCOL_DESIGN.md, docs/ORCHARDPAY_MIGRATION.md), adapted to their new locations (the RootScreenType enum moved into src/model/settings.rs; the standalone Dashpay nav entry is now hidden by upstream itself). - The onboarding guided-setup stepper (src/ui/components/ onboarding_progress.rs, wired into src/app.rs), adapted to eframe 0.35's ui-based App::ui entry point and egui's unified Panel type (TopBottomPanel was replaced by Panel::top). Added a kittest regression test exercising the real stepper end-to-end. - Fixed a rebrand bug the new test caught: src/logging.rs's log rotation used bare "det"/"det-stderr" stems (without a .log suffix) that the original substitution pass missed, causing rotation to look for the wrong filenames. Verified: cargo build/clippy/test all green on the new base (1944 tests, 0 failures). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(deps): update platform while preserving existing profiles Pin Platform v4.2-dev at e3cd7cf (4.2.0-dev.8) and adapt wallet APIs. Automatically bridge the previous PR's database lineage for both app and network stores with retained backups, strict staged loading and atomic reconstruction. Preserve live identity metadata during ownership promotion. Handle swept transaction events and enable the passing Max-send regression. Document retained functionality, remaining upstream gaps and audit results. Validation: cargo fmt --all; 2520 library tests passed; exact CI Clippy flags --all-features --all-targets -- -D warnings passed. Co-Authored-By: Codex <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * fix(deps): pin platform to 63cf57f Include the pending contact-crypto persistence and identity-removal serialization fix. Migration history and schema remain unchanged; retain the verified database compatibility bridge and other lockfile resolutions. Validation: formatter, 2520 library tests, and CI Clippy flags passed with the locked dependency graph. Co-Authored-By: Codex <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * docs(migration): add fixture contract, capture recipe and matrix design Groundwork for the cross-version migration matrix. No code, no fixture payload: this is the contract every later workstream builds against. - tests/migration-fixtures/README.md: what a fixture is, the threat model for a public-by-design testnet fixture wallet (dedicated, dust-only, never the backend-E2E wallet; recovery phrases stay in environment variables, the protected wallet's password is a fixed literal matching the existing PROTECTED_PASSWORD precedent), packing rules, the GitHub Actions artifact storage model and its retention consequences, and a field reference for the manifest. - tests/migration-fixtures/manifest.json: schema v1, seeded with the one required baseline (v0.9.3, wallet-identity-dpns, GUI capture). Artifact fields are null until the capture workstream packs and uploads it. - tests/migration-fixtures/profiles/: acceptance checklists for the wallet-only and wallet-identity-dpns profiles, with era-specific verification. The v0.9.3 DPNS name lives inside the opaque identity.data bincode blob, so it is verifiable only in the UI, not by SQL. - docs/gui-testing/scenarios/migration-fixture-capture.md: the v0.9.3 capture recipe. That tag has no DASH_EVO_DATA_DIR, so isolation is via XDG_CONFIG_HOME, and its own .env.example must be used. It also has no SPV stack, so it sees funds only through a local Dash Core node over RPC/ZMQ and cannot build a registration's asset lock unaided; the identity is registered beforehand with the current build and only loaded by ID during capture. - docs/ai-design/2026-09-10-migration-matrix/design.md: condensed design — the three migration systems, PR #981's compatibility bridge and the synthetic-fixture gap it names, why v0.9.3 is structurally immune to that divergence, the conditional assertion table, phases and sequencing. - docs/user-stories.md: WAL-033 [Gap] for surviving an app upgrade. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * feat(mcp): add read-only identity_list and app_storage_status tools The migration-verification harness needs to inspect a profile after an upgrade without a GUI and without moving the profile forward. Two read-only tools cover that: - `identity_list` reports the identities persisted for the active network with their DPNS names, balances and wallet bindings. Like `core_wallets_list` it hydrates storage but skips the SPV gate: every field comes from persisted state, so it reports what is on disk rather than what the chain currently says. - `app_storage_status` reports the stored `data.db` schema version against the version this build's ladder targets, the newest upstream wallet-storage migration applied to `det-app.sqlite` (version, name and checksum — the fingerprint that identifies which schema line a profile came from), the live migration state machine, and each network's four upgrade completion markers with the timestamp and build version that wrote them. It deliberately hydrates nothing and starts no sync, so it observes an upgrade instead of triggering one. The markers are read through the key functions `finish_unwire` already exports, so there is one definition of each key. The schema-history read is best-effort: a profile the upstream store has never opened has no history table, which is an answer rather than a failure. `DEFAULT_DB_VERSION` was re-exported for tests only; widen it to the MCP feature set so the tool can name the version it compares against. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * test(migration): add cross-version migration matrix harness Boots profiles captured by older DET releases against the binary built from this tree and asserts the upgrade lands them intact. The harness spawns the real `det-cli` as a subprocess with `DASH_EVO_DATA_DIR` pointed at a staged copy of the fixture. An in-process `AppState` boot is not an option: under the `testing` feature `boot_inputs` substitutes an in-memory database, which would leave every migration assertion testing nothing. Assertions are conditional on where the fixture starts, so an already-current profile is not asserted to have migrated: - no panic and no `WalletDataIncompatible` on either stream; - `data.db` reaches `DEFAULT_DB_VERSION` only when it started below it; otherwise its schema must be unchanged (strict byte identity is opt-in per fixture, since a normal boot legitimately writes rows); - the active network, wallet aliases and identity ids survive; - the `finish_unwire` completion sentinel is recorded; - a second boot adds no backup files and rewrites no sentinel. Fixtures are multi-megabyte captures kept as CI build artifacts, so the matrix runs only when a workflow sets `MIGRATION_FIXTURES_DIR`. Unset, it reports the skip and passes, keeping `cargo test --all-features --workspace` green; the harness's own unit tests still run in that path. `DEFAULT_DB_VERSION` is re-exported from `database` so the assertion reads the live constant instead of a copy that would go stale. Left for the parallel workstreams: identity state is read straight out of the upstream `meta_identity` table until the read-only `identity_list` / `app_storage_status` MCP tools land. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * docs(migration): record real v0.9.3 fixture capture and its proof-format limit Wire the manifest entry to the fixture that was actually captured: - profile is wallet-only (not wallet-identity-dpns) with two real wallets (plain + password-protected), sha256 and size recorded, archive held at a durable local path pending CI artifact wiring - known_limitations documents the confirmed reason: v0.9.3's SDK only decodes GroveDB proof variant 0, current testnet nodes return variant 1, so v0.9.3 cannot load any identity regardless of how or when it was registered (a real identity + DPNS name were registered on testnet with the current build specifically to test this, and the load attempt failed with UnexpectedVariant as documented) - note the dead TESTNET_dapi_addresses list in v0.9.3's .env.example Add the capture scenario to the GUI-testing scenario index, flagged as not an A/B comparison per its own deviation note. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * ci(migration): add migration-matrix workflow, fixture scripts and pin guard - scripts/migration-fixtures/check-pin-ancestry.sh: verifies the pinned platform-wallet(-storage) rev is an ancestor of v4.2-dev AND fingerprints the rendered migration SQL (ancestry alone would miss a same-numbered migration content change, e.g. the 762c66cf -> 67d4ef3f V001 drift). Verified for real: current pin passes against today's v4.2-dev tip. - pack.sh: packs a data dir into a fixture archive, refuses to pack a live MCP_API_KEY, reproducible tar flags. - capture-headless.sh: drives det-cli through wallet import, SPV wait, address creation, discovery, verified against docs/CLI.md's tool set. - download-fixtures.sh: resolves fixture artifacts via gh run download (run-id exact) or a name-pattern fallback, no third-party Action. - check-coverage.sh: fails the schedule-only run if a published weekly newer than the newest manifest fixture has no entry; ENFORCE_AFTER defaults to v1.0.0-weekly.20260908 per the plan's narrowed scope. - .github/workflows/migration-matrix.yml: pin-ancestry -> build -> matrix jobs, path-filtered plus weekly schedule and workflow_dispatch. The fixture step tolerates "no fixtures found" for now (TODO: make it a hard failure once the manifest has real artifact-backed entries). - .github/workflows/weekly-build.yml: add migration-matrix.yml to the existing CI-green gate loop before a weekly can be cut. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * fix(migration): resolve fixture archive by documented manifest key The harness only recognised `archive`/`file`/`path` for the fixture archive name, while the manifest and its README schema use `archive_filename`. With every field defaulted the pointer deserialized to None, so staging fell back to `<id>.tar.zst` and would miss the archive CI actually downloads. - Accept `archive_filename` as an alias for `Artifact::archive`. - Add a regression test that parses the committed manifest via include_str!, so reader and manifest key names cannot drift apart unnoticed again. - Point the v0.9.3 entry's staging_note and the fixtures README at the manual migration-fixture-bootstrap.yml upload path (staged separately: .github/workflows/** is not agent-writable in this repo). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci(migration): add fixture bootstrap upload and make the matrix fail on missing fixtures - migration-fixture-bootstrap.yml (new): workflow_dispatch uploads a base64-encoded fixture archive as a real GitHub Actions build artifact. Name, filename, sha256 and size are pulled from the committed manifest entry named by fixture_id, so a dispatch can only publish bytes a reviewed manifest already describes. A pull_request trigger on the file itself registers the workflow before it reaches the default branch, since GitHub only dispatches workflows that already exist on a branch or have run at least once. - migration-matrix.yml: download-fixtures.sh now runs with --strict and the `|| true` tolerance is gone; an empty resolved fixture set is a hard ::error::+exit 1 instead of a warning. Also fixes two env mismatches that would otherwise make --strict fail even with a correctly wired fixture: pass MIGRATION_FIXTURES_MANIFEST (the harness never received a manifest path) and rename MIGRATION_DET_CLI to DET_CLI_BIN (the name the harness actually reads). - download-fixtures.sh: resolve manifest entries via the documented key names (artifact_name/workflow_run_id/workflow_name/sha256) with the old ad hoc names kept as a fallback, and verify the downloaded file's name against archive_filename. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * test(migration): record v0.9.3 fixture artifact run Records the real GitHub Actions build artifact produced by dispatching migration-fixture-bootstrap.yml (run 34579191654): workflow_name, workflow_run_id, retention_days and expires_at. Drops staging_note, now that the fixture is resolvable via download-fixtures.sh --strict instead of only existing as a durable local file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * fix(migration-matrix): stop a test-env leak from clobbering DET_CLI_BIN `a_bogus_binary_override_is_reported` set DET_CLI_BIN then unconditionally removed it. cargo test runs every #[test] in this integration-test binary in one process on a shared thread pool, and `migration_matrix` (main.rs) also reads DET_CLI_BIN via locate_binary(). The trivial unit test finishes almost instantly while migration_matrix reaches its own locate_binary() call much later (after loading the manifest and staging the fixture), so the CI-provided DET_CLI_BIN was reliably gone by then, not just occasionally flaky — the migration-matrix workflow's real first run against the v0.9.3 artifact failed on exactly this ("det-cli was not built alongside this test"), even though the fixture itself resolved and verified correctly. Save the original value and restore it instead of deleting it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * docs(ai-design): add platform_compatibility bridge pattern reference Standing pattern card for the next platform-wallet-storage pin divergence: when check-pin-ancestry.sh fires, why checksum/numbering reconciliation alone doesn't fix a genuine schema divergence, the bridge's recognize/backup/convert/rebuild mechanism, how to build a fixture for a new bridge instance (synthetic + real captured profile), and the per-incident (not general-translator) scope of the pattern. Distinct from docs/ai-design/2026-09-10-platform-pin/upgrade-notes.md, which is the point-in-time PR #981 review record. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * fix(mcp): restore the legacy network before the det-cli boot picks one Standalone det-cli (`init_app_context`) read the active network only from the AppSettings k/v blob, which does not exist yet on the first launch after upgrading from a pre-rewrite release, so it fell back to mainnet. The GUI runs `legacy_settings::import_legacy_settings` before choosing the network (`AppState::new_inner`); det-cli never did. On a real v0.9.3 testnet data dir this booted mainnet, ran the one-shot legacy wallet drain against mainnet (imported=0), and listed no wallets. Run the same import before the network is read. On import failure the GUI forces a network chooser; det-cli has no one to ask, so it refuses to boot instead of guessing, and the unwritten sentinel makes the next launch retry. A TODO marks the call for the planned "doctor" migration module. The regression test boots the real `init_app_context` over a v0.9.3-shaped data dir (serialized by DASH_EVO_DATA_DIR_LOCK) and asserts testnet; it fails with `Mainnet != Testnet` without the import. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(migration-matrix): assert the read-only data.db contract and umask-proof staging Since the platform-wallet rewrite (#860) every boot path opens an existing data.db with SQLITE_OPEN_READ_ONLY; the schema ladder only builds a fresh file. The harness still demanded that a v0.9.3 data.db climb from version 11 to DEFAULT_DB_VERSION, contradicting the product contract that v093_upgrade.rs asserts (byte-unchanged). - check_schema_outcome: an existing data.db must keep its version and schema; an absent one must be created at DEFAULT_DB_VERSION. - Byte identity of an existing data.db is now unconditional; the data_db_byte_identical opt-in and its "must be migrated" branch go. - check_bytes_unchanged names a same-size rewrite correctly. - The stager restricts every directory between the sandbox root and the data dir to 0700. Under a 002 umask `unpacked/` was 0775 and the wallet store refused to open (insecure_parent_dir), so the harness passed on CI runners (umask 022) but not locally. - design.md and the fixtures README describe the read-only contract. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(migration-matrix): expect StorageUpdateNeedsDesktop for password-protected wallets The v0.9.3 baseline holds a password-protected wallet. By design (docs/ai-design/2026-07-14-migration-password-prompt/design.md) headless det-cli cannot prompt for its password, so the storage update stops at StorageUpdateNeedsDesktop { source: InteractivePromptUnavailable } and every wallet tool stays gated until the desktop app finishes it. The matrix treated that documented outcome as a failed boot. Make the outcome explicit and per wallet instead of tolerated: - manifest.json: contents.wallets[].expected_outcome is `migrated` (default) or `needs_desktop`; unknown values fail the parse. Documented in tests/migration-fixtures/README.md. - A fixture with a `needs_desktop` wallet must fail both wallet-gated boots with exactly that typed error. Completing, or failing any other way, is a regression. - Per-wallet storage check: the legacy data.db and the upstream store share no wallet id, but both keep the BIP44 account-0 xpub (78-byte serialization vs base58check text in account_registrations). `migrated` wallets must be registered, `needs_desktop` ones must not. - The wallet-drain completion sentinel must stay unwritten while the update is unfinished; address derivation is skipped in that mode. The full harness now passes against the real v0.9.3 artifact with the CI-equivalent configuration. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(logging): cap rmcp logging so raw MCP tool arguments never reach logs rmcp 1.7.0 logs every inbound request with its raw tool arguments at DEBUG (`service.rs`: "received request") and every streamable-HTTP response message at TRACE. Tool arguments carry secrets -- the core_wallet_import recovery phrase, masternode private keys -- so any RUST_LOG at debug or finer wrote them to det.log or stderr. `logging::sensitive_target_cap()` is a `Targets` global filter layered over the EnvFilter in every subscriber DET installs (`initialize_logger`, used by the GUI, the stdio server and headless mode, plus det-cli's own subscriber). As a separate layer it is ANDed with RUST_LOG, so no directive -- not even an explicit `rmcp::service=trace` -- can lift the INFO ceiling on `rmcp`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(storage-update): finish a protected-wallet storage update non-interactively A standalone or headless upgrade of an installation holding a password-protected wallet could only stop at StorageUpdateNeedsDesktop. Operators running DET without the desktop app had no way to finish it. - MCP tool `app_storage_update { password: SecretString, network? }`. The password deserializes straight into guarded memory, Debug is redacted, the schema is a plain string with no default, and it is borrowed down to the drain for one call -- no shared password state (`prepare_storage_with_wallet_password` -> `run_gated` -> `register_migrated_wallets`). - The drain tries it on every locked wallet through `handle_wallet_unlocked` with `UntilStorageUpdateComplete` -- the boundary the desktop prompt submits to -- before the interactive-capability check. A wallet it does not open fails the update with the typed `WalletPasswordRejected` / `TaskError::StorageUpdatePasswordRejected`: nothing is skipped and the sentinel is withheld. Without a password nothing changes: `InteractivePromptUnavailable`, at once. - A desktop session refuses the tool (`McpToolError::DesktopOwnsPasswordPrompt`, -32006): no remote channel into the desktop prompt. - det-cli `--password-stdin` / `--password-file <path>` read the password client-side and pass it as the tool's `password` parameter. Refused: a TTY on stdin, a file with any group/other permission bit (checked on the opened fd), anything but one non-empty line within MAX_PASSPHRASE_LEN, an inline `password=...`, and --password-file on non-Unix (TODO: ACL check). A tool call is now resolved -- password included -- before connecting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(migration): boot the v0.9.3 fixture again with its password supplied The matrix keeps the no-password scenario (the protected wallet must stop at StorageUpdateNeedsDesktop) and adds the manifest's `password_runs`: the same archive, freshly staged, finished through `app-storage-update --password-file <0600 file>`, where both wallets must migrate, the second boot needs no password, data.db stays byte-identical, and every listed wallet derives an address. The password boot logs DET, det-cli and rmcp at trace, and any command whose output contains the password fails the run. Scenarios are derived and validated from the manifest: one shared password, known aliases, and no `needs_desktop` in a password run. The fixture password never appears in a harness Debug or error either. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(storage-update): record the non-interactive password decision - migration-password-prompt design: the original rationale stays; a new "Decision 2026-09-11" section records who decided and why, why stdin or an owner-only file and never an env var or argument, why fail-fast still holds, the one-password/no-skip and desktop-refusal rules, the rmcp log cap, and the residuals. - jit-secret-access Q-HEADLESS: notes the storage-update exception; signing keeps the ruling. - MCP.md / CLI.md: the `app_storage_update` tool and the det-cli flags; WAL-032 gains the operator path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(det-cli): keep wallet passwords off plain HTTP and out of stdin's buffer Security review follow-up for the non-interactive storage-update path. - SEC-004: --password-stdin / --password-file are refused in HTTP mode unless the address is https or plain http to loopback (127.0.0.0/8, ::1, localhost). The check runs before the password is read and before any connection is made; 0.0.0.0 and unparsable addresses are refused too. - SEC-002: --password-stdin reads a duplicated raw stdin descriptor as a File, bypassing std's process-wide 8 KiB stdin buffer that is never wiped. The zeroizing read buffer is again the only user-space copy. - SEC-001 (desktop check is in-process only) and SEC-003 (no password attempt throttling) stay open as TODOs in app_storage_update and are recorded as known, accepted limitations in the design doc. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(migration-matrix): skip SPV-gated address derivation for legacy-drained v0.9.3 wallets CI run 34592733217 timed out in the password scenario's address derivation: the legacy drain registers both v0.9.3 wallets as WalletOrigin::Imported (birth height 0) with no committed sync height, and dash-spv starts the compact-filter download at max(birth_height, committed + 1, header_start). The first SPV-gated call therefore waits for a scan from genesis, ~1.55M testnet filters, which a GitHub runner does not finish inside the product's 10-minute SPV gate (~590k filters in that run). Not transient: fixtures ship no spv/ state, so every run starts from zero. The v0.9.3 entry opts out with expect.derive_address = false, pinned by the manifest test. Key integrity stays covered offline: each registration is matched by its account xpub. Bounding or resuming that scan belongs to the doctor module, hence TODO(doctor-module) in the harness rather than a longer wait. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(migration): real-data platform_compatibility fixture from v1.0.0-weekly.20260908 The bridge was proven only on synthetic rows. Add a fixture a released build wrote: v1.0.0-weekly.20260908 (Platform pin 67d4ef3f), a fresh testnet-only wallet funded by one 1 tDASH faucet payment, captured via the weekly's own det-cli plus one GUI launch to persist the testnet selection (capture_method gui+det-cli). The archive keeps the uncheckpointed WAL the app's clean shutdown leaves, as a real profile has it. - real_fixture_tests.rs: env-gated on MIGRATION_FIXTURES_DIR, checksum-bound to the manifest. Asserts the plain open fails with a typed migration error, the bridge open and typed loads succeed, the wallet keeps its captured balance, no row is lost and added tables start empty, exactly one backup holds the original rows, and a second open is a no-op. Reads go through copies so no check checkpoints the file under test. - manifest.json: the weekly entry, asserted by alias (this era's data.db has no wallet table); artifact pointer pending the draft-release relay upload. - manifest.rs: pins the entry's shape, including derivation staying on. - README: gui+det-cli capture method, the release_tag relay, the expect table, platform_rev/staging_note, MIGRATION_FIXTURE_WEEKLY_MNEMONIC. - det-cli: note that process::exit skips the WAL checkpoint. The recovery phrase stays in the operator's store; the archive is never committed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci(migration): relay large fixture archives through a draft release and run the real-data bridge test Bootstrap's workflow_dispatch input is capped at ~48 KB (base64), too small for a current-era fixture that carries a raw SQLite WAL. Add a release_tag input: a temporary draft release carries the archive, and a single contents:write job (fetch-draft-release) downloads it and hands it to the read-only upload job as a same-run artifact. The verifying job still checks bytes and sha256 against the committed manifest entry either way. migration-matrix.yml gains a step that runs the platform_compatibility real-data test against the downloaded weekly-20260908 fixture and fails if it did not actually execute (env-gated tests can otherwise silently no-op). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * chore(migration-fixtures): record the weekly-20260908 fixture's uploaded artifact Fills in workflow_run_id/retention_days/expires_at from the successful migration-fixture-bootstrap.yml dispatch (run 34597906288) that relayed the archive through a temporary draft release, and drops the staging_note now that the artifact exists. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * ci(migration): run the matrix on every PR 983 branch push Reuse the migration workflow without path or draft filtering for this branch, and pass the fixture password through an Actions secret. Co-Authored-By: Codex <noreply@openai.com> * test: harden migration matrix outcomes and password handling * fix(migration): enforce fixture integrity and credential isolation * fix(mcp): inspect storage without initialization and report wallet ownership Co-Authored-By: Codex <noreply@openai.com> * ci(migration): validate fixture scripts before building Record the migration test and diagnostic additions and document runtime-only fixture password configuration. Co-Authored-By: Codex <noreply@openai.com> * test(migration): use runner-provided grep for script assertions Co-Authored-By: Codex <noreply@openai.com> * test(cli): check request read in redirect regression Co-Authored-By: Codex GPT-6 <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * fix(migration): address retry and matrix review findings <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * fix(migration): preserve captured data and secure CLI transport Persist CLI network selections across processes and verify capture restarts. Check legacy wallet declarations, pre-existing migration markers, and committed WAL rows; correct the historical schema inspection instructions. Disable HTTP proxies for CLI tool requests and cover transport with a real loopback proxy regression. Co-Authored-By: OpenAI Codex <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * fix(cli): preserve active context when network settings fail Persist the selected network before stopping the outgoing backend and swapping contexts. Shut down the candidate backend if saving fails. Cover the failure with an injected storage error and an active-context identity assertion. Co-Authored-By: OpenAI Codex <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * fix(ci): run migration matrix for PR 983 <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * fix(test): update migration fixture RNG import for rand 0.10 <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * fix: keep passphrase-limit import in single-key tests <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * test(migration): cover historical public identities and DPNS --------- Co-authored-by: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Codex <noreply@openai.com>
…slow SPV sync (#1017) * test(e2e): expect IdentityKeyVerificationFailed for a key not on the masternode #860 split the string-carrying KeyInputValidationFailed into a format-only KeyInputValidationFailed(KeyInputError) and IdentityKeyVerificationFailed (KeyVerificationError). A well-formed WIF that matches no OWNER key is a verification failure, so TC-MN-020 now asserts NoMatchingKey { owner }. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(e2e): clamp masternode withdrawals to the protocol per-transition limits A tenth of a long-running testnet evonode's balance (~1321 tDASH) exceeds max_withdrawal_amount (500 DASH), so consensus rejected TC-MN-050. Clamp the amount to system_limits of the platform version DET builds with, and fail with a fund-the-identity message when the balance is below the minimum. Applies to TC-MN-050, TC-MN-051 and TC-MN-053. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(e2e): fail masternode cases loudly on missing E2E_MN_* inputs The masternode cases returned early when an input was unset, reporting ok without running, and read names (E2E_MN_PRO_TX_HASH, *_WIF) the operator .env never used. Adopt the operator names as canonical (E2E_MN_PROTX_HASH, E2E_MN_OWNER_KEY, E2E_MN_PAYOUT_KEY, E2E_MN_VOTING_KEY): the loaders take WIF or hex, so _KEY is accurate. A missing input now panics with setup instructions and names the rename when a legacy spelling is set; legacy names are not aliases, to avoid ambiguous precedence. TC-MN-007 no longer needs a key: the ProTxHash parse fails before any key check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(e2e): expect MalformedProTxHash for a malformed masternode ProTxHash #860 gave masternode/evonode loads the ProTxHash-specific MalformedProTxHash; TC-MN-007 still expected IdentifierParsingError and never noticed because a missing payout key skipped it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(wallet): report an insecure wallet data folder instead of disk-space advice A wallet database whose folder (or an ancestor) other accounts can modify is refused upstream with WalletStorageError::InsecureParentDir, which DET mapped to the generic 'check disk space and restart' copy. Map it to a dedicated WalletDataFolderInsecure variant that tells the user to make the folders writable only by their account; the folder and reason stay in the source chain. Classify it as a terminal storage-open error, since retrying cannot fix permissions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(e2e): stop the workdir scan on a store refusal the next slot cannot avoid open_available_workdir treated every store-open error as 'slot still open in this process', so an insecure_parent_dir refusal (group-writable TMPDIR) cycled all 10 slots and ended blaming lock files. Classify on the typed upstream variants: only WalletStorageError::AlreadyOpen and SecretStoreError::AlreadyLocked mean the slot is held. Anything else returns WorkdirOpenError::StoreRefused at once, and the panic prints the full source chain, which names the offending directory and the fix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(e2e): resume a slow SPV sync on its own slot instead of retrying init A fixed 600s SPV wait panicked init; the retry could not reopen the slot (its SPV lock and k/v claim stay held in-process), so it moved to a fresh slot and restarted sync from genesis, which cannot finish in 600s either. Wait on the same runtime while the monotonic spv_progress_token advances, failing after SPV_STALL_WINDOW (180s) without progress or at SPV_SYNC_CAP (1800s, the former 3 x 600s worst case). The pure spv_wait_verdict and spv_progress_advanced decisions are unit-tested. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(platform-info): read the current epoch live again Review comment on #1016: the TODO(platform#4231) in the CurrentEpochInfo arm was stale. The fix is in this repo's pin (9f7ed169): ExtendedEpochInfo::fetch_current now resolves the epoch with two proved explicit-start queries the verifier accepts, so the query shape that burned the SDK address pool is gone. Restore the live fetch, which publishes the network's own fee multiplier and protocol version, and keep the previous behaviour (default multiplier plus the DPNS-driven ratchet) as the logged degraded path when the fetch fails. It belongs in this PR because the review comment landed on #1016 after it merged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(platform-info): pin the completed-withdrawal status filter Review comment on #1016 asked whether filtering on WithdrawalStatus::FAILED (5) is valid while the contract is loaded at protocol 13, whose status enum stops at EXPIRED (4). A schema enum constrains documents, not query values: nothing in the query path checks membership, and the value encodes through the status property's type at both schema versions. So the filter stays as is, with the reasoning recorded where it is sent, the two call sites sharing one helper, a unit test on encoding, and live testnet coverage of both withdrawal queries plus the restored epoch fetch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(identity-keys): pin the expires_at conjunct in same_key Review comment on #1016: same_key_rejects_a_v1_key_against_v0_or_other_limits varied only total_budget, so removing the expires_at comparison would not have failed it. Compare two keys with an identical budget and different expiries, in both directions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(wallet-backend): cover TokenOperationFailed in identity_op_error_kind Review comment on #1016: the arm bucketing network rejections had no test for TokenOperationFailed. Assert the Rejected bucket for it alongside Sdk and TransactionBroadcast, which share the arm. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(platform-info): stop dash_to_credits! silently zeroing the test total dash_to_credits! stringifies its argument and parses the text, so a Rust numeric separator is not a digit to it: dash_to_credits!(1_000_000) is 0 credits. daily_withdrawal_limit_uses_det_platform_version_not_latest ran on a zero total and still passed, because protocol 14 returns its 500 Dash floor there, which differs from protocol 13's flat 2000 Dash anyway. Drop the separator, assert the total, and pin the protocol-14 expectation to the 4000 Dash cap, which only a genuinely large total produces. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(e2e): report why no workdir slot could be opened The scan swallowed every I/O and locking failure: create_dir_all errors were dropped with .ok(), a lock-file open error and any flock failure both meant 'try the next slot', so an unwritable TMPDIR, a full disk or a filesystem without flock all ended as 'all slots busy, kill other test processes'. try_lock_exclusive now returns Ok(false) only for EWOULDBLOCK and an error otherwise (LockUnsupported); a non-permission I/O failure stops the scan with DirectoryUnusable. PermissionDenied stays ambiguous between a foreign slot and an unwritable parent, so it keeps scanning and is reported at the end when no slot was ever genuinely taken. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(e2e): name the SPV error when the sync wait gives up The progress wait ignored SpvStatus::Error, so a sync that died mid-flight was reported as a bare stall without the recorded SPV error. Log the error when it first appears (the status clears itself, so the log is the only record), and report ErroredAndStalled, carrying spv_last_error, when the wait ends while SPV is errored; Stalled and Exhausted now carry the status they observed. Not a fail-fast check: SpvStatus::Error is not terminal here. EventBridge recomputes the status from every on_progress, so a manager error is cleared by the next progress event, and aborting on it would abandon a sync that recovers on its own. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(platform-info): stop the degraded epoch copy claiming network knowledge The fallback rendering said the multiplier 'is the one every network charges today', which this build cannot know once the epoch fetch failed, and pointed at an upstream issue number. Say it is the app's default and ask the user to try again, and pin both in the test. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(deps): update platform while preserving existing profiles Pin Platform v4.2-dev at e3cd7cf (4.2.0-dev.8) and adapt wallet APIs. Automatically bridge the previous PR's database lineage for both app and network stores with retained backups, strict staged loading and atomic reconstruction. Preserve live identity metadata during ownership promotion. Handle swept transaction events and enable the passing Max-send regression. Document retained functionality, remaining upstream gaps and audit results. Validation: cargo fmt --all; 2520 library tests passed; exact CI Clippy flags --all-features --all-targets -- -D warnings passed. Co-Authored-By: Codex <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * fix(deps): pin platform to 63cf57f Include the pending contact-crypto persistence and identity-removal serialization fix. Migration history and schema remain unchanged; retain the verified database compatibility bridge and other lockfile resolutions. Validation: formatter, 2520 library tests, and CI Clippy flags passed with the locked dependency graph. Co-Authored-By: Codex <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * docs(migration): add fixture contract, capture recipe and matrix design Groundwork for the cross-version migration matrix. No code, no fixture payload: this is the contract every later workstream builds against. - tests/migration-fixtures/README.md: what a fixture is, the threat model for a public-by-design testnet fixture wallet (dedicated, dust-only, never the backend-E2E wallet; recovery phrases stay in environment variables, the protected wallet's password is a fixed literal matching the existing PROTECTED_PASSWORD precedent), packing rules, the GitHub Actions artifact storage model and its retention consequences, and a field reference for the manifest. - tests/migration-fixtures/manifest.json: schema v1, seeded with the one required baseline (v0.9.3, wallet-identity-dpns, GUI capture). Artifact fields are null until the capture workstream packs and uploads it. - tests/migration-fixtures/profiles/: acceptance checklists for the wallet-only and wallet-identity-dpns profiles, with era-specific verification. The v0.9.3 DPNS name lives inside the opaque identity.data bincode blob, so it is verifiable only in the UI, not by SQL. - docs/gui-testing/scenarios/migration-fixture-capture.md: the v0.9.3 capture recipe. That tag has no DASH_EVO_DATA_DIR, so isolation is via XDG_CONFIG_HOME, and its own .env.example must be used. It also has no SPV stack, so it sees funds only through a local Dash Core node over RPC/ZMQ and cannot build a registration's asset lock unaided; the identity is registered beforehand with the current build and only loaded by ID during capture. - docs/ai-design/2026-09-10-migration-matrix/design.md: condensed design — the three migration systems, PR #981's compatibility bridge and the synthetic-fixture gap it names, why v0.9.3 is structurally immune to that divergence, the conditional assertion table, phases and sequencing. - docs/user-stories.md: WAL-033 [Gap] for surviving an app upgrade. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * feat(mcp): add read-only identity_list and app_storage_status tools The migration-verification harness needs to inspect a profile after an upgrade without a GUI and without moving the profile forward. Two read-only tools cover that: - `identity_list` reports the identities persisted for the active network with their DPNS names, balances and wallet bindings. Like `core_wallets_list` it hydrates storage but skips the SPV gate: every field comes from persisted state, so it reports what is on disk rather than what the chain currently says. - `app_storage_status` reports the stored `data.db` schema version against the version this build's ladder targets, the newest upstream wallet-storage migration applied to `det-app.sqlite` (version, name and checksum — the fingerprint that identifies which schema line a profile came from), the live migration state machine, and each network's four upgrade completion markers with the timestamp and build version that wrote them. It deliberately hydrates nothing and starts no sync, so it observes an upgrade instead of triggering one. The markers are read through the key functions `finish_unwire` already exports, so there is one definition of each key. The schema-history read is best-effort: a profile the upstream store has never opened has no history table, which is an answer rather than a failure. `DEFAULT_DB_VERSION` was re-exported for tests only; widen it to the MCP feature set so the tool can name the version it compares against. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * test(migration): add cross-version migration matrix harness Boots profiles captured by older DET releases against the binary built from this tree and asserts the upgrade lands them intact. The harness spawns the real `det-cli` as a subprocess with `DASH_EVO_DATA_DIR` pointed at a staged copy of the fixture. An in-process `AppState` boot is not an option: under the `testing` feature `boot_inputs` substitutes an in-memory database, which would leave every migration assertion testing nothing. Assertions are conditional on where the fixture starts, so an already-current profile is not asserted to have migrated: - no panic and no `WalletDataIncompatible` on either stream; - `data.db` reaches `DEFAULT_DB_VERSION` only when it started below it; otherwise its schema must be unchanged (strict byte identity is opt-in per fixture, since a normal boot legitimately writes rows); - the active network, wallet aliases and identity ids survive; - the `finish_unwire` completion sentinel is recorded; - a second boot adds no backup files and rewrites no sentinel. Fixtures are multi-megabyte captures kept as CI build artifacts, so the matrix runs only when a workflow sets `MIGRATION_FIXTURES_DIR`. Unset, it reports the skip and passes, keeping `cargo test --all-features --workspace` green; the harness's own unit tests still run in that path. `DEFAULT_DB_VERSION` is re-exported from `database` so the assertion reads the live constant instead of a copy that would go stale. Left for the parallel workstreams: identity state is read straight out of the upstream `meta_identity` table until the read-only `identity_list` / `app_storage_status` MCP tools land. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * docs(migration): record real v0.9.3 fixture capture and its proof-format limit Wire the manifest entry to the fixture that was actually captured: - profile is wallet-only (not wallet-identity-dpns) with two real wallets (plain + password-protected), sha256 and size recorded, archive held at a durable local path pending CI artifact wiring - known_limitations documents the confirmed reason: v0.9.3's SDK only decodes GroveDB proof variant 0, current testnet nodes return variant 1, so v0.9.3 cannot load any identity regardless of how or when it was registered (a real identity + DPNS name were registered on testnet with the current build specifically to test this, and the load attempt failed with UnexpectedVariant as documented) - note the dead TESTNET_dapi_addresses list in v0.9.3's .env.example Add the capture scenario to the GUI-testing scenario index, flagged as not an A/B comparison per its own deviation note. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * ci(migration): add migration-matrix workflow, fixture scripts and pin guard - scripts/migration-fixtures/check-pin-ancestry.sh: verifies the pinned platform-wallet(-storage) rev is an ancestor of v4.2-dev AND fingerprints the rendered migration SQL (ancestry alone would miss a same-numbered migration content change, e.g. the 762c66cf -> 67d4ef3f V001 drift). Verified for real: current pin passes against today's v4.2-dev tip. - pack.sh: packs a data dir into a fixture archive, refuses to pack a live MCP_API_KEY, reproducible tar flags. - capture-headless.sh: drives det-cli through wallet import, SPV wait, address creation, discovery, verified against docs/CLI.md's tool set. - download-fixtures.sh: resolves fixture artifacts via gh run download (run-id exact) or a name-pattern fallback, no third-party Action. - check-coverage.sh: fails the schedule-only run if a published weekly newer than the newest manifest fixture has no entry; ENFORCE_AFTER defaults to v1.0.0-weekly.20260908 per the plan's narrowed scope. - .github/workflows/migration-matrix.yml: pin-ancestry -> build -> matrix jobs, path-filtered plus weekly schedule and workflow_dispatch. The fixture step tolerates "no fixtures found" for now (TODO: make it a hard failure once the manifest has real artifact-backed entries). - .github/workflows/weekly-build.yml: add migration-matrix.yml to the existing CI-green gate loop before a weekly can be cut. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * fix(migration): resolve fixture archive by documented manifest key The harness only recognised `archive`/`file`/`path` for the fixture archive name, while the manifest and its README schema use `archive_filename`. With every field defaulted the pointer deserialized to None, so staging fell back to `<id>.tar.zst` and would miss the archive CI actually downloads. - Accept `archive_filename` as an alias for `Artifact::archive`. - Add a regression test that parses the committed manifest via include_str!, so reader and manifest key names cannot drift apart unnoticed again. - Point the v0.9.3 entry's staging_note and the fixtures README at the manual migration-fixture-bootstrap.yml upload path (staged separately: .github/workflows/** is not agent-writable in this repo). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci(migration): add fixture bootstrap upload and make the matrix fail on missing fixtures - migration-fixture-bootstrap.yml (new): workflow_dispatch uploads a base64-encoded fixture archive as a real GitHub Actions build artifact. Name, filename, sha256 and size are pulled from the committed manifest entry named by fixture_id, so a dispatch can only publish bytes a reviewed manifest already describes. A pull_request trigger on the file itself registers the workflow before it reaches the default branch, since GitHub only dispatches workflows that already exist on a branch or have run at least once. - migration-matrix.yml: download-fixtures.sh now runs with --strict and the `|| true` tolerance is gone; an empty resolved fixture set is a hard ::error::+exit 1 instead of a warning. Also fixes two env mismatches that would otherwise make --strict fail even with a correctly wired fixture: pass MIGRATION_FIXTURES_MANIFEST (the harness never received a manifest path) and rename MIGRATION_DET_CLI to DET_CLI_BIN (the name the harness actually reads). - download-fixtures.sh: resolve manifest entries via the documented key names (artifact_name/workflow_run_id/workflow_name/sha256) with the old ad hoc names kept as a fallback, and verify the downloaded file's name against archive_filename. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * test(migration): record v0.9.3 fixture artifact run Records the real GitHub Actions build artifact produced by dispatching migration-fixture-bootstrap.yml (run 34579191654): workflow_name, workflow_run_id, retention_days and expires_at. Drops staging_note, now that the fixture is resolvable via download-fixtures.sh --strict instead of only existing as a durable local file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * fix(migration-matrix): stop a test-env leak from clobbering DET_CLI_BIN `a_bogus_binary_override_is_reported` set DET_CLI_BIN then unconditionally removed it. cargo test runs every #[test] in this integration-test binary in one process on a shared thread pool, and `migration_matrix` (main.rs) also reads DET_CLI_BIN via locate_binary(). The trivial unit test finishes almost instantly while migration_matrix reaches its own locate_binary() call much later (after loading the manifest and staging the fixture), so the CI-provided DET_CLI_BIN was reliably gone by then, not just occasionally flaky — the migration-matrix workflow's real first run against the v0.9.3 artifact failed on exactly this ("det-cli was not built alongside this test"), even though the fixture itself resolved and verified correctly. Save the original value and restore it instead of deleting it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * docs(ai-design): add platform_compatibility bridge pattern reference Standing pattern card for the next platform-wallet-storage pin divergence: when check-pin-ancestry.sh fires, why checksum/numbering reconciliation alone doesn't fix a genuine schema divergence, the bridge's recognize/backup/convert/rebuild mechanism, how to build a fixture for a new bridge instance (synthetic + real captured profile), and the per-incident (not general-translator) scope of the pattern. Distinct from docs/ai-design/2026-09-10-platform-pin/upgrade-notes.md, which is the point-in-time PR #981 review record. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * fix(mcp): restore the legacy network before the det-cli boot picks one Standalone det-cli (`init_app_context`) read the active network only from the AppSettings k/v blob, which does not exist yet on the first launch after upgrading from a pre-rewrite release, so it fell back to mainnet. The GUI runs `legacy_settings::import_legacy_settings` before choosing the network (`AppState::new_inner`); det-cli never did. On a real v0.9.3 testnet data dir this booted mainnet, ran the one-shot legacy wallet drain against mainnet (imported=0), and listed no wallets. Run the same import before the network is read. On import failure the GUI forces a network chooser; det-cli has no one to ask, so it refuses to boot instead of guessing, and the unwritten sentinel makes the next launch retry. A TODO marks the call for the planned "doctor" migration module. The regression test boots the real `init_app_context` over a v0.9.3-shaped data dir (serialized by DASH_EVO_DATA_DIR_LOCK) and asserts testnet; it fails with `Mainnet != Testnet` without the import. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(migration-matrix): assert the read-only data.db contract and umask-proof staging Since the platform-wallet rewrite (#860) every boot path opens an existing data.db with SQLITE_OPEN_READ_ONLY; the schema ladder only builds a fresh file. The harness still demanded that a v0.9.3 data.db climb from version 11 to DEFAULT_DB_VERSION, contradicting the product contract that v093_upgrade.rs asserts (byte-unchanged). - check_schema_outcome: an existing data.db must keep its version and schema; an absent one must be created at DEFAULT_DB_VERSION. - Byte identity of an existing data.db is now unconditional; the data_db_byte_identical opt-in and its "must be migrated" branch go. - check_bytes_unchanged names a same-size rewrite correctly. - The stager restricts every directory between the sandbox root and the data dir to 0700. Under a 002 umask `unpacked/` was 0775 and the wallet store refused to open (insecure_parent_dir), so the harness passed on CI runners (umask 022) but not locally. - design.md and the fixtures README describe the read-only contract. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(migration-matrix): expect StorageUpdateNeedsDesktop for password-protected wallets The v0.9.3 baseline holds a password-protected wallet. By design (docs/ai-design/2026-07-14-migration-password-prompt/design.md) headless det-cli cannot prompt for its password, so the storage update stops at StorageUpdateNeedsDesktop { source: InteractivePromptUnavailable } and every wallet tool stays gated until the desktop app finishes it. The matrix treated that documented outcome as a failed boot. Make the outcome explicit and per wallet instead of tolerated: - manifest.json: contents.wallets[].expected_outcome is `migrated` (default) or `needs_desktop`; unknown values fail the parse. Documented in tests/migration-fixtures/README.md. - A fixture with a `needs_desktop` wallet must fail both wallet-gated boots with exactly that typed error. Completing, or failing any other way, is a regression. - Per-wallet storage check: the legacy data.db and the upstream store share no wallet id, but both keep the BIP44 account-0 xpub (78-byte serialization vs base58check text in account_registrations). `migrated` wallets must be registered, `needs_desktop` ones must not. - The wallet-drain completion sentinel must stay unwritten while the update is unfinished; address derivation is skipped in that mode. The full harness now passes against the real v0.9.3 artifact with the CI-equivalent configuration. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(logging): cap rmcp logging so raw MCP tool arguments never reach logs rmcp 1.7.0 logs every inbound request with its raw tool arguments at DEBUG (`service.rs`: "received request") and every streamable-HTTP response message at TRACE. Tool arguments carry secrets -- the core_wallet_import recovery phrase, masternode private keys -- so any RUST_LOG at debug or finer wrote them to det.log or stderr. `logging::sensitive_target_cap()` is a `Targets` global filter layered over the EnvFilter in every subscriber DET installs (`initialize_logger`, used by the GUI, the stdio server and headless mode, plus det-cli's own subscriber). As a separate layer it is ANDed with RUST_LOG, so no directive -- not even an explicit `rmcp::service=trace` -- can lift the INFO ceiling on `rmcp`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(storage-update): finish a protected-wallet storage update non-interactively A standalone or headless upgrade of an installation holding a password-protected wallet could only stop at StorageUpdateNeedsDesktop. Operators running DET without the desktop app had no way to finish it. - MCP tool `app_storage_update { password: SecretString, network? }`. The password deserializes straight into guarded memory, Debug is redacted, the schema is a plain string with no default, and it is borrowed down to the drain for one call -- no shared password state (`prepare_storage_with_wallet_password` -> `run_gated` -> `register_migrated_wallets`). - The drain tries it on every locked wallet through `handle_wallet_unlocked` with `UntilStorageUpdateComplete` -- the boundary the desktop prompt submits to -- before the interactive-capability check. A wallet it does not open fails the update with the typed `WalletPasswordRejected` / `TaskError::StorageUpdatePasswordRejected`: nothing is skipped and the sentinel is withheld. Without a password nothing changes: `InteractivePromptUnavailable`, at once. - A desktop session refuses the tool (`McpToolError::DesktopOwnsPasswordPrompt`, -32006): no remote channel into the desktop prompt. - det-cli `--password-stdin` / `--password-file <path>` read the password client-side and pass it as the tool's `password` parameter. Refused: a TTY on stdin, a file with any group/other permission bit (checked on the opened fd), anything but one non-empty line within MAX_PASSPHRASE_LEN, an inline `password=...`, and --password-file on non-Unix (TODO: ACL check). A tool call is now resolved -- password included -- before connecting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(migration): boot the v0.9.3 fixture again with its password supplied The matrix keeps the no-password scenario (the protected wallet must stop at StorageUpdateNeedsDesktop) and adds the manifest's `password_runs`: the same archive, freshly staged, finished through `app-storage-update --password-file <0600 file>`, where both wallets must migrate, the second boot needs no password, data.db stays byte-identical, and every listed wallet derives an address. The password boot logs DET, det-cli and rmcp at trace, and any command whose output contains the password fails the run. Scenarios are derived and validated from the manifest: one shared password, known aliases, and no `needs_desktop` in a password run. The fixture password never appears in a harness Debug or error either. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(storage-update): record the non-interactive password decision - migration-password-prompt design: the original rationale stays; a new "Decision 2026-09-11" section records who decided and why, why stdin or an owner-only file and never an env var or argument, why fail-fast still holds, the one-password/no-skip and desktop-refusal rules, the rmcp log cap, and the residuals. - jit-secret-access Q-HEADLESS: notes the storage-update exception; signing keeps the ruling. - MCP.md / CLI.md: the `app_storage_update` tool and the det-cli flags; WAL-032 gains the operator path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(det-cli): keep wallet passwords off plain HTTP and out of stdin's buffer Security review follow-up for the non-interactive storage-update path. - SEC-004: --password-stdin / --password-file are refused in HTTP mode unless the address is https or plain http to loopback (127.0.0.0/8, ::1, localhost). The check runs before the password is read and before any connection is made; 0.0.0.0 and unparsable addresses are refused too. - SEC-002: --password-stdin reads a duplicated raw stdin descriptor as a File, bypassing std's process-wide 8 KiB stdin buffer that is never wiped. The zeroizing read buffer is again the only user-space copy. - SEC-001 (desktop check is in-process only) and SEC-003 (no password attempt throttling) stay open as TODOs in app_storage_update and are recorded as known, accepted limitations in the design doc. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(migration-matrix): skip SPV-gated address derivation for legacy-drained v0.9.3 wallets CI run 34592733217 timed out in the password scenario's address derivation: the legacy drain registers both v0.9.3 wallets as WalletOrigin::Imported (birth height 0) with no committed sync height, and dash-spv starts the compact-filter download at max(birth_height, committed + 1, header_start). The first SPV-gated call therefore waits for a scan from genesis, ~1.55M testnet filters, which a GitHub runner does not finish inside the product's 10-minute SPV gate (~590k filters in that run). Not transient: fixtures ship no spv/ state, so every run starts from zero. The v0.9.3 entry opts out with expect.derive_address = false, pinned by the manifest test. Key integrity stays covered offline: each registration is matched by its account xpub. Bounding or resuming that scan belongs to the doctor module, hence TODO(doctor-module) in the harness rather than a longer wait. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(migration): real-data platform_compatibility fixture from v1.0.0-weekly.20260908 The bridge was proven only on synthetic rows. Add a fixture a released build wrote: v1.0.0-weekly.20260908 (Platform pin 67d4ef3f), a fresh testnet-only wallet funded by one 1 tDASH faucet payment, captured via the weekly's own det-cli plus one GUI launch to persist the testnet selection (capture_method gui+det-cli). The archive keeps the uncheckpointed WAL the app's clean shutdown leaves, as a real profile has it. - real_fixture_tests.rs: env-gated on MIGRATION_FIXTURES_DIR, checksum-bound to the manifest. Asserts the plain open fails with a typed migration error, the bridge open and typed loads succeed, the wallet keeps its captured balance, no row is lost and added tables start empty, exactly one backup holds the original rows, and a second open is a no-op. Reads go through copies so no check checkpoints the file under test. - manifest.json: the weekly entry, asserted by alias (this era's data.db has no wallet table); artifact pointer pending the draft-release relay upload. - manifest.rs: pins the entry's shape, including derivation staying on. - README: gui+det-cli capture method, the release_tag relay, the expect table, platform_rev/staging_note, MIGRATION_FIXTURE_WEEKLY_MNEMONIC. - det-cli: note that process::exit skips the WAL checkpoint. The recovery phrase stays in the operator's store; the archive is never committed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci(migration): relay large fixture archives through a draft release and run the real-data bridge test Bootstrap's workflow_dispatch input is capped at ~48 KB (base64), too small for a current-era fixture that carries a raw SQLite WAL. Add a release_tag input: a temporary draft release carries the archive, and a single contents:write job (fetch-draft-release) downloads it and hands it to the read-only upload job as a same-run artifact. The verifying job still checks bytes and sha256 against the committed manifest entry either way. migration-matrix.yml gains a step that runs the platform_compatibility real-data test against the downloaded weekly-20260908 fixture and fails if it did not actually execute (env-gated tests can otherwise silently no-op). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * chore(migration-fixtures): record the weekly-20260908 fixture's uploaded artifact Fills in workflow_run_id/retention_days/expires_at from the successful migration-fixture-bootstrap.yml dispatch (run 34597906288) that relayed the archive through a temporary draft release, and drops the staging_note now that the artifact exists. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EmWboC3cubxQec5W4dAch * ci(migration): run the matrix on every PR 983 branch push Reuse the migration workflow without path or draft filtering for this branch, and pass the fixture password through an Actions secret. Co-Authored-By: Codex <noreply@openai.com> * test: harden migration matrix outcomes and password handling * fix(migration): enforce fixture integrity and credential isolation * fix(mcp): inspect storage without initialization and report wallet ownership Co-Authored-By: Codex <noreply@openai.com> * ci(migration): validate fixture scripts before building Record the migration test and diagnostic additions and document runtime-only fixture password configuration. Co-Authored-By: Codex <noreply@openai.com> * test(migration): use runner-provided grep for script assertions Co-Authored-By: Codex <noreply@openai.com> * test(cli): check request read in redirect regression Co-Authored-By: Codex GPT-6 <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> * ci: renew migration fixture archives through pull requests Preserve archive bytes, verify source metadata, and propose refreshed run pointers before expiry. Include a read-only dry run and offline contracts. Co-Authored-By: Codex GPT-6 <noreply@openai.com> <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Codex <noreply@openai.com>
Goal
This PR started as a wallet-backend swap: move DET's SPV/wallet stack onto the upstream
platform-walletcrate (dashpay/platform), which owns chain sync, address derivation, identity/asset-lock handling, and the shielded coordinator. That rewrite is still the foundation, and the framing below still holds: DET's bespokesrc/spv/stack and the legacy RPC wallet mode are gone, chain sync and derivation come from upstream, and theBackendTaskaction/channel contract is preserved.Since it was opened, ~30 additional PRs (#861–#900, excluding #862) stacked onto this branch and merged. Together they turned this from a backend swap into a full rewrite of Dash Evo Tool against the new backend — the UI layer, the identity/masternode/DPNS/DashPay workflows, the secret-storage model, and the progressive-disclosure interface were all rebuilt, re-verified, and in several cases substantially extended, not just re-plumbed onto the new engine. This PR is now the merge point for that entire rewrite into
v1.0-dev.What shipped beyond the backend swap
Everyday < Power < Developerrole model (UserRole,Capability/FeatureGate::checks()) with a three-way "Interface mode" picker, so future features have a real place to attach beyond "developer or not."v0.10-dev— working Identity Hub Contacts (accept/decline/cancel/search/pay), a restored shielded receive-address view, settings/scheduled-vote/top-up-history migration on upgrade, interactive global nav pills, and a formal disclosure/closure record for the items intentionally not carried forward.wallet_backend/secret_seam.rs) for every wallet secret class, per-secret at-rest encryption (Argon2id + XChaCha20-Poly1305, fresh per-object salt, AAD-bound scope), per-secret independent passwords, and optional per-identity Tier-2 protection for standalone-imported identity keys.-— now derives the fee for outgoing transactions from their known inputs/outputs.docs/gui-testing/): standing rules and a reusable scenario library for driving the compiled app through a real display, used throughout this stack's live-verification passes.docs/user-stories.mdis the fullest account of the resulting feature surface, persona-tagged and marked[Implemented]/[Gap].Bugs fixed
Funds-safety
watched_addressescould desync fromplatform_address_info). The wallet now reconciles this automatically via seedless reverse-derivation from the account xpub, so a visible balance can always be withdrawn. No funds were ever at risk: the withdrawal failed safely before broadcast.default_withdrawal_key()) could pick a key that exists on the identity but whose private key isn't loaded locally — common on masternode/evonode identities where only the Owner key was supplied — failing signing with an unhelpful technical error. It now sources only from private-key-backed keys (Transfer-preferred, Owner-fallback).send_paymentnow builds and signs through upstream's nativeTransactionBuilder(upstream removed the previousCoreWallet::send_to_addressesAPI) and broadcasts viabroadcast_transaction_releasing_reservation, so a rejected broadcast can't leak a UTXO reservation. Error messages are now variant-specific — a "too many inputs" failure no longer tells the user to check their balance.Balance display
75.62vs2.16DASH on Platform). Root cause: DET was discarding derivation-index metadata upstream already provides, and the per-category summary only ever looked at DET's own address list, not the backend's authoritative one.platform_balance_duffs), so it can't lag behind. A stopgap runtime health-check banner that used to detect this class of drift after the fact has been removed — it's structurally unreachable now. Default-mode users also get a reconciling tab for any balance in a normally-hidden category (e.g. CoinJoin, or a funded address the managed-wallet pools don't recognize), so visible tabs always sum to the header total, in every mode. The Platform tab is shown immediately on wallet load (matching pre-migration behavior) rather than waiting on a completed sync pass. This fix went through two independent adversarial QA passes; the first caught that the initial version's "cannot diverge" claim was true for Platform but not yet for Core (a deeper root cause — an upstream balance-update path that could silently drop updates under its own lock contention), the second independently re-verified the fix against the actual upstream source and confirmed it closed.Transaction history
core_transactionsrows on load. It is now hydrated at wallet load, insert-if-absent by txid, before the first snapshot is published.-: discoveredTransactionRecords were always built withfee: None. Outgoing transaction fees are now derived from known inputs minus outputs, falling back to-(never a wrong number) on incomplete or overflowing data.estimate_platform_feealso now accounts for output count, so the advanced Platform→Platform preview no longer underestimates multi-output transfers.Shielded confirmation-safety
*ConfirmationUnknownerrors instead of a false success.Secret hygiene
Data-safety
Lifecycle / sync
Review-remediation fixes (this session)
A dedicated audit of every stacked sub-PR's review threads (formal comments, review bodies, and bot auto-resolutions — independently re-verified against current code rather than trusted at face value) surfaced 3 HIGH + 20 MEDIUM findings still present in the merged tree. Fixed and re-merged, grouped by theme:
Also: a committed testnet-only mnemonic and WIF were found and redacted from an internal QA doc (
WAL.md) — testnet material, not a live secret, removed per the project's no-committed-secrets policy.Second-pass adversarial review + full QA sweep (this session)
A follow-up multi-agent adversarial review (3 specialist reviewers + an independent Codex reviewer) of this session's own review-remediation diff surfaced 9 additional blocking findings, all fixed and merged:
Arc-backedOnceCell) so every caller sees the same real outcome.Followed by a full desktop-GUI QA sweep — a delta re-test against a prior comprehensive 175-user-story baseline, plus one net-new story (the storage-update/migration safety path, tested live against a real legacy-schema fixture). Confirmed the large majority of previously-broken stories now pass, and found 3 more issues during the walkthrough, all fixed the same way: the wallet/identity switcher was missing from 4 screens (Contracts, Tokens, Tools, Settings); the Send screen never asked for confirmation before broadcasting and its fee-reserve hint was unreachable; and a "Creating token…" progress banner stayed on screen indefinitely after the operation actually finished. Two known issues remain open, unchanged from before this session (an in-progress-deposit list that never populates, and per-key password protection being unreachable from the identity key list) — see
docs/user-stories.mdand the QA report for detail. One upstreamplatform-walletissue was found and triaged rather than blind-fixed in this repo: a background wallet-ID-mismatch error in identity-sync's token-balance-changeset flush, self-resolving, no observed user-visible impact.Full evidence-backed report (plain-language):
docs/ai-design/2026-07-16-pr860-qa-delta/summary-report.md.Housekeeping
core_backend_modesettings field + DB column,FeatureGate::RpcBackend) was already fully inert — chain sync has been SPV-only since this migration started — but the dead weight itself was left behind pending a dedicated schema migration. It's gone now: settings field removed (with a reserved wire byte to keep the existing bincode-encodeddet:settings:v1blob layout intact — no user data at risk), DB column dropped via a new backward-compatible v38 migration (existence-guarded, idempotent, no drop-and-resync needed), and the always-false feature gate removed. Verified: RPC config fields, chain-lock RPC error plumbing, andsend_screen's Core/Platform source picker are genuinely still live and were left untouched.debug_assert!invariant guards replaced with real runtime checks. Two sites relied ondebug_assert!, which compiles out in release builds — silently disabling the check for every real user. The SPV phase-count drift guard now logs an error instead of vanishing; the tracked-lock funding empty-recipients precondition is now a typedTaskErrorreturned in every build.RUST_MIN_STACKraised to 8 MiB project-wide via.cargo/config.toml, independent of the backend-e2e suite's own dedicated 32 MiB test runtime.e6b508f1→c2135800(108 upstream commits; API drift notes below), thenc2135800→44c20e3to pick up theTransactionBuilderAPI after upstream removedsend_to_addresses(see Bugs fixed → Funds-safety). First bump's adaptations:ManagedIdentityDashPay state sealed behind adashpay()accessor;ContactXpubDatasplit into{ xpub, compact }with the DIP-15account_referencenow HMAC'd over the 69-byte compact xpub (an upstream fix matching the iOS/Android reference clients — DET's own pinned test vector was re-verified against upstream's own known-answer test and re-pinned to the new interop-correct value);IdentityWallet::dashpay_sync()replaced by explicitsync_contact_requests+sync_profilescalls;PlatformWalletErrorgained 5 variants / dropped 3; a handful of signature changes. Full gate re-verified green after each bump.WalletBackendgod-impl split intoshielded.rs/identity_ops.rs/payments.rssibling modules (mirroring the existinghydration.rs/dashpay.rspattern, zero behavior change, funds-signing path moved verbatim); a 14-copy duplicatedInMemoryKvtest fake collapsed into one sharedkv_test_supportmodule; a dead one-implPersistedWalletLoadertrait seam deleted (the G2 mock-boundary swap it existed for already shipped); several near-twinTaskErrorvariants merged; a stringly-typed warning channel in the wallet-refresh banner replaced with a typed error; stale/self-contradicting migration-module comments (some literally asserting things the code no longer does) rewritten to describe present state only; ~150 ephemeral review-round ID references (SEC-NNN/QA-NNN/etc.) stripped from committed comments per the project's own convention against citing IDs that get reassigned on every consolidation run; two unreferenced UI widgets (ContactRow/ActivityRow, ~750 lines) removed; kittest/e2e test-harness boilerplate deduplicated across 19 files.Full audit-round details live in the audits' own report artifacts (not part of this PR's diff).
Breaking changes
platform-walletpin includes a schema change that rewrites migrationV001in place — it drops thecore_derived_addressesandaccount_address_poolstables and hardcodes core UTXOaccount_index = 0. Existingspv//platform-wallet.sqlitedatabases are not forward-compatible and must be deleted and re-synced.DEVELOPER_MODEin.envno longer selects the initial role.Known gaps
Updated from the original draft: the two items below marked (closed) were resolved by PRs folded into this branch since it opened.
platform-wallet/dash-sdkcrates are pinned to an unreleased branch (dash-evo-tool), not a released tag. Must be re-pinned to a released version before merge-to-ship. Still open — the in-branch bumps since the original draft (most recently to pick up thedash-evo-toolPR #3968 head) pick up upstream fixes within that same unreleased branch; none resolve the need for an eventual released-tag pin.432.41vs7.34DASH). Watch-only rehydration rebuilds accounts from xpubs and derives only the default gap window (indices0..=29) without restoring the persisted derivation depth. The fix belongs upstream inrs-platform-wallet(extend each account'sAddressPoolto the highest restored index on rehydration); tracked. Distinct from the header-vs-tab single-sourcing fix under Bugs fixed → Balance display, which closes a DET-side bookkeeping gap and doesn't touch rehydration's gap-window derivation.Non-wallet data not migrated: app settings, top-up history, scheduled DPNS votes reset on upgrade.Closed by feat: v1.0 UI parity batch — Identity Hub contacts, shielded receive, migration fix, nav pills, disclosure closure #882's settings/vote/top-up migration on upgrade, further hardened this session (see Bugs fixed → Review-remediation fixes).Token "stop tracking" undone by a refresh.Closed by feat: v1.0 UI parity batch — Identity Hub contacts, shielded receive, migration fix, nav pills, disclosure closure #882.SingleKeyWalletsUnsupported, pending upstream watch-only registration support (register_walletis private; public constructors require an HD seed). Import / data-loss guard / password-restore are done; confirmed still blocked during the feat: v1.0 UI parity batch — Identity Hub contacts, shielded receive, migration fix, nav pills, disclosure closure #882 parity audit.docs/user-stories.mdUX-004).docs/user-stories.mdIDH-005).identity-hub-activity-feedCargo feature (docs/user-stories.mdIDH-006).docs/user-stories.mdWAL-030).docs/user-stories.mdDPY-010).KeyInfoScreen) has no live UI entry point yet.docs/ai-design/are historical record, not user-facing docs — left as-is, flagged for a possible future trim, and have grown further with this stack's own design docs. Merge-time action: confirm the dependency-pin re-check above before ship.Testing
cargo build/cargo build --features headlessclean;cargo clippy --all-features --all-targets -- -D warningsclean;cargo +nightly fmt --all -- --checkclean.network-info,tools,tool-describe,core-wallets-list) passes.docs/ai-design/.det-cli(identity load + owner-key withdrawal, confirmed viaplatform-withdrawals-get) and the running GUI app (real click-through withdrawal, confirmed via the app's own broadcast-completion log).docs/ai-design/2026-07-16-pr860-qa-delta/summary-report.md.Attribution
🤖 Co-authored by Claudius the Magnificent AI Agent