Skip to content

test: add marketplace wallet journey - #1220

Open
ovitrif wants to merge 5 commits into
masterfrom
codex/1212-marketplace-journey
Open

test: add marketplace wallet journey#1220
ovitrif wants to merge 5 commits into
masterfrom
codex/1212-marketplace-journey

Conversation

@ovitrif

@ovitrif ovitrif commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Closes #1212

This PR:

  1. Adds the Android wallet journey for a Pubky marketplace purchase, aligned with the iOS journey in test: add marketplace wallet journey bitkit-ios#720.
  2. Adds stable identifiers for watch-only authorization, contact payments, incoming requests, and payment approval.
  3. Records the live 2026-09-02 exact-head acceptance baseline and the first-release provenance for the existing claim and incoming-request surfaces.

Acceptance evidence covers the full controlled journey: seller watch-only claim, reciprocal linked-contact setup, fresh buyer funding, canonical Paykit delivery, payment approval, zero-confirmation detection, broadcast, one-block confirmation, paid request history, and Locks completion. This branch is rebased onto Android master merge 4527579; the approved original recording and acceptance evidence were captured at 0a0f7c8b, and the base sync did not change Marketplace behavior, selectors, or fixtures.

Description

  • Documents the controlled two-wallet integration fixture contract, emulator port mappings, evidence requirements, and exact cross-platform actions.
  • Aligns request-row identifiers to PaymentRequestRow-<id> and adds PaymentRequestPay-<id>.
  • Adds PubkyAuthAuthorize, PubkyAuthOK, and ContactPaymentsToggle identifiers.
  • Cites merged upstream Paykit Server POC wake2pay from notification #2 for canonical request behavior and merged Android feat: send paykit payment proofs #1178 for incoming-request swipe behavior.
  • Records successful live acceptance identifiers, both device identifiers, zero-confirmation and one-confirmation boundaries, and the intended first release milestone 2.6.0.

Preview

bitkit-android-1212-journey.mp4

QA Notes

Manual Tests

  • 1. Fresh funded Android buyer → receive request 5db852f6-d47a-43c4-8b17-fb7a654ac4dd → review the accepted fallback seller identity pubky…apfiy, 15,000 sats, and 141-sat fee → swipe once → verify transaction a3a427ca69a3f1d3f26fb47f38182c8543fdbd997227ddb8a2dec1ef0e927166 at zero confirmations → mine one regtest block → verify confirmed Android activity, paid request history without a Pay action, confirmed Paykit delivery, and completed Locks purchase.

Automated Checks

  • PaymentRequestsScreenTest.kt: all five focused Compose tests passed at the original reviewed head, including the incoming row and Pay identifiers.
  • just compile, just test, and just lint: passed at original reviewed head 0a0f7c8b.
  • Post-undraft CI build and all E2E shards passed at original reviewed head; lightning_security passed on its isolated rerun after the first attempt hit a runner Docker host-port collision before test execution.
  • Independent exact-head source audit and narrow re-certification: passed with no findings at original reviewed head.
  • Current head 9552ab55c9b9a3b9478e001d7b817abdf8755231 includes master merge 45275798727913fe264383e99c2fc0da522fa56e; git diff --check, just compile, just test, and just lint passed. Detekt reports only existing baseline findings outside this PR.
  • Fresh arm64 E2E APK SHA-256: cf96c9a637fd5b037ee4e34b5ea5ea77dd6049c71497d3cb22b4d221159e721c.
  • Preview video SHA-256: e21ce4b0bea14e42c0bb437cd8d443deebe6e2ba40488c0b24dbaaad54ec05ec.
  • xmllint --noout journeys/pubky-marketplace/wallet-leg.xml: passed at original reviewed head.

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Greptile Summary

Adds stable Compose identifiers and documentation for the controlled Pubky marketplace wallet journey.

  • Standardizes payment-request row identifiers and adds identifiers for payment approval, Pubky authorization, and contact-payment controls.
  • Adds instrumented-test coverage for the payment-request identifiers.
  • Documents the two-wallet regtest fixture, acceptance evidence, and end-to-end journey steps.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
app/src/main/java/to/bitkit/ui/screens/paymentrequests/PaymentRequestsScreen.kt Standardizes request-row tags and adds a request-specific Pay-button identifier without changing payment behavior.
app/src/androidTest/java/to/bitkit/ui/screens/paymentrequests/PaymentRequestsScreenTest.kt Updates identifier assertions and verifies that the incoming request exposes its Pay action.
app/src/main/java/to/bitkit/ui/screens/profile/PubkyAuthApprovalSheet.kt Adds stable identifiers to the authorization and success actions.
app/src/main/java/to/bitkit/ui/settings/SettingsScreen.kt Renames the contact-payments switch identifier to align with the documented journey.
journeys/pubky-marketplace/README.md Defines the integration fixture, evidence contract, release provenance, and recorded acceptance runs.
journeys/pubky-marketplace/wallet-leg.xml Encodes the seller-authorization, buyer-payment, broadcast, and confirmation journey.

