Skip to content

Support app-aligned Paykit fixtures for native Android QA - #32

Merged
ovitrif merged 14 commits into
synonymdev:mainfrom
piotr-iohk:feat/android-qa-fixture-alignment
Nov 12, 2026
Merged

ovitrif merged 14 commits into
synonymdev:mainfrom
piotr-iohk:feat/android-qa-fixture-alignment

Conversation

@piotr-iohk

@piotr-iohk piotr-iohk commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Native Android marketplace QA needs the app's registry-source Paykit locks and a seller authorization flow that can pause for native consent. This change verifies registry/package provenance against app-aligned source pins, preserves selected image revisions, supports both SDK acceptance signatures, and exposes an owned split-phase seller grant. Stable Locks receives its required payment_in policy; cached driver images rebuild when their bounded local source inputs change.

Cold Cargo builds fetch the selected source inside the cache boundary. The classic Docker transport retains the actual Cargo commands while removing unsupported BuildKit cache mounts. Unknown lock schemas and stale or mismatched image/source identities fail explicitly. Native transaction binding attributes a purchase to the observed wallet transaction rather than an unrelated baseline payment.

The read-only request-info command correlates the native request UUID and purchase bundle, authenticates the durable SDK handoff, and decodes its actual Postcard v2 intent in memory. It exports only a bounded public Bitcoin endpoint projection. It rejects unsupported quoted conversion-rate payloads; fixture keys, envelopes, grant URLs and private metadata remain private. A real Rust Postcard 1.1.3 golden and malformed-input cases cover the binary decoder.

Validation: 56 fixture regression tests passed on Linux/Python 3.10 with PyNaCl. Actual no-cache default and app-aligned stable Cargo builds completed in a disposable QA VM, with observed revision/image receipts and build logs. Independent combined source and delta reviews have no remaining findings. Commits are signed and Verified on GitHub.

Live pinned Android PR1635 acceptance completed native seller consent, contacts, actual delivered request inspection, purchase, exact transaction verification, confirmation, seller payout and restart/detach persistence. The observer correlated the actual native UUID and bundle and returned lowercase btc with the public regtest endpoint JSON. The buyer/seller TXIDs and 10,000-sat payout matched. All 50 author outcomes were observed: 48 passed, pre-purchase peer linkage failed (linked=false/no_purchase_yet despite saved native contacts), and the stale-Pay conditional branch was absent. That negative test-plan/fixture assertion remains failed; the tested PR is unapproved. No Appium or production wallets are involved.

Awaiting maintainer review. Keep this upstream PR open; it is not authorized for automatic merge. The private harness stages the exact signed fixture revision 69b6cb6.

Companions: qa-skills#41, Watch#84, Stefan#3.

Performance limitation: the measured fresh full session spent about 23 minutes preparing the app/backend build and devices. Reusing immutable APK/backend image artifacts across fresh runtime sessions remains a performance follow-up.

@piotr-iohk
piotr-iohk marked this pull request as ready for review October 24, 2026 16:39

@talosmachina talosmachina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No findings. Lets the marketplace fixture follow the Paykit and Locks versions a Bitkit app PR pins: lockfile provenance checks, saved pins, SDK acceptance API selection, the Locks payment_in policy, driver source identity, split-phase seller auth, txid-bound native payments and a read-only request-info observer. Reviewed 69b6cb6, full tier.

What I checked, and 6 candidates I ruled out

Read in full: pubky-marketplace, scripts/follow-app-paykit, scripts/paykit-lock.py, scripts/marketplace-auth.py, scripts/marketplace-request-info.py, scripts/marketplace-policy.py, scripts/marketplace-driver-source.py, payment-requests/Dockerfile, payment-requests/select-sdk-features.sh, marketplace/driver/{payment-policy,seller-state}.mjs and the driver.mjs diff.

Run here: every scripts/test_*.py passes on Python 3.12. test_marketplace_request_info needs PyNaCl, and passes with PyNaCl==1.6.0 in a throwaway env (7 tests).

Checked against upstream:

  • paykit-lock.py accepts paykit-server 0ffd4da's lock (git pins, rc65, locks rc8). On paykit-server master's lock, against paykit-rs v0.1.0, it verifies both registry packages and returns locks v0.1.0 at ac8e893.
  • marketplace-policy.py returns legacy for locks b3dc87c (rc8) and payment-window-hours for locks master. That matches validate_paykit_payment_params in both, and paykit-server master requires payment_in on POST /invoices (http/invoices.rs).
  • select-sdk-features.sh selects the default build for paykit-rs 7185ae7 and versioned-payment-request-acceptance for v0.1.0. claim_payment_request_for_execution returns the record that carries proposal_stream_item_id in both.
  • paykit-classic-dockerfile.py converts the Dockerfile.local of both paykit-server 0ffd4da and master.
  • The request-info AAD layout, HKDF label and envelope offsets match paykit-server caf2b6d crypto.rs. The Postcard field order matches DeliveryIntentV1/PaymentTermsV1 in semantic_intent.rs.

Ruled out

  • Native seller with no headless seller breaking verify: verify() runs seed first, which creates fixture.seller. The new ...fixture spread in seed keeps an already-approved bitkit_seller.
  • status throwing on an unbound native purchase: findPaymentTx returns null when it has neither an address nor a txid, and line 962 only logs.
  • mine regressing the headless buyer: its ledger txid now goes through the explicit-txid path, which checks the mempool and the single matching output.
  • Lock criterion and invoice body disagreeing on payment_in: both come from windowFields(LOCK_POLICY).
  • Stale fixture image reused after a pin change: fixture_matches reads /usr/local/share/paykit-rs-rev from the image, not just the tag.
  • Split-phase auth starting a second listener after a lost response: the intent record is written before docker compose run, and a repeat start with the same fingerprint only reads status.

Merge confidence: 4/5, the repo has no CI on this branch, and I did not build the images or run the Docker flows here. The Bitkit track reviews are reasoned from code, tests and upstream sources.

@ovitrif ovitrif 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.

Approving: Talos's full review found nothing, and the fixtures are verified end to end through #38.

@ovitrif

ovitrif commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Merging this PR now. It has been open since 24 Oct, the full Talos review on 69b6cb6 found nothing, every commit is signed, and no review thread is open. synonymdev/bitkit-docker#38 builds on it: it moves the Paykit fixtures to paykit-rs 0.1.1-rc8, which the Spark Paykit route journey in both apps now passes with.

@ovitrif
ovitrif merged commit 96b597c into synonymdev:main Nov 12, 2026
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.

3 participants