Repository navigation
Support app-aligned Paykit fixtures for native Android QA - #32
Conversation
talosmachina
left a comment
There was a problem hiding this comment.
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.pyaccepts paykit-server0ffd4da's lock (git pins, rc65, locks rc8). On paykit-servermaster's lock, against paykit-rsv0.1.0, it verifies both registry packages and returns locksv0.1.0atac8e893.marketplace-policy.pyreturnslegacyfor locksb3dc87c(rc8) andpayment-window-hoursfor locksmaster. That matchesvalidate_paykit_payment_paramsin both, and paykit-servermasterrequirespayment_inonPOST /invoices(http/invoices.rs).select-sdk-features.shselects the default build for paykit-rs7185ae7andversioned-payment-request-acceptanceforv0.1.0.claim_payment_request_for_executionreturns the record that carriesproposal_stream_item_idin both.paykit-classic-dockerfile.pyconverts theDockerfile.localof both paykit-server0ffd4daandmaster.- The
request-infoAAD layout, HKDF label and envelope offsets match paykit-servercaf2b6dcrypto.rs. The Postcard field order matchesDeliveryIntentV1/PaymentTermsV1insemantic_intent.rs.
Ruled out
- Native seller with no headless seller breaking
verify:verify()runsseedfirst, which createsfixture.seller. The new...fixturespread inseedkeeps an already-approvedbitkit_seller. statusthrowing on an unbound native purchase:findPaymentTxreturns null when it has neither an address nor a txid, and line 962 only logs.mineregressing 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 fromwindowFields(LOCK_POLICY). - Stale fixture image reused after a pin change:
fixture_matchesreads/usr/local/share/paykit-rs-revfrom 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 repeatstartwith 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.
|
Merging this PR now. It has been open since 24 Oct, the full Talos review on |
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_inpolicy; 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-infocommand 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.