Sequence Diagram

sequenceDiagram
    participant S as Seller Wallet
    participant F as Marketplace Fixture
    participant B as Buyer Wallet
    participant C as Regtest Chain
    S->>F: Authorize watch-only account claim
    S->>B: Establish reciprocal linked contacts
    F->>B: Deliver marketplace payment request
    B->>B: Review and approve payment
    B->>C: Broadcast transaction
    F->>C: Detect zero-confirmation payment
    F->>C: Mine one block
    C-->>B: Confirm transaction
    C-->>F: Confirm payment
    F->>F: Complete marketplace purchase
Loading

Reviews (2): Last reviewed commit: "docs: record selector replay" | Re-trigger Greptile

@ovitrif
ovitrif marked this pull request as draft September 2, 2026 10:05
@ovitrif
ovitrif force-pushed the codex/1212-marketplace-journey branch from b296556 to 496b457 Compare September 2, 2026 10:37
@ovitrif
ovitrif force-pushed the codex/1212-marketplace-journey branch from 496b457 to 0a0f7c8 Compare September 2, 2026 10:52
@ovitrif
ovitrif marked this pull request as ready for review September 2, 2026 11:42

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA LGTM on the identifiers + journey contract. Did not re-run the isolated marketplace fixture.

Checked latest (0a0f7c8b):

  • Cited IDs exist on this branch: PubkyAuthWatchOnlyConsent / Approve / Authorize / OK, ContactPaymentsToggle, PaymentRequestsSheet, PaymentRequestRow-<id>, PaymentRequestPay-<id>, ReviewAmount, ReviewContactRecipient, GRAB, SendSuccess, ActivityAmount, ActivityTxDetails.
  • xmllint --noout journeys/pubky-marketplace/wallet-leg.xml passes.
  • Compose identifier tests in PaymentRequestsScreenTest match the hyphenated tags.
  • CI green, including e2e-tests-staging - pubky_paykit.

Notes, not blockers:

  • Merge #1217 first. This PR’s PaymentRequestRow- / PaymentRequestPay- tags are a subset of #1217 (that one also adds PaymentRequestDismiss-<id>).
  • PR body QA notes cite request 5db852f6-… / tx a3a427ca…. README records different accepted runs (ad1a8463-…, then selector replay b7f67854-…). Fine if those are separate replays — worth one line so we do not treat it as a mismatch later.
  • README says #1209 “preserves rejected incoming requests as visible history.” On #1217, parse rejects stay log-only; the visible-history / retry path is the explicit Pay terminal toast. Wording is slightly off.

I am not blocking on not replaying the Locks/Paykit Server fixture here. The journey is documentation of an accepted 2026-09-02 run, and the app-side selectors it needs are present.

@ovitrif ovitrif changed the title test: prove marketplace wallet journey test: add marketplace wallet journey Sep 3, 2026
@ovitrif
ovitrif force-pushed the codex/1212-marketplace-journey branch from 0a0f7c8 to 9552ab5 Compare September 5, 2026 02:01
@ovitrif
ovitrif requested a review from piotr-iohk September 5, 2026 02:21
<action>Verify the fixture reports the seller and buyer as linked peers</action>
<action>Have the fixture create one marketplace purchase for the buyer and record its Payment Request id</action>
<action>Verify the request uses lowercase "btc", a regtest endpoint identifier, and a JSON endpoint value</action>
<action>Wait for the incoming requests sheet (id "PaymentRequestsSheet")</action>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fresh incoming request opens payment review automatically, so waiting here never produces PaymentRequestsSheet. Could we dismiss the automatic review and tap PaymentRequestsBell before checking the row and Pay identifiers?

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selector-parity pass looks right — I checked every tag the journey uses against bitkit-ios and all of them resolve there except one. Two notes below.

Also: the README pins Paykit Server 867fc883, the adb port maps and the homeserver key, but not the marketplace driver / Locks harness, so nobody else can replay this end to end yet. Is there a ref you can pin, like hardware-wallet/README.md does with bitkit-docker?

</description>
<actions>
<action>Open the fixture setup auth URL in the seller wallet</action>
<action>Verify the watch-only consent screen (id "PubkyAuthWatchOnlyConsent") is visible</action>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use testTag "X" instead of id "X". The 32 existing journey specs use testTag " 147 times and id " zero times.

s/(id "/(testTag "/ on lines 13, 14, 16, 17, 19, 21, 23, 27-33 and 36.

modifier = Modifier.weight(1f),
modifier = Modifier
.weight(1f)
.testTag("PaymentRequestPay-${request.paymentRequestId}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PaymentRequestPay-<id> is the only selector in this PR with no iOS counterpart — the iOS pay button (PaymentRequestsView.swift:82-90) has no accessibilityIdentifier, unlike the row at :104.

wallet-leg.xml:29 is written platform-neutrally and the README replays an Android buyer against an iOS seller, so the step won't resolve if the buyer leg runs on iOS. Either add the identifier on iOS or note in the README that this selector is Android-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: prove the android pubky marketplace wallet leg

4 participants