Repository navigation
chore: remove the pubky module - #217
Conversation
Co-authored-by: Talos <324815472+talosmachina@users.noreply.github.com>
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Removes the pubky module and its UniFFI exports, drops pubky-app-specs (and the pubky 0.5.4 it pulled in), and moves fetch_public_file_if_any into pubky_swaps/homeserver.rs. Reviewed b9e5008, full tier, static.
What I checked, and 4 candidates I ruled out
Read in full: pubky_swaps/homeserver.rs, pubky_swaps/delegation.rs (the resolve call site), master's pubky/profile.rs, pubky/resolve.rs and pubky/errors.rs for the moved behaviour.
Build: skipped. build skipped: could not check @pwltr's permission on synonymdev/bitkit-core (gh: Resource not accessible by personal access token (HTTP 403)); the check fails closed.
CI at this head: iOS Bindgen, SwiftPM manifest, manifests, paykit-route, wake and usdt jobs green; Android Bindgen still pending.
Ruled out
- Error mapping drift in the moved helper: master produced
PubkyError::FetchFailed/ResolutionFailed, whichdelegation::resolvethen wrapped withPubkySwapError::transport(e)throughDisplay, so the details readFetch failed: …/Resolution failed: …. The new helper builds the same strings directly, andis_not_foundis byte-identical, so a 404 still meansNone. - Separate client: the new
OnceCell<Pubky>used to be shared with the removed exports.pubky_swapsis now its only reader, so one client per process is still the result. - Leftover callers:
git grepat the head for every removed function and type finds nothing outside the changelog. The remainingPubkyAuthhits areScanner::PubkyAuth, which is kept on purpose.wakeuses onlypubky::Keypair/PublicKeyfrom the keptpubky 0.6.0. - Swift bindings: with
--diff-algorithm=histogram,bitkitcore.swiftis 849 deletions and no additions. The 19 added lines in the default diff arePubkySwapErrorrealigned, and it is present on both sides.
Merge confidence: 4/5. Android Bindgen is still pending, and no CI job runs modules::pubky_swaps, so the moved helper's tests were run only by the author.
pwltr
left a comment
There was a problem hiding this comment.
Reviewed b9e5008.
Static review found no consequential correctness defect introduced by this change. The documented API removal is consistent across Rust and the checked-in iOS bindings, and the retained Pubky Swaps reader preserves its existing behavior.
Review details
General review
Model: GPT-6.1 Sol
Reasoning effort: high
There was a problem hiding this comment.
Verdict: ✅ Approve
Full review: diff, all 19 PR-owned changed files.
Findings: None.
QA for b9e5008:
Retained Pubky Swaps and homeserver tests ✅ The targeted Rust suite passed, including delegation verification and both homeserver reader tests.
Ran cargo +1.91.1 test --locked --lib modules::pubky_swaps. The pre-existing live-provider integration test remains ignored; no live homeserver delegation fetch was exercised.
Check: formatting and locked dependency graph ✅ Formatting, locked Cargo metadata and patch whitespace checks passed.
Checked with cargo +1.91.1 fmt --check, cargo +1.91.1 metadata --locked --format-version 1 --no-deps and git diff --check on the PR-owned diff.
Check: generated mobile interfaces ✅ The intentional API removals match across Rust and the iOS interfaces; both platform binding jobs passed at this head.
Reports relied on:
- Android Bindgen, including native libraries, the release AAR and Kotlin smoke-fixture compilation.
- iOS Bindgen, including framework generation, committed-interface freshness and the Swift smoke test.
No device run: no device journey is specified, and the retained reader behavior is unchanged. Export removal and dependency pruning were checked through source inspection, the Rust run and binding CI. Neither app was rebuilt with this SDK; Ring sign-up and live-provider behavior were not driven. The unrelated full Blocktank and USDT suites and clippy were not rerun.
Both apps still need their separate legacy Ring sign-up removal before adopting a release containing this API break:
- bitkit-android#1917 chore: drop legacy Pubky Ring sign-up path.
- bitkit-ios#1332 chore: drop legacy Pubky Ring sign-up path.
Reviewed by gpt-6.1-sol-high
…ubky-auth # Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Verdict: ✅ Approve
Delta review: diff. The master merge leaves the previously reviewed Pubky removal unchanged; its changelog resolution preserves both entries.
Findings: None. The previous full review has no open findings.
QA for f835098:
Retained Pubky Swaps and homeserver tests ✅ Passing evidence carried from b9e5008; the tested code and dependencies are unchanged.
The previous run passed cargo +1.91.1 test --locked --lib modules::pubky_swaps, including delegation verification and both homeserver reader tests. This merge changes neither those tests nor their retained implementation, callers or dependency manifests. The ignored live-provider test remains untested.
Check: merged library and dependency graph ✅ The native library compile check, formatting, locked metadata and delta whitespace checks passed.
Ran cargo +1.91.1 check --locked --offline --lib, cargo +1.91.1 fmt --check, cargo +1.91.1 metadata --locked --offline --format-version 1 --no-deps and git diff --check at f835098. This checks compilation; it does not exercise the inherited scanner behavior.
Check: generated mobile interfaces ✅ Current-head iOS binding CI passed; unchanged Android interface evidence is carried from b9e5008.
The inherited scanner implementation changes no exported type or UniFFI signature:
Reports relied on:
- iOS Bindgen at f835098, including framework generation, interface freshness and the Swift smoke test, passed.
- Android Bindgen at b9e5008, including native libraries, release AAR and Kotlin smoke-fixture compilation. Its exported surface and generation inputs are unchanged.
The Android Bindgen job at f835098 is still running; this review does not claim it passed.
No device run: this library removal specifies no device journey, and the delta changes no PR-owned runtime behavior. Live homeserver/provider fetches, consumer Ring sign-up and app adoption were not exercised. Full Blocktank and USDT suites and clippy were not rerun locally; inherited scanner behavior and recovery fixtures were not driven locally.
The separate consumer migrations remain open and are still needed before adopting a release containing this API break:
- bitkit-android#1917 chore: drop legacy Pubky Ring sign-up path.
- bitkit-ios#1332 chore: drop legacy Pubky Ring sign-up path.
Reviewed by gpt-6.1-sol-high
Closes #205
Removes bitkit-core's
pubkymodule. Pubky auth goes through Paykit grant links, and the next major Pubky SDK drops the legacy cookie auth this module wraps. Builds on #206 by @talosmachina, which removed the exports neither Bitkit app calls.Description
resolvePubkyUrl,fetchPubkyFile,fetchPubkyFileString,startPubkyAuth,cancelPubkyAuth,completePubkyAuth,fetchPubkyProfile,fetchPubkyContacts,derivePubkySecretKey,pubkyPublicKeyFromSecret,pubkySignUp,pubkySignIn,pubkySessionPut,pubkySessionDelete,pubkySessionList,pubkyPutWithSecretKeyand thePubkyProfile/PubkyProfileLinkrecords. It also drops thepubky-app-specsdependency;Cargo.lockloses it and thepubky 0.5.4it pulled in.parsePubkyAuthUrl,approvePubkyAuth,PubkyAuthDetails,PubkyAuthKindandPubkyError(PubkyExceptionon Android). The legacypubkyauth:///?relay&secret&capspath in Pubky Ring sign-up was their last caller. Both apps drop it in separate changes and authorize through Paykitsignup_grant/signin_grantlinks instead.fetch_public_file_if_any, which reads a provider's published Paykit authorization and signing-key records, moves intopubky_swaps/homeserver.rswith its ownpubky::Pubkyclient. A 404 or "not found" still returnsNone, and other errors still surface asPubkySwapError::Transportwith the sameFetch failed: …/Resolution failed: …details.pubky 0.6.0stays, becausepubky_swapsandwakeuse its keys and client.Scanner::PubkyAuthstill classifiespubkyauth:strings.bindings/ios/bitkitcore.swiftandbitkitcoreFFI.h; the diff only removes code.module.modulemapandPackage.swiftare unchanged.AGENTS.mdno longer lists thepubkymodule, and the changelog has an Unreleased entry.Breaking for binding consumers: every removed function and type is gone from the Swift, Kotlin and Python bindings. Bitkit iOS and Android need their legacy Ring sign-up change before adopting a release with this PR.
Preview
N/A, no UI changes.
QA Notes
macOS arm64, Rust 1.91.1 (the crate's
rust-version), protobuf compiler 36.2.cargo fmt --check,cargo metadata --lockedandgit diff --check: passed.cargo test --lib modules::pubky_swaps: 46 passed, 1 ignored. This includes the delegation tests that read records through the moved helper and two new homeserver tests (not-found classification, and a malformed address returningTransport).cargo test --all-targets --no-fail-fast: 702 passed, 71 failed, 31 ignored. Master at8f01555gives 745 passed, 68 failed, 31 ignored on the same machine, and every one of master's failures also fails here:usdttests fail on this machine on both.usdtbackup failures pass when the backup tests run alone, three times in a row on this branch and on master.cargo clippy -- -D warnings: the same errors as master, minus the two unused imports in the removed pubky code.uniffi-bindgen generate --language swift: the regenerated interface files match the committed ones.git grepfor the removed names finds only the changelog entry and the moved helper inpubky_swaps.Not covered here: delegation fetches against a live homeserver, the full
./build_ios.shframework and Android builds (CI's ios-bindgen check covers the Swift files), and the apps' Ring sign-up flow on a rebuilt SDK.🤖 Generated with Claude Code