Skip to content

fix: paykit fixtures on paykit-rs 0.1.1-rc8 - #38

Merged
ovitrif merged 5 commits into
mainfrom
fix/paykit-rc8-fixtures
Nov 13, 2026
Merged

ovitrif merged 5 commits into
mainfrom
fix/paykit-rc8-fixtures

Conversation

@ovitrif

@ovitrif ovitrif commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Refs: #32

Description

  • Moves the payment request peers (fixture-issuer, rc56-peer, homeserver-proxy) to paykit-rs adbe24a (v0.1.1-rc8, Pubky 0.16.2), the version bitkit-ios and bitkit-android master lock, so contact journeys run against peers on the apps' own Paykit SDK.
  • Moves Paykit Server to the head of chore: adopt Paykit v0.1.1-rc8 pubky/paykit-server#131 (b441977, paykit-rs v0.1.1-rc6, Pubky 0.16.2), the nearest revision, with marketplace/patches/paykit-server-paykit-rs-rc8.patch. The patch moves the server's lock to rc8 (Cargo.toml tags, Cargo.lock entries, the exact pin scripts/prepare-local-docker-sources.sh checks). No upstream revision locks rc8 yet. Move PAYKIT_SERVER_REV to the first that does and drop the patch. The patch names Applies-to: b4419772…, and apply_paykit_server_patches skips it on any other PAYKIT_SERVER_REV, so other pins (the README's rc11 route, scripts/follow-app-paykit) build as before.
  • Moves locks-core to v0.1.1-rc2 (3013d8c), the version chore: adopt Paykit v0.1.1-rc8 pubky/paykit-server#131 locks. The paykit-server-reader-accepts-proposal-expiry.patch is skipped because that revision contains its fix. The reader-metadata patch still applies.
  • The fixture's accept_payment_request call needs no new code: since rc74 it takes the approved proposal's expected_proposal_stream_item_id, and Support app-aligned Paykit fixtures for native Android QA #32's feature gate already passes the claimed record's proposal_stream_item_id. rc8's private intake over SSE (Codex/paykit sse private intake pubky/paykit-rs#243) is opt-in and Rust-only, and the write-slot check (fix: check Encrypted Link write slots before publishing pubky/paykit-rs#252) needs nothing from the peer, so both need no fixture change either.
  • The marketplace testnet stays on the Pubky 0.14.0 homeserver. Two rc8 peers complete a private link on it, so the write-slot HEAD checks work there.
  • Image tags follow the existing scheme: v0.1.1-rc8 builds payment-request-fixture:rc8-shared, and the image labels record the paykit-rs commit.

This PR builds on #32, now merged into main: it uses that PR's acceptance feature gate and PAYKIT_RS_REV build arguments.

Out of Scope

  • marketplace/pubky-testnet: the homeserver stays at 0.14.0 because rc8 peers link on it. paykit-rs names 0.16.2 as its supported minimum.
  • marketplace/driver: stays on @synonymdev/pubky 0.14.0. The compose entrypoint already rewrites the driver's [locks] trust into the [signed_services] form that b441977 reads.
  • Bitkit app changes.

QA Notes

Automated Checks

  • cargo update -p paykit-lib -p paykit-sdk on the fixture, then docker build payment-requests: builds with --features=versioned-payment-request-acceptance, and the image records paykit-rs adbe24a.
  • ./pubky-marketplace build-paykit with the rc8 pins: Paykit Server and the driver build. The lock check passes, and the patch applies at b441977.
  • All 13 scripts/test_*.py pass. test_paykit_pins.py now covers the v0.1.1-rc8 to rc8-shared tag, and the new test_paykit_patches.py covers revision-scoped patches.
  • apply_paykit_server_patches on a 662dca06 checkout: skips the rc8 patch and patches the tree as before.

Manual Tests

  • Paykit Server, testnet, proxy and both peers on rc8 against the regtest chain: Paykit Server reports ready on every component.
  • ./payment-requests/prepare --link-only: {"link":"linked"} in 8 s.
  • ./payment-requests/prepare: the one-time and monthly requests, a paid txid and verified.
  • Bitkit iOS (bbf02ca86) and Android (2f18eb69b) on paykit-rs 0.1.1-rc8, each with a fresh profile on the local testnet: saving the fixture-issuer as a contact completes the private link within seconds. The fixture's /sync then reports linked and carries the app's private payment list, and the app logs no recovery_required.

Move the payment request peers to paykit-rs adbe24a (v0.1.1-rc8, Pubky 0.16.2) and Paykit Server to pubky/paykit-server#131 (b441977) with a lock patch from rc6 to rc8, the version both apps pin. The testnet homeserver stays at 0.14.0.
@ovitrif ovitrif self-assigned this Nov 12, 2026
@ovitrif
ovitrif requested a review from piotr-iohk November 12, 2026 17:08

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

1 finding (1 P1). Moves the payment request peers, Paykit Server and the driver to paykit-rs v0.1.1-rc8, with a lock patch on top of pubky/paykit-server#131. Reviewed 864da21, full tier for this PR's own commit (864da21), not the #32 commits it carries or the merge of main.

What I checked, and 3 candidates I ruled out

