Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
487 changes: 487 additions & 0 deletions .claude/skills/release-review/SKILL.md

Large diffs are not rendered by default.

51 changes: 50 additions & 1 deletion docs/gui-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,59 @@ one scenario silently invalidating another:
run spanning hours, set `CARGO_TARGET_DIR` to a private path before building
and hash-verify (`sha256sum`) before each relaunch.

## A/B build comparison contract

Every scenario in this library is run twice with the identical procedure: once
against the **baseline** binary and once against the **development** binary
selected for the current campaign. Both are roles, not specific versions —
record the two exact commit SHAs in that campaign's own artifacts, never in a
scenario file, so the library stays valid for the next campaign too.

**Judge by observation, not by expectation.** Record what each build actually
does at every step before classifying anything. Never assume which build is
"correct", which behavior a given change was meant to introduce, or which
direction a difference is supposed to point.

**Blocker rule** (a campaign may narrow this, never silently widen it):

- **Blocking**: the development build is worse than the baseline build from the
user's perspective in the happy flow, or a **data-loss** outcome on either
build.
- **Not blocking**: a purely cosmetic difference, or behavior reproduced
identically on **both** builds (pre-existing — note it, don't flag it as a
regression). Intermittency is not an exemption: a race that reproduces on one
build and not the other is still a regression, and timing sensitivity only
changes how many attempts a repro needs. Reproduce anything about to be
marked blocking at least twice before confirming it.

**Equivalent fixture state per build.** Isolated data directories give the two
builds separate *local* state, but not separate *live-network* state. Any step
that spends a UTXO, consumes a deposit, registers a DPNS name, or moves credits
mutates shared on-chain state, so the second build's run would otherwise start
from whatever the first run left behind — an already-consumed deposit, a spent
UTXO set, a name that is no longer available — producing a false regression or
a false pass. Before any such step, give each build either its own
independently-funded, equivalent fixture (a separate wallet/identity per side)
or a restored snapshot of the same starting state, and record each side's
starting balances/deposits/identities/names first. Recording the difference and
accounting for it afterwards is **not** sufficient. Steps that only read state
(navigation, display checks) are unaffected.

## Scenario index

