Skip to content

docs: fix gRPC signatures, DID parse, and TrustStore examples#58

Merged
beonde merged 2 commits intomainfrom
fix/docs-p0-grpc-examples
May 2, 2026
Merged

docs: fix gRPC signatures, DID parse, and TrustStore examples#58
beonde merged 2 commits intomainfrom
fix/docs-p0-grpc-examples

Conversation

@beonde
Copy link
Copy Markdown
Member

@beonde beonde commented May 2, 2026

Summary

Fixes incorrect gRPC method signatures and misleading code examples in the SDK documentation.

Issues Fixed

  • P0-3 (Critical): gRPC method signatures in docs don't match implementation
  • P2-8 (Medium): DID parse example shows non-existent document_url key; TrustStore add_key() documented as working but raises NotImplementedError

Changes

gRPC Signatures (commit 1)

  • verify() → returns (valid, key_id, error) not (valid, error)
  • verify_attached() → returns (valid, payload, key_id, error) not (valid, payload, error)
  • request_badge() → returns (success, result_dict, error) not (badge_token, error)
  • Keeper events are dicts with keys type/token, not objects

DID & TrustStore (commit 2)

  • parse() returns dict without document_url — split into separate document_url() call
  • path field is a list, not a joined string
  • Marked add_key() as NotImplementedError; show working is_trusted() instead

beonde added 2 commits May 2, 2026 11:07
- request_badge returns (success, result_dict, error), not (token, error)
- badge keeper events are dicts with 'type'/'token' keys, not objects
- verify() takes (payload, signature), returns (valid, key_id, error)
- verify_attached() takes (jws) only, returns (valid, payload, key_id, error)

Fixes: DOCS_REMEDIATION_PLAN P0-5
- DID parse returns dict without 'document_url'; that's a separate
  client.did.document_url() call. Split example accordingly.
- TrustStore add_key() raises NotImplementedError. Updated docs to
  show available is_trusted() method and mark add_key as unimplemented.
- Fixed path output from string to list (actual return type).

Fixes: DOCS_REMEDIATION_PLAN P2-8
Copilot AI review requested due to automatic review settings May 2, 2026 17:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

✅ Documentation validation passed!

Unified docs will be deployed from capiscio-docs repo.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

✅ All checks passed! Ready for review.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates SDK documentation examples to match the actual gRPC client method signatures and return shapes, reducing copy/paste breakage for users of CapiscioRPCClient.

Changes:

  • Corrected BadgeService.request_badge() example to use (success, result_dict, error) and read result["token"] / result["expires_at"].
  • Updated DID parsing docs to reflect parse() returning path as a list and to use a separate document_url() call.
  • Updated TrustStore docs to note add_key() is unimplemented and to show is_trusted() usage; fixed SimpleGuardService.verify() / verify_attached() return signatures.

Comment thread README.md
Comment on lines 455 to 459
@@ -456,8 +459,8 @@ with CapiscioRPCClient() as client:
ttl_seconds=300,
@beonde beonde merged commit 0fea5e5 into main May 2, 2026
14 checks passed
@beonde beonde deleted the fix/docs-p0-grpc-examples branch May 2, 2026 17:06
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.

2 participants