Read in full: 864da21 (compose pins, pubky-marketplace pins, docs, test_paykit_pins.py), marketplace/patches/paykit-server-paykit-rs-rc8.patch, apply_paykit_server_patches / fetch_pinned / check_lock_pins in pubky-marketplace
Run: the patch checked with git apply --check against paykit-server b441977 (applies), 662dca06 and 0ffd4da (neither); apply_paykit_server_patches from this head run against a 662dca06 checkout (exit 1)
Not run: the Python tests and the image builds. talos-pr-run refused (it could not read the author's permission on this repo), so nothing from this branch ran here.
CI: none reported on this branch

Ruled out

  • Patch left behind on a pin change: fetch_pinned runs git checkout -- . before it moves the tree, so the rc8 edit does not leak into another revision.
  • Lock check against the unpatched tree: fetch_sources applies the patches before check_lock_pins, so the check reads the rc8 lock.
  • Fixture tag: PAYKIT_RS_TAG=v0.1.1-rc8 gives rc8-shared through ${paykit_version##*-}, which matches the compose defaults and the new test_paykit_pins.py case.

Merge confidence: 3/5, one P1, and no CI ran on the branch.

Reviewer model: claude-opus-5-5
Reasoning effort: Not exposed

Metadata note: the review session reports the model but not its reasoning setting.

@ovitrif

ovitrif commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Scoped the Paykit Server rc8 patch to its base revision, so build-paykit keeps working on other pins such as the README's rc11 route:

  • marketplace/patches/paykit-server-paykit-rs-rc8.patch names Applies-to: b4419772dde23292189764e48a3ba4651b67a50d.
  • apply_paykit_server_patches skips a patch with an Applies-to: commit on any other PAYKIT_SERVER_REV.
  • New scripts/test_paykit_patches.py covers it. All 13 scripts/test_*.py pass.

Re-review is needed only because of this push: 864da21...0410f81

@ovitrif
ovitrif requested a review from talosmachina November 12, 2026 17:36

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

Re-review of 0410f81 after 864da21. 1 earlier finding: 1 fixed. 0 new findings. The rc8 lock patch now carries Applies-to: b4419772... and apply_paykit_server_patches skips it on any other PAYKIT_SERVER_REV. Full tier on the diff since 864da21.

What I checked, and 2 candidates I ruled out

Earlier finding: the rc8 patch stops build-paykit on other Paykit Server pins. Fixed. The Applies-to: check runs before git apply --check, so on 662dca06 (the README's rc11 route) and on any server scripts/follow-app-paykit picks, the patch is skipped, and the loop goes on to the Upstream: logic for the other two patches as before.
Read in full: apply_paykit_server_patches, ensure_sources, fetch_sources, the pin block of pubky-marketplace, the scripts/follow-app-paykit patch-label comparison, and scripts/test_paykit_patches.py.
Run: git apply --check of the shipped patch file against paykit-server b441977 (it applies) and 662dca06 (it fails on Cargo.lock, which the header now skips). Nothing from the branch ran. talos-pr-run refused (it could not read the author's permission on this repo), so the new Python tests did not run here either.
CI: none reported on this branch.

Ruled out

  • Patch label lists a skipped patch: PAYKIT_SERVER_PATCHES still names the rc8 file on a 662dca06 build, but it lists the files in marketplace/patches, not the ones applied. The proposal-expiry patch, skipped through Upstream:, was already listed the same way. follow-app-paykit compares that list on both sides, so it stays consistent.
  • Re-apply on an existing tree: on a b441977 tree that is already patched, ensure_sources calls the loop again and the --reverse check makes that a no-op.

Merge confidence: 4/5. No open findings, but no CI ran on the branch and its tests did not run here.

@ovitrif

ovitrif commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Merged main after #32 landed, so this PR now carries only its own rc8 commits. The merge had no conflicts, and all 13 scripts/test_*.py pass.

Re-review is needed only because of this push: https://github.com/synonymdev/bitkit-docker/compare/0410f81c0..5f6c9b7

@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 review

Scope: full review. I reviewed the whole PR diff against its merge base 96b597c at 5f6c9b7. There was no saved baseline, so nothing is inherited. Covered: compose pins, image tags and labels; the pubky-marketplace pins and the Applies-to: patch scoping; the rc8 Paykit Server patch; the fixture's Cargo.toml/Cargo.lock; the docs and script tests. I also traced the affected callers: scripts/follow-app-paykit, payment-requests/Dockerfile, scripts/paykit-lock.py, scripts/paykit-classic-dockerfile.py and the driver's trust rewrite.

1 actionable finding — resolve or provide an evidence-backed rebuttal.

What the PR gets right. The rc8 patch applies cleanly to upstream pubky/paykit-server b441977. Its Cargo.lock edit matches paykit-rs adbe24a: compared with rc6, only the version changes and paykit-sdk adds base32, which the server lock already resolves. The repo's own paykit-lock.py accepts the patched lock with locks-core 3013d8c / v0.1.1-rc2. On b441977, the proposal-expiry patch is correctly skipped, because its Upstream: fix ee82ab4 is an ancestor. The reader-metadata patch still applies. The driver's [locks] → [signed_services] rewrite matches this server, which rejects [locks] trusted_public_key. The fixture's Dockerfile reads pubky = "0.16.2" from paykit-lib at adbe24a, which matches the new =0.16.2 pin. The earlier patch-scoping thread is marked resolved. Its fix (the Applies-to: skip) holds at this head.

One LOW finding. The new lock patch means the server image's recorded upstream revision no longer locks the paykit-rs commit in its label. scripts/follow-app-paykit re-checks against that upstream lock when it saves pins, so it fails for the apps' current rc8 pin after a default build.

Validation: python3 -m unittest scripts/test_paykit_patches.py passes 5/5 at the head. I ran the full scripts/test_*.py discovery at head and at base. Failures at head (6 failures, 1 error) match base (5 failures, 1 error) apart from the new v0.1.1-rc8 subtest, which fails the same way as its existing siblings. The cause is this host's Python 3.10 without tomli; the sandbox blocked installing it or a newer Python. So I could not reproduce the author's report that all 13 test modules pass. I ran paykit-lock.py against the upstream and patched b441977 lockfiles using pip's vendored tomli. No Docker or cargo builds were run. Image builds, the fixture compiling against Pubky 0.16.2, and rc8 peers working on the 0.14.0 testnet homeserver come from the author's reported runs. GitHub reports no CI checks on this branch.

Suggested additional test cases

  • Host with Docker. Setup: run ./pubky-marketplace build with the default pins. Action: run scripts/follow-app-paykit synonymdev/bitkit-ios <master head sha> (an app pinned to paykit-rs 0.1.1-rc8) without --check. Expected: exit 0, and .marketplace/paykit-pins.json records b4419772…/adbe24ac…. Not exit 4 after reporting that the images are current.
  • Host with Docker. Setup: export the README's rc11 route pins (PAYKIT_SERVER_REV=662dca06… and the matching paykit-rs/locks pins). Action: run ./pubky-marketplace build-paykit. Expected: the log prints skipped paykit-server-paykit-rs-rc8.patch: it applies only to paykit-server b4419772, the build completes, and the 662dca0 image labels record paykit-rs rc72. This is a full build, not just patch application on a checkout.

Findings

  • [LOW] follow-app-paykit fails to save pins for rc8 apps after a default build — inline at docker-compose.yml:520.

Reviewer model: claude-opus-5-5
Reasoning effort: high

Comment thread docker-compose.yml Resolved
@ovitrif

ovitrif commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed e7752aa for the QA review's finding: follow-app-paykit checks and saves pins against the patched Paykit Server lock the build uses, so it no longer exits 4 for rc8 apps after a default build. All 13 scripts/test_*.py modules pass.

Re-review is needed only because of this push: 5f6c9b7...e7752aa

@ovitrif
ovitrif requested review from piotr-iohk and pwltr November 12, 2026 20:31

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

Reviewed e7752aa. No issues found.

The fixtures, Paykit Server and the driver move to paykit-rs v0.1.1-rc8 consistently across Compose, pubky-marketplace and the docs. The rc8 lock patch is scoped to b441977, so other server pins still build, and follow-app-paykit checks and saves pins against the patched lock the build uses.

Review details

General review
Model: Claude Opus 5.5
Reasoning effort: high

@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 review

Scope: follow-up review at e7752aa. I re-reviewed the changes since the previous reviewed head 5f6c9b7, including affected code paths, and carried over coverage from the baseline review. The base and merge base are unchanged (96b597c). The only new commit changes scripts/follow-app-paykit and scripts/test_paykit_patches.py. I also listed every file in the full PR diff to check that nothing new was missed.

No new actionable code findings.

No new actionable code findings in the follow-up. The new server_lock helper takes upstream's Cargo.lock for the chosen Paykit Server revision. It then applies only the Cargo.lock part of patches whose Applies-to: matches that revision. This is the same lock that pubky-marketplace build-paykit checks in check_lock_pins, because fetch_sources applies the patches before that check. Both callers use it: the rebuild check and the pin save. So an image already built on b4419772 with the rc8 patch now passes the pin-save check instead of failing on upstream's rc6 lock. Server revisions without a scoped patch, such as master or a linked PR, still get upstream's lock, which matches what the build uses. The lock check ignores unscoped patches. That has no effect today: none of the shipped unscoped patches edit Cargo.lock.

Validation: python3 -m unittest scripts/test_paykit_patches.py passes all 7 tests at e7752aa, including the 2 new ServerLockTests (Python 3.10.12). bash -n scripts/follow-app-paykit passes. I ran the extracted server_lock against the real upstream paykit-server b4419772dde2. It exits 0, and its output locks paykit-lib and paykit-sdk to 0.1.1-rc8 (adbe24a). A missing revision makes it return 1.

Limitations: I could not run scripts/paykit-lock.py on that output. It needs Python 3.11+ or tomli, and package installation was blocked in the review environment. The baseline review covered that check on the same patch. No Docker build or end-to-end run of follow-app-paykit was performed.

Earlier findings reconciled at this revision: 2 verified fixed.

Reviewer model: claude-opus-5-5
Reasoning effort: high

@ovitrif

ovitrif commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

Merging: @pwltr approved e7752aa, and @piotr-iohk's QA review of the same head found no issues. No threads are open, and this repository has no CI checks.

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.

4 participants