These six scenarios are written **build-neutral**: the same procedure runs
unmodified against either binary of an A/B campaign, with the blocker rule and
the fixture requirement from the [A/B build comparison
contract](#ab-build-comparison-contract) above applied in each file's own
"Expected outcome" section.

| Scenario | What it verifies |
|---|---|
| _(none yet — first one lands once the masternode-withdrawal-without-a-wallet run is verified)_ | |
| [`identity-key-recovery-migration.md`](scenarios/identity-key-recovery-migration.md) | Key-placement resolution and legacy-key recovery (#941, #945, #946, #948): keys found/signed/restored/removed correctly regardless of internal filing convention; Keys screen reachable from every interface level; same-numbered-key collisions never cross-contaminate |
| [`wallet-max-send-asset-lock.md`](scenarios/wallet-max-send-asset-lock.md) | "Max" agrees with what the wallet can build/send across Shield/Fund-Platform-Address/Create-Identity/Top-Up/Transfer/Withdraw (#937, #927), including dust-wallet and rapid-UTXO-churn variants |
| [`dpns-registration-flow.md`](scenarios/dpns-registration-flow.md) | Contested-vs-registered DPNS messaging, pending-registration indicator/tooltip, onboarding checklist, and DashPay social-profile save feedback (#918) |
| [`error-banners-identity-home-actions.md`](scenarios/error-banners-identity-home-actions.md) | Error-banner wording, validation consistency, identity-removal responsiveness, Identity Home's action row, already-consumed-deposit messaging, deposit-verification crash fix (#927, #934) |
| [`platform-shielded-availability-after-sync.md`](scenarios/platform-shielded-availability-after-sync.md) | Shielded features correctly activate right after SPV/platform sync instead of silently staying disabled (#936, #938) |
| [`dapi-budget-resilience-after-resync.md`](scenarios/dapi-budget-resilience-after-resync.md) | Repeated SPV `Syncing`↔`Synced` transitions no longer exhaust the shared DAPI request budget and break unrelated actions like identity top-up (#950) |

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
134 changes: 134 additions & 0 deletions docs/gui-testing/scenarios/dapi-budget-resilience-after-resync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Scenario: Connection budget survives repeated resync cycles

**Verifies:** Cycling the SPV connection state between `Syncing` and `Synced`
repeatedly does not exhaust the app's shared DAPI request budget, and does not
cause an unrelated Platform action (identity top-up) to fail with a generic
"servers are temporarily unreachable" banner. (Risk area: #950, building on
#936/#938.)

**Tier justification:** The failure this scenario targets is a real,
live-network request-budget exhaustion that only manifests after several
actual `Syncing`→`Synced` transitions against a real DAPI connection — it
cannot be simulated in `kittest` (no network) or isolated to a single
`backend_task` call (the bug is about a background task's cumulative effect
across transitions, not any single call's return value).

**Run against BOTH builds with this identical procedure** — the baseline and
development binaries selected for the current campaign (record their exact
SHAs in that campaign's own artifacts, not here).

Before any step that spends funds, consumes a deposit, or registers a
name, each build needs its own independently-funded equivalent fixture (or
a restored snapshot of the same starting state) — see [A/B build comparison
contract](../README.md#ab-build-comparison-contract).

## Prerequisites

- Network: testnet
- Environment variables (names only):
- `E2E_WALLET_MNEMONIC` — funded testnet wallet
- `E2E_IDENTITY_ID` (or an identity created ad hoc) — an identity to top up
- Verify exact banner/error wording during execution rather than assuming the
text below is literal

## Setup

```bash
DATADIR=$(mktemp -d)
cp .env.example "$DATADIR/.env"
pgrep -af dash-evo-tool

BIN=<path to the build under test — baseline or development worktree binary>
test -x "$BIN"
LOG="$DATADIR/dapi-budget-resilience.log"
DASH_EVO_DATA_DIR="$DATADIR" nohup "$BIN" >"$LOG" 2>&1 &
```

## Procedure

1. **Initial Platform Info check.** Open Platform Info (Developer/Advanced
view). Record the exact "Current Epoch Information" text, in particular
whether the fee-multiplier line reads "unavailable" or states it is "a
fixed value, not read from the network" (or neither, if the build under
test predates that line entirely).
2. **Force repeated `Syncing`↔`Synced` transitions.** With the app running
and initial sync complete, force several resync cycles in the same
session — e.g. toggle network connectivity briefly (airplane-mode-style
interruption, or a short `iptables`/firewall block on the DAPI/Core
ports if available) 4–6 times over a few minutes, or use "Clear cached
SPV data to force a resync" (NET-020) repeatedly. Each cycle should visibly
pass back through a `Syncing` state before returning to `Synced`.
3. **Attempt identity top-up immediately after the resync cycles.** Top up
an identity's credits (any small amount) right after step 2's last
transition back to `Synced`. Record whether it succeeds, and if it fails,
capture the exact banner text.
4. **Repeat the top-up attempt once more** a short time later (a minute or
two) without additional resync cycling, to distinguish "budget recovers
on its own" from "budget stays exhausted."
5. **Check the logs.** Confirm the log targets exist first — `ls -l "$LOG"`
and `ls -l "$DATADIR"`, which is where the app writes `det.log` /
`det-stderr.log` — then search them:

```bash
grep -R 'DapiAllAddressesExhausted' "$LOG" "$DATADIR"
```

Look for that or similar rate-limit/address-pool exhaustion markers
appearing near the resync cycles from step 2, independent of whether the UI
showed an error. Record "not reproduced" only after confirming the files
exist and are non-empty — a missing log file means the check never ran, not
that the marker is absent.
6. **Re-check Platform Info.** Reopen Platform Info after the resync cycling
and top-up attempts; record whether the epoch/fee-multiplier text is
still consistent with step 1's observation (no crash, no stuck "loading"
state).

## Safety constraints specific to this scenario

- Step 3's top-up moves real (small) testnet funds — keep amounts minimal,
per the standing fund-movement cap.
- If simulating a network interruption via firewall rules, restore
connectivity immediately after each toggle and confirm via `pgrep`/process
liveness that the app itself never needed restarting.

## Expected outcome / pass criteria

Record the observed behavior for each build at every step, then apply this
rule:

- **BLOCKING** only if HEAD is worse than baseline in the happy flow — e.g.
the identity top-up in step 3 succeeds on baseline after repeated resync
cycling but fails with a generic "servers are temporarily unreachable"
banner on HEAD, or `DapiAllAddressesExhausted` (or equivalent) appears in
HEAD's logs where it did not on baseline — or a **data-loss** outcome on
either build.
- **NOT blocking**: the reverse direction — the baseline build's top-up
failing after repeated resync cycling while the development build's
succeeds. Record it factually as an observed difference between the two
builds; do not assume it was the intended outcome, and do not treat it as a
baseline "failure" to flag. A wording-only difference in the Platform Info
fee-multiplier line (`unavailable` vs `a fixed value, not read from the
network`) is not itself a defect on either build.
- If neither build reproduces an exhaustion-triggered top-up failure within
the attempted resync-cycle budget, record that plainly as "not reproduced
this run" rather than asserting the fix is confirmed — a live-network
race like this can be timing-sensitive.

## Known gotchas

- Simulating repeated `Syncing`→`Synced` transitions without real network
interruption tooling may require several minutes of patience — SPV
reconnect timing is not instantaneous. Budget real wall-clock time for
this scenario rather than expecting each cycle to complete in seconds.
- The DAPI request-budget exhaustion this scenario targets is a *shared,
per-client* resource — if another tool/process is also hitting the same
SDK client concurrently (e.g. an `det-cli` smoke test running in
parallel), the observed exhaustion timing may differ from a clean,
single-consumer session. Run this scenario in isolation from other DAPI
traffic against the same data directory.
- This is the only scenario in the library that deliberately drives
multiple resync cycles in one session — if a *different*, unrelated
defect surfaces only under repeated resync (not specific to #950), note
it here rather than assuming it belongs to another scenario file.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
134 changes: 134 additions & 0 deletions docs/gui-testing/scenarios/dpns-registration-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Scenario: DPNS registration messaging and social-profile save feedback

**Verifies:** DPNS registration correctly distinguishes "registered outright"
from "submitted for a community vote" (contested name), a pending
registration shows a clear indicator/tooltip instead of looking unrequested,
the onboarding checklist counts a pending request toward "Pick a username,"
and — from the same underlying PR — the DashPay social-profile save flow
gives real progress/success/error feedback without a stuck progress banner
or a stale result misattributed after switching identities mid-save. (Risk
area: #918.)

**Tier justification:** Needs a real contested-name registration against a
live testnet name-contest window, real onboarding-checklist state derived
from actual identity data, and real async save timing (a save in flight
when the user switches identity) — none of which a no-display harness can
drive with a live contest clock and real background-task scheduling.

**Run against BOTH builds with this identical procedure** — the baseline and
development binaries selected for the current campaign (record their exact
SHAs in that campaign's own artifacts, not here).

Before any step that spends funds, consumes a deposit, or registers a
name, each build needs its own independently-funded equivalent fixture (or
a restored snapshot of the same starting state) — see [A/B build comparison
contract](../README.md#ab-build-comparison-contract).

## Prerequisites

- Network: testnet
- Environment variables (names only):
- `E2E_WALLET_MNEMONIC` — funded testnet wallet
- A DPNS name likely to be contested (short, generic, or currently popular)
to register during an active contest window
- At least two identities on the same wallet (for the identity-switch-
mid-save step)
- Verify exact tooltip/button text during execution rather than assuming
the wording below is literal

## Setup

```bash
DATADIR=$(mktemp -d)
cp .env.example "$DATADIR/.env"
pgrep -af dash-evo-tool

BIN=<path to the build under test — baseline or development worktree binary>
test -x "$BIN"
LOG="$DATADIR/dpns-registration.log"
DASH_EVO_DATA_DIR="$DATADIR" nohup "$BIN" >"$LOG" 2>&1 &
```

## Procedure

1. **Register a contested name.** On an identity with no username yet,
register a name likely to be contested. Record the exact completion
message shown — does it say "registered" or does it indicate a pending
community vote?
2. **Identities list indicator.** Record whether/how the Identities list
shows this identity's pending request differently from "no username."
3. **Identity Home indicator.** Record what the Identity Home hero card
shows for this identity — the requested name, a status indicator, or the
generic "pick a username" prompt.
4. **Indicator tooltip.** If a status indicator/pill is present, open its
tooltip and record what it says (who decides, any estimated timing).
5. **Onboarding checklist.** Record whether the onboarding checklist treats
the submitted request as satisfying "Pick a username," and what wording
it uses.
6. **Uncontested name, for comparison.** On a second identity, register a
name unlikely to be contested and record the completion messaging —
confirm it's still distinguishable from the contested case.
7. **Contest resolves.** If the contest window is short enough to wait out,
revisit the identity after resolution and record what the indicator does
(disappears / name displays normally on a win; reverts to "pick a
username" on a loss).
8. **Social profile save, normal case.** Open Contacts → set up/edit social
profile, change the display name or bio, save. Record what feedback
appears during and after the save (progress indicator, then a
success/error banner) and whether the progress indicator clears when the
outcome appears.
9. **Social profile save, forced failure.** If you can force a failure
(briefly disconnect network mid-save), record the same as step 8 for the
failure path.
10. **Switch identity mid-save.** Start a profile save on identity A, and
before it completes, switch to identity B. Once the save's result
arrives in the background, record which identity (if any) shows a
result banner, and whether it's ever attributed to the wrong
(now-active) identity.
11. **Contacts setup CTA.** On an identity with no DashPay profile, open
the Contacts tab and record the setup card's CTA wording and whether any
"Why?"/explanation control actually opens an explanation.

## Safety constraints specific to this scenario

- None beyond the standing rules — DPNS registration fees are small and
testnet-only here.

## Expected outcome / pass criteria

Record the observed behavior for each build at every step, then apply this
rule:

- **BLOCKING** only if HEAD is worse than baseline in the happy flow (e.g.
a contested registration falsely claims "Registered!" on HEAD when
baseline correctly said "pending"; a save's progress banner gets
permanently stuck on HEAD where baseline cleared it; a save result gets
attributed to the wrong identity on HEAD where baseline didn't), or a
**data-loss** outcome (a profile edit silently lost) on either build.
- **NOT blocking**: wording differences with no functional consequence; an
issue reproducing identically on both builds; a timing-sensitive race that
needs several attempts to reproduce and only sometimes shows on **both**
builds.
- **Precedence: intermittency never downgrades a wrong-identity result.** If a
save result is attributed to the wrong identity (step 10) on one build and
never on the other, it stays BLOCKING however rarely it reproduces — that
race is exactly what this scenario exists to catch, so being hard to land
inside the race window is a reason to attempt it more times, not a reason to
waive it under the timing-sensitive clause above.
- If the pending-registration indicator exists on only one of the two selected
builds, record that as a feature-presence difference, not a step failure on
the build that lacks it.

## Known gotchas

- Contest resolution timing depends on the live masternode voting schedule
on testnet — step 7 may need to be deferred to a later session rather than
blocking the rest of this scenario.
- The identity-switch race (step 10) is timing-sensitive; several attempts
with the save action and the identity switch performed in quick succession
may be needed to land inside the race window on either build. That
difficulty does not soften the result: per the precedence rule in "Expected
outcome", a wrong-identity attribution seen on one build only is blocking
even if it reproduced once in many tries.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
Loading