Repository navigation
Revert "chore: remove the pubky module" - #226
Conversation
This reverts commit b085762.
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Reverts #217 and brings back the pubky module, its UniFFI exports, the pubky-app-specs dependency and the regenerated iOS bindings, so legacy pubkyauth:// approvals keep working. Reviewed aa11424, full tier (2,521 lines, dependency manifest and lock).
What I checked, and 3 candidates I ruled out
Revert fidelity: all 19 files #217 touched (b085762) match its parent byte for byte at this head (git diff b085762^ aa11424 is empty on them), and the PR touches no other file. Since #217, master changed only src/modules/blocktank/tests.rs, which this PR leaves alone, so no later work is undone.
Release surface: no tag contains b085762. src/modules/pubky, src/lib.rs, Cargo.toml and bindings/ios at this head are identical to v0.8.0-rc15, so consumers see the API rc15 already ships, as the body says.
Signer path: approve_pubky_auth (src/modules/pubky/auth.rs:122) builds pubky.signer(kp) and calls approve_auth; it uses pubky 0.6.0, which master already pins, and adds no new crate besides pubky-app-specs = "0.4" restored as it was.
Build: not run here. talos-pr-run could not read the author's permission on this repo and fails closed, so this review is static (build skipped). The author reports cargo test --lib with 42 modules::pubky tests passing, and bindings regenerated to match.
CI at review time: paykit-route, wake, native-recovery-fixture, manifests and SwiftPM passed; Android Bindgen, iOS Bindgen and usdt-tests still pending.
Ruled out
- Duplicate
fetch_public_file_if_any: it moves back frompubky_swaps/homeserver.rstopubky/profile.rs, andpubky_swaps/delegation.rsimports it from the new place; the file set is the exact pre-#217 tree, which compiled in rc15. - Lost changes on
masterafter #217: the only later commit touches blocktank tests, outside this diff. - Unreleased changelog entry: removing #217's line is correct because no release shipped it.
Merge confidence: 4/5, the bindgen jobs were still pending and the build did not run here; the code is the exact tree rc15 shipped.
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at aa11424.
No new actionable code findings.
No actionable code findings. This restores the pubky module removed in #217. Every file that commit touched is byte-identical to its parent b1aff4610a4d043d0d8b0cc698b60932345f1d5a and to v0.8.0-rc15. No tag contains the removal. The only master change since #217 is src/modules/blocktank/tests.rs, which this PR leaves alone. approve_pubky_auth signs the URL capabilities with pubky 0.6.0 PubkySigner::approve_auth and posts the encrypted auth token to the relay in the query string.
Checked only the legacy approval calls in bitkit-ios (f17214e929dce5d3cbf62434e92d7f45bc418de7) and bitkit-android (e71a3395b8af6fc56523b22a935449d42251812e). iOS rebuilds a legacy pubkyauth:// URL, validates it with parsePubkyAuthUrl, and approves non-grant Ring sign-up through approvePubkyAuth. Android approveRingAuth calls the same export. No Pubky protocol checklist was available in this environment.
Validation: I did not re-run the unit tests. The author reports cargo test --lib with modules::pubky, modules::pubky_swaps, and modules::scanner passing. CI on this commit succeeded, including iOS Bindgen and Android Bindgen. A live relay approval was not run. Open review threads: none. #205 tracks dropping this API after Ring sign-up moves to grants.
Suggested additional test cases
- iOS and Android. Open a
pubkyring://signuplink that includeshs,relay,secret, andcaps. Confirm the shown capabilities matchcaps, then approve with the wallet key. The relay accepts the signed auth token and the requesting app receives a session. Apubkyauth://secret_exportlink is rejected and does not produce a token.
Reviewer model: grok-4.7
Reasoning effort: xhigh
There was a problem hiding this comment.
Verdict: ✅ Approve
Findings:
- LOW
src/modules/pubky_swaps/delegation.rs:147— The helper move drops the two tests that cover missing-record classification and malformed addresses returningPubkySwapError::Transport. The restored tests exercise a different file reader and signature verification. Carry the two checks forward to keep coverage of the provider-read error cases.
QA for aa11424:
Approve a legacy Ring sign-up on iOS ✅ The consent sheet showed the requested read and write permissions and opened Create Profile after approval.
The legacy requester obtained a session with exactly the requested scope and revalidated it with the test homeserver.
ring-ios.2x.mp4
Approve a legacy Ring sign-up on Android ✅ The consent sheet showed the requested read and write permissions and opened Create Profile after approval.
The legacy requester obtained a session with exactly the requested scope and revalidated it with the test homeserver.
ring-android.2x.mp4
Pubky, swaps and scanner regressions ✅ The three targeted Rust suites passed.
Ran cargo +1.91.1 test --locked --lib with the Pubky, Pubky Swaps and scanner module filters. Formatting and locked Cargo metadata checks also passed.
Reject secret-export links in the authorization API ✅ Both Rust exports rejected a synthetic secret-export link before a relay request.
Exercised parse_pubky_auth_url and approve_pubky_auth with the standard secret-export format and a disposable key.
Android and iOS binding builds ✅ Both binding jobs and their consumer smoke checks passed at aa11424.
Full review of e16cfc7..aa11424 across all 19 changed files. The restored source, dependency lockfile and Apple bindings match rc15, and the later Blocktank test changes are intact. The device runs covered the legacy signer path. The restored requester, profile, and session APIs were checked in the source and targeted Rust suites. The existing provider integration test stayed ignored because it needs a live provider.
The prior QA review identified the two app entry points and the legacy signer test case.
Reviewed by gpt-6.2-sol-high
Reverts #217. Refs #205.
Signers keep approving legacy Pubky auth requests, so older apps keep working with new versions of the homeserver, Pubky Ring and Bitkit. Bitkit still approves legacy
pubkyauth://requests throughparsePubkyAuthUrlandapprovePubkyAuth, which #217 removed. This restores thepubkymodule as it was before #217, so the next release keeps the API that rc15 ships. #217 can be re-applied by reverting this once legacy approvals are dropped.Description
src/modules/pubky, its exports insrc/lib.rs, thepubky-app-specsdependency (withpubky 0.5.4back inCargo.lock), and the regeneratedbindings/ios/bitkitcore.swiftandbitkitcoreFFI.h.fetch_public_file_if_anymoves back frompubky_swaps/homeserver.rsintopubky/profile.rs.AGENTS.mdlists thepubkymodule again, and chore: remove the pubky module #217's Unreleased changelog entry is removed. No release contains chore: remove the pubky module #217, so consumers see no change from rc15.approve_pubky_auth) uses onlypubky0.6.0'sKeypair,Pubky::signerwithPubkySigner::approve_auth(signs an AuthToken and posts it to the relay; no homeserver call, no session or cookie) andDeepLinkparsing.No app change is needed: Bitkit iOS and Android keep calling the same functions they call today.
Preview
N/A, no UI changes.
QA Notes
macOS arm64, Rust 1.91.1, protobuf compiler 36.2.
cargo fmt --checkandcargo metadata --locked: passed.git diff --check: clean outsidebindings/ios. The generated bindings bring back the trailing whitespace chore: remove the pubky module #217 removed.cargo test --lib:modules::pubky42 passed;modules::pubky_swaps44 passed, 1 ignored;modules::scanner79 passed.uniffi-bindgen generate --language swift: the generatedbitkitcore.swift,bitkitcoreFFI.handmodule.modulemapmatch the committed files.Not covered here: the full
./build_ios.shand Android builds (CI covers the bindings), and a live approval against a relay.🤖 Generated with Claude Code