Skip to content

feat(docs): document SDK.IsHealthy and link unresolved type references#311

Merged
marythought merged 4 commits intomainfrom
feat/health-check-docs
Apr 30, 2026
Merged

feat(docs): document SDK.IsHealthy and link unresolved type references#311
marythought merged 4 commits intomainfrom
feat/health-check-docs

Conversation

@marythought
Copy link
Copy Markdown
Contributor

@marythought marythought commented Apr 29, 2026

Summary

Two related changes in one PR:

1. Document SDK.IsHealthy(ctx) reachability probe

Adds a Health checks section to docs/sdks/platform-client.mdx covering the new SDK.IsHealthy(ctx) (bool, error) method shipped in opentdf/platform sdk v0.18.0 (opentdf/platform#3412).

The section documents:

  • The (bool, error) contract and when to reach for it (readiness probes, smoke tests, startup gating)
  • SERVING / NOT_SERVING / UNKNOWN return semantics
  • IPC mode (ErrHealthCheckUnsupported) and transport failure (ErrPlatformUnreachable) sentinels
  • Context propagation and OTEL tracing behavior

Go-only — IsHealthy is a server-side readiness concern and is not planned for the web SDK.

2. Link unresolved type references in SDK reference tables

Several PascalCase type cells in SDK reference tables were rendering as plain text instead of links to their definitions, forcing readers to scroll or grep to learn the type's shape.

authorization.mdx

  • Link Action cells to /sdks/policy#action
  • Add ### GetDecisionMultiResourceRequest heading so its parameter cell resolves to a real anchor

tdf.mdx

  • Add RequiredObligations to the Type Reference and link the TriggeredObligations cell
  • Promote Manifest sub-tables (EncryptionInformation, KeyAccess, Payload) to H4 subheadings; disambiguate Payload with {#manifest-payload} since the TDF Reader method already owns #payload
  • Fully link the Assertion fields table (AssertionType, Scope, AppliesToState, Statement, Binding) and add a Binding type-ref entry
  • Link AssertionKey in AssertionVerificationKeys.DefaultKey

policy.mdx

  • Link SubjectSet in UpdateSubjectConditionSet parameters
  • Link SubjectProperty in MatchSubjectMappings parameters

Test plan

  • npm run build passes — no new broken anchors introduced
  • vale docs/sdks/platform-client.mdx clean
  • Surge preview renders the new section and link targets correctly
  • Verify the SdkVersion badge shows 0.18.0 for Go

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Improved cross-references and internal links across authorization, policy, and TDF docs for clearer navigation.
    • Added a platform health-checks section with usage examples, return-value guidance, and behavior notes for different modes.
    • Introduced new subsections (ActionsList, Binding, RequiredObligations) and linked type references to clarify fields and access patterns across SDKs.

@marythought marythought requested review from a team as code owners April 29, 2026 20:02
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e99d3d6-ad5b-4974-9b66-314a8fcb7e81

📥 Commits

Reviewing files that changed from the base of the PR and between 2593c95 and 20a7446.

📒 Files selected for processing (4)
  • docs/sdks/authorization.mdx
  • docs/sdks/platform-client.mdx
  • docs/sdks/policy.mdx
  • docs/sdks/tdf.mdx

📝 Walkthrough

Walkthrough

Documentation-only updates across four SDK docs: authorization, platform-client, policy, and TDF. Changes add internal cross-references, new subsections (ActionsList, GetDecisionMultiResourceRequest, Binding, RequiredObligations), and a Platform IsHealthy health-check section. No code or public API changes.

Changes

Cohort / File(s) Summary
Authorization SDK Documentation
docs/sdks/authorization.mdx
Converted action parameter/type cells into links to /sdks/policy#action; corrected GetDecision obligations link to /sdks/obligations; added linked GetDecisionMultiResourceRequest subsection and made GetDecisionBulk reference it; introduced ActionsList wrapper subsection and language-specific access notes.
Platform Client Documentation
docs/sdks/platform-client.mdx
Added IsHealthy(ctx) health-check section with Go SDK badge (v0.18.0/opentdf), usage example, return-value matrix, and behavior notes for IPC, transport/context errors (wrapping sdk.ErrPlatformUnreachable), not-serving states, and OTEL tracing via WithExtraClientOptions.
Policy SDK Documentation
docs/sdks/policy.mdx
Updated parameter table annotations to render subjectSets and subjectProperties as links to #subjectset and #subjectproperty anchors.
TDF/Manifest Documentation
docs/sdks/tdf.mdx
Converted manifest/assertion field mentions into internal anchors; added Binding and RequiredObligations subsections; linked TriggeredObligations to RequiredObligations and AssertionVerificationKeys.DefaultKey to AssertionKey.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • jp-ayyappan
  • elizabethhealy

Poem

🐰
I hopped through docs with gentle paws,
Linking actions, bindings, and clause,
New sections stitched with tidy art,
Health checks checked — the docs take heart,
A rabbit's cheer for clearer parts.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the two main changes: documenting SDK.IsHealthy and linking unresolved type references across multiple SDK documentation files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/health-check-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces documentation for the IsHealthy health check method in the Go SDK, including a code example and a return values table. The review feedback highlights the need for more accurate error messaging in the example and consistent formatting for status values and error types in the documentation.

Comment thread docs/sdks/platform-client.mdx
Comment thread docs/sdks/platform-client.mdx
@github-actions
Copy link
Copy Markdown
Contributor

📄 Preview deployed to https://opentdf-docs-pr-311.surge.sh

@marythought marythought changed the title feat(docs): document SDK.IsHealthy reachability probe feat(docs): document SDK.IsHealthy and link unresolved type references Apr 29, 2026
@marythought marythought enabled auto-merge (squash) April 30, 2026 15:07
Copy link
Copy Markdown
Contributor

@jp-ayyappan jp-ayyappan left a comment

Choose a reason for hiding this comment

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

lgtm

marythought and others added 4 commits April 30, 2026 08:27
Add a Health checks section to platform-client.mdx covering the new
IsHealthy(ctx) method shipped in opentdf/platform sdk v0.18.0
(opentdf/platform#3412). Documents the (bool, error) contract,
SERVING/NOT_SERVING/UNKNOWN behavior, and the IPC mode and transport
error sentinels.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Several PascalCase type cells in SDK reference tables were rendering as
plain text instead of links to their definitions, forcing readers to
scroll or grep to learn the type's shape.

authorization.mdx:
- Link Action cells to /sdks/policy#action
- Add GetDecisionMultiResourceRequest heading inline so its parameter cell
  resolves to a real anchor

tdf.mdx:
- Add RequiredObligations entry to the Type Reference and link the
  TriggeredObligations cell
- Promote Manifest sub-tables (EncryptionInformation, KeyAccess, Payload)
  to H4 subheadings so they have anchors; disambiguate Payload with
  {#manifest-payload} since the TDF Reader method already owns #payload
- Fully link the Assertion fields table (AssertionType, Scope,
  AppliesToState, Statement, Binding) and add a Binding type-ref entry
- Link AssertionKey in AssertionVerificationKeys.DefaultKey

policy.mdx:
- Link SubjectSet in UpdateSubjectConditionSet parameters
- Link SubjectProperty in MatchSubjectMappings parameters

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
authorization.mdx:
- Link map<string, ActionsList> in EntityEntitlements.actionsPerAttributeValueFqn
  and add a new Type Reference entry explaining the protobuf wrapper
  (ActionsList exists because protobuf maps cannot have repeated value
  types directly). The new section documents the actions field and how
  Go/Java/JS surface the wrapper.
- Update obligations link in the GetDecision Returns description to
  point at /sdks/obligations (the SDK obligations page) instead of
  /components/policy/obligations. The SDK page is the right target for
  readers learning how to handle obligations from SDK code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Address Gemini Code Assist review feedback: the previous example logged
"platform unreachable" for any non-nil err, which misrepresents the IPC
mode case. Update the comment to enumerate the three error sources
(ErrHealthCheckUnsupported, wrapped ErrPlatformUnreachable on transport
failure, wrapped ErrPlatformUnreachable on ctx cancellation) and switch
the log line to a generic "health check failed" message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@marythought marythought force-pushed the feat/health-check-docs branch from 70742fe to 20a7446 Compare April 30, 2026 15:27
@marythought marythought merged commit 0d82f34 into main Apr 30, 2026
1 check passed
@marythought marythought deleted the feat/health-check-docs branch April 30, 2026 15:27
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