Summary
getRepositoryRecord(...) (ComAtprotoRepoGetRecordMethod.swift) builds its request from self.pdsURL and has no per-call pdsURL parameter, so it always queries self.pdsURL regardless of which host actually holds the target record. When self.pdsURL is an AppView (e.g. https://public.api.bsky.app) rather than the repo's PDS, records the AppView does not index return RecordNotFound — this includes the session user's own records when their PDS is outside that AppView's network. #296 added a pdsURL parameter to the sibling methods describeRepository / listRecords, but getRecord was left out.
Reproduction Steps
- Configure
ATProtoKit with pdsURL = https://public.api.bsky.app (an AppView).
- Call
getRepositoryRecord(from: did, collection: "app.bsky.actor.profile", recordKey: "self") for a did the AppView does not index (e.g. an account on a non-Bluesky PDS such as eurosky.social; the session user's own DID works).
- The request goes to
self.pdsURL, which does not hold the record, and fails with RecordNotFound even though it exists at the actor's own PDS.
Expected Results
getRepositoryRecord accepts an optional pdsURL and follows the same precedence #296 introduced for describeRepository / listRecords (explicit pdsURL → DID resolution → existing host), so a record can be read from the actor's own PDS.
Actual Results
ComAtprotoRepoGetRecordMethod.swift builds the URL from self.pdsURL with no override:
guard let requestURL = URL(string: "\(self.pdsURL)/xrpc/com.atproto.repo.getRecord") else { ... }
describeRepository / listRecords got resolvePDSHost / pdsURL in #296; getRecord (same com.atproto.repo.* namespace) was not updated.
What operating systems did you experience this bug?
macOS
Operating System Version
- macOS Tahoe 26.5.2
- iOS 26.5.2
ATProtoKit Version
0.33.3
Additional Context
Suggested fix: the core change is routing the host through resolvePDSHost(for: repository) (added in #296) instead of the hard-coded self.pdsURL; the repository DID is already a parameter, so callers need no change. The pdsURL parameter itself is optional — it only mirrors describeRepository / listRecords for API consistency and lets a caller skip resolution when the host is already known. resolvePDSHost(for:) and ATBuiltInIdentityResolver already exist.
Summary
getRepositoryRecord(...)(ComAtprotoRepoGetRecordMethod.swift) builds its request fromself.pdsURLand has no per-callpdsURLparameter, so it always queriesself.pdsURLregardless of which host actually holds the target record. Whenself.pdsURLis an AppView (e.g.https://public.api.bsky.app) rather than the repo's PDS, records the AppView does not index returnRecordNotFound— this includes the session user's own records when their PDS is outside that AppView's network. #296 added apdsURLparameter to the sibling methodsdescribeRepository/listRecords, butgetRecordwas left out.Reproduction Steps
ATProtoKitwithpdsURL = https://public.api.bsky.app(an AppView).getRepositoryRecord(from: did, collection: "app.bsky.actor.profile", recordKey: "self")for adidthe AppView does not index (e.g. an account on a non-Bluesky PDS such aseurosky.social; the session user's own DID works).self.pdsURL, which does not hold the record, and fails withRecordNotFoundeven though it exists at the actor's own PDS.Expected Results
getRepositoryRecordaccepts an optionalpdsURLand follows the same precedence#296introduced fordescribeRepository/listRecords(explicitpdsURL→ DID resolution → existing host), so a record can be read from the actor's own PDS.Actual Results
ComAtprotoRepoGetRecordMethod.swiftbuilds the URL fromself.pdsURLwith no override:describeRepository/listRecordsgotresolvePDSHost/pdsURLin#296;getRecord(samecom.atproto.repo.*namespace) was not updated.What operating systems did you experience this bug?
macOS
Operating System Version
ATProtoKit Version
0.33.3
Additional Context
Suggested fix: the core change is routing the host through
resolvePDSHost(for: repository)(added in#296) instead of the hard-codedself.pdsURL; therepositoryDID is already a parameter, so callers need no change. ThepdsURLparameter itself is optional — it only mirrorsdescribeRepository/listRecordsfor API consistency and lets a caller skip resolution when the host is already known.resolvePDSHost(for:)andATBuiltInIdentityResolveralready exist.