Skip to content

Publish the atproto signing key in resolveMiniDoc's document - #21

Merged
germ-mark merged 4 commits into
mainfrom
mark/ger-2268-resolver-authority-carry-signing_key-into-verificationmethod
Aug 19, 2026
Merged

Publish the atproto signing key in resolveMiniDoc's document#21
germ-mark merged 4 commits into
mainfrom
mark/ger-2268-resolver-authority-carry-signing_key-into-verificationmethod

Conversation

@germ-mark

@germ-mark germ-mark commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Slingshot returns signing_key on the wire but resolveMiniDoc's
Atproto.DIDDocument adapter discarded it, shipping verificationMethod: [].
So a repo proof checked against a Slingshot-resolved document failed for want
of a key — nondeterministically, since germ-atproto-resolver's
optimizedResolve races this resolver against plc.directory and either can
win.

The published method is spelled the way plc.directory spells it — fully-
qualified did:...#atproto id, Multikey, self-controlled — verified against
a live document, not the ticket's suggested bare #atproto fragment. Both
forms satisfy RepoSigningKey's matcher, but a consumer holding the result
shouldn't be able to tell which resolver produced it; MiniDocDocumentTests
pins the fully-qualified shape directly, not just what the matcher happens to
accept.

MiniDocDocumentTests takes a test-only dependency on AtprotoTypesVerify to
prove the published key actually round-trips through the downstream verifier's
matcher (fragment, controller, multibase), not just that the field is
populated — a shape-only assertion would pass even if any of the three were
subtly wrong. Confirmed by reverting the fix locally: the test fails with
exactly .noAtprotoSigningKey. The added dependency pulls in nothing new
(swift package show-dependencies is unchanged) — AtprotoTypesVerify's
secp256k1 port does ship in that product and this test target now links it,
but it's pure Swift; the only extra dependency it could have pulled in
(swift-secp256k1, a differential-testing oracle) is confined to AtprotoTypes'
own test target and isn't linked here.

Draft: gated on AtprotoTypes germ-network/AtprotoTypes#60. The floor is
already bumped to 0.5.1 (the release that will make VerificationMethod.init
public) but that version doesn't exist yet, so Package.resolved is
deliberately left untouched at its current pin and CI will fail to resolve
dependencies until #60 merges and releases. Once it does: confirm the real
tag, swift package update AtprotoTypes, commit the resulting
Package.resolved, mark ready for review. To reproduce the new tests locally
before then, override with a local path: swift package edit AtprotoTypes --path <checkout of #60>.

Part of GER-2268.

🤖 Generated with Claude Code

Slingshot returns signing_key on the wire but the adapter discarded it,
shipping verificationMethod: [] — so a repo proof checked against a
Slingshot-resolved document failed for want of a key, nondeterministically,
since optimizedResolve races this resolver against plc.directory and
either can win. Spelled the way plc.directory spells it: fully-qualified
did:...#atproto id, Multikey, self-controlled.

Requires AtprotoTypes 0.5.1, where VerificationMethod's initializer
became public (germ-network/AtprotoTypes#60). CI on this PR won't go
green until that releases and Package.resolved is updated to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8d53136

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@germ-network/microcosm Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

germ-mark and others added 2 commits August 19, 2026 00:44
RepoSigningKey accepts a bare "#atproto" fragment and doesn't care about
the type string, so the fragment/controller/multibase test alone let both
regress silently: a bare fragment or a wrong verificationMethod type
passed every existing check while breaking the parity with plc.directory
this adapter exists to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
VerificationMethod.init is public as of this release. AtprotoClient moves
along transitively (0.5.7 -> 0.5.10, its own floor's normal drift).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@germ-mark
germ-mark marked this pull request as ready for review August 19, 2026 17:52
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@germ-mark
germ-mark merged commit b2677d1 into main Aug 19, 2026
9 checks passed
@germ-mark
germ-mark deleted the mark/ger-2268-resolver-authority-carry-signing_key-into-verificationmethod branch August 19, 2026 18:06
@github-actions github-actions Bot mentioned this pull request Aug 19, 2026
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.

1 participant