Repository navigation
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.
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