Claude: changes for issue #98 #103
No reviewers
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET!103
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-98"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #98.
Multikey, not the legacy verification-method types #98🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
✅ Verdict: approve — no blocking issues found.
Correct, well-scoped fix. The core insight — Multikey's
publicKeyMultibaseis already multicodec-tagged compressed key bytes while the legacyEcdsaSecp256k1/r1VerificationKey2019forms are a bare uncompressed point — is handled cleanly by putting the conversion in one place (VerificationMethod.ToDidKey()) and havingDidDocument.GetSigningKey/GetVerificationKey,SpaceAuthority.GetSigningKey, andFirehoseVerifierall go through it instead of three near-duplicate hand-rolled lookups.Verified the crypto details:
CompressPublicKeysets the SEC1 prefix from the parity of the last byte of Y (big-endian, so that's the LSB) — standard convention, matches whatAtProtoKey.ToMultikey()already does elsewhere in the file.FormatDidKeycomposesCompressPublicKey+ the existing internalToMultikey(bytes, curve)the same wayAtProtoKey.ToDidKey()does, so there's no drift between the two call paths. Point-on-curve validation is correctly deferred to decompression (FromDidKey/VerifySignature), which is fine since that's where it's cryptographically meaningful — compressing an off-curve point just produces a value that later fails to decompress/verify rather than silently succeeding.SpaceNetworkFixture.ResolveSigningKeyAsyncnow delegates straight toSpaceSyncer.ResolveSigningKeyAsync(DidResolver), which is a good simplification — the tests now exercise the actual production code path (SpaceAuthority.GetSigningKey→DidDocument.GetVerificationKey→VerificationMethod.ToDidKey) instead of a parallel hand-written implementation that could drift from it.Test coverage is solid: both curves, both Y parities (looped until both are observed), a real sign/verify round trip on the recovered key (not just string equality against a re-derived value), unknown-type and missing-key-material null cases, malformed-material exception cases, and the SpaceAuthority space-key-preferred-over-account-key fallback. Docs (
did-resolution.md,testing-spaces.md) and CHANGELOG were updated consistently with the code change, filed correctly under Fixed since nothing here is a breaking signature change.⏱ 1m 0s · 7 turns · tokens: 34.6k in / 5.0k out (+384.1k cache-read)
📜 Full session transcript
@claude-bot Please fix the merge conflict
🤖 On it — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
Merged
mainintoclaude/issue-98and pushed — the PR is conflict-free now.The conflict was in
CHANGELOG.mdonly:mainpicked up the Issue #99 bullet at the top of### Fixed(via #100) while this branch added the Issue #98 bullet in the same spot. Both entries are real and both belong, so I kept both, ordered #99 then #98 to match the file's descending-issue-number convention. No text was dropped from either side.Nothing else conflicted textually, but
main's #99 change also touchesSpaceSyncer.cs— the same file this branch modifies — so I checked the auto-merge rather than trusting it:SpaceSyncer.ResolveSigningKeyAsync(DidResolver)(this branch's addition, which routes throughSpaceAuthority.GetSigningKey→DidDocument.GetVerificationKey→VerificationMethod.ToDidKey) is intact alongside #99's newSpaceSyncOutcome.NoRepopath.SpaceNetworkFixture.ResolveSigningKeyAsyncstill delegates to the production resolver, andSpaceRepoSyncTestspicked up #99's renamedSyncRepoAsync_ForAnAccountThatHasWrittenNothing_ReportsNoRepoon top of it cleanly — the two changes are orthogonal.Verified:
dotnet buildsucceeds with 0 warnings / 0 errors (including the integration-test project, which is where the fixture change lives), anddotnet test tests/ATProtoNet.Tests/passes — 1552 passed, 0 failed, 5 skipped (the usual Aspire-manifest gates).git merge-treeagainstorigin/mainnow reports no conflicts.Pushed as merge commit
949a48fonclaude/issue-98. No new branch, no new PR.⏱ 1m 39s · 14 turns · tokens: 36.4k in / 3.2k out (+574.8k cache-read)
📜 Full session transcript
🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
✅ Verdict: approve — no blocking issues found.
No new commits since my last pass — the diff is identical to what I already reviewed and approved. Reconfirming: the fix correctly centralizes did:key extraction (
VerificationMethod.ToDidKey(),DidDocument.GetSigningKey()/GetVerificationKey(),AtProtoCrypto.FormatDidKey()/CompressPublicKey()) soMultikeyand the legacyEcdsaSecp256k1/r1VerificationKey2019forms both resolve correctly, removes the three near-duplicate hand-rolled lookups (SpaceAuthority.FindMultikey,FirehoseVerifier.GetSigningKey, the test fixture's private resolver), and is well covered by tests (both curves, both Y parities, real sign/verify round trips, null and malformed-input cases). Docs and CHANGELOG are updated consistently. Good to merge.⏱ 0m 16s · 3 turns · tokens: 30.0k in / 1.0k out (+132.1k cache-read)
📜 Full session transcript