Skip to content

fix(sdk): require at least one FQN in ForAttributeValues#3355

Merged
marythought merged 1 commit intomainfrom
fix/resource-require-min-fqn
Apr 22, 2026
Merged

fix(sdk): require at least one FQN in ForAttributeValues#3355
marythought merged 1 commit intomainfrom
fix/resource-require-min-fqn

Conversation

@marythought
Copy link
Copy Markdown
Contributor

@marythought marythought commented Apr 21, 2026

Summary

Test plan

  • TestForAttributeValues_ZeroArgs_Panics verifies the panic
  • All existing tests pass (15/15)
  • golangci-lint clean
  • CI checks pass

🤖 Generated with Claude Code

Add a panic guard for zero-argument calls to ForAttributeValues,
aligning with the Java SDK's IllegalArgumentException and the
proto's 1-20 FQN constraint. Callers passing zero FQNs now get
a clear error instead of a silently invalid Resource.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Mary Dickson <mary.dickson@virtru.com>
@marythought marythought requested review from a team as code owners April 21, 2026 17:22
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Warning

Rate limit exceeded

@marythought has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 7 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 58 minutes and 7 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a628c4cb-2374-4f23-80d3-c82f964f6f00

📥 Commits

Reviewing files that changed from the base of the PR and between 4a786ca and ad4fdfe.

📒 Files selected for processing (3)
  • protocol/go/authorization/v2/resource.gen.go
  • protocol/go/internal/authorization/v2/resource.go
  • protocol/go/internal/authorization/v2/resource_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/resource-require-min-fqn

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

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

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 200.454933ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 97.911297ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 402.784843ms
Throughput 248.27 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.626423573s
Average Latency 423.938738ms
Throughput 117.30 requests/second

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

  • examples
  • otdfctl
  • sdk
  • service
  • lib/fixtures
  • tests-bdd

See the workflow run for details.

@marythought marythought added this pull request to the merge queue Apr 22, 2026
Merged via the queue into main with commit 2529e11 Apr 22, 2026
43 checks passed
@marythought marythought deleted the fix/resource-require-min-fqn branch April 22, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants