Skip to content

chore: fix typos in code comments#3717

Open
jp-ayyappan wants to merge 1 commit into
mainfrom
chore/code-typo-polish
Open

chore: fix typos in code comments#3717
jp-ayyappan wants to merge 1 commit into
mainfrom
chore/code-typo-polish

Conversation

@jp-ayyappan

@jp-ayyappan jp-ayyappan commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix spelling and minor grammar issues in Go comments, test labels, and user-facing strings
  • Keep code-adjacent plaintext fixes together with the Go cleanup
  • Regenerate proto outputs after updating the policy proto comment

Testing

  • make proto-generate
  • git diff --check origin/main...HEAD
  • uvx codespell --skip='docs/openapi/,docs/grpc/,protocol/go/**' --ignore-words-list='doesnot,allk'
  • cd sdk && go test -run TestREADMECodeBlocks
  • go test ./sdk ./examples/cmd ./otdfctl/pkg/handlers ./service/authorization ./service/entityresolution/keycloak ./service/entityresolution/keycloak/v2 ./service/internal/access ./service/logger ./service/pkg/db ./service/policy/resourcemapping ./service/policy/namespaces ./service/policy/db

Summary by CodeRabbit

  • Documentation
    • Corrected multiple spelling and grammar issues across API docs, OpenAPI specs, comments, and examples for clearer wording.
  • Bug Fixes
    • Improved several user-facing error and log messages for readability and consistency.
    • Fixed a handler parameter name typo to match the expected identifier naming.
  • Tests
    • Cleaned up test comments and descriptions without changing test behavior or coverage.

Signed-off-by: jp-ayyappan <jp@as2max.com>
@jp-ayyappan jp-ayyappan requested review from a team as code owners July 2, 2026 16:48
@github-actions github-actions Bot added comp:db DB component comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) comp:sdk A software development kit, including library, for client applications and inter-service communicati comp:authorization docs Documentation comp:examples comp:lib:fixtures labels Jul 2, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a comprehensive cleanup of codebase documentation, comments, and minor formatting issues. The changes primarily involve fixing typos in Go comments, test descriptions, and user-facing strings, alongside minor refactoring of multi-line logging statements for better consistency. These updates ensure the codebase remains clean and maintainable without altering existing logic or functionality.

Highlights

  • Code Documentation Cleanup: Corrected numerous spelling and grammar errors across Go source files, documentation, and test labels to improve readability and professionalism.
  • Code Formatting: Standardized multi-line logging calls and function arguments to improve code consistency and maintainability.
  • Proto Regeneration: Regenerated protocol buffer outputs following updates to documentation comments in the policy definitions.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: docs/openapi/**/* (13)
    • docs/openapi/authorization/authorization.openapi.yaml
    • docs/openapi/authorization/v2/authorization.openapi.yaml
    • docs/openapi/policy/actions/actions.openapi.yaml
    • docs/openapi/policy/attributes/attributes.openapi.yaml
    • docs/openapi/policy/dynamicvaluemapping/dynamic_value_mapping.openapi.yaml
    • docs/openapi/policy/kasregistry/key_access_server_registry.openapi.yaml
    • docs/openapi/policy/namespaces/namespaces.openapi.yaml
    • docs/openapi/policy/objects.openapi.yaml
    • docs/openapi/policy/obligations/obligations.openapi.yaml
    • docs/openapi/policy/registeredresources/registered_resources.openapi.yaml
    • docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml
    • docs/openapi/policy/subjectmapping/subject_mapping.openapi.yaml
    • docs/openapi/policy/unsafe/unsafe.openapi.yaml
  • Ignored by pattern: protocol/**/* (1)
    • protocol/go/policy/objects.pb.go
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


A typo hides within the code, A subtle bug along the road. With careful eyes we seek the flaw, To keep the logic free of straw, And lighten up the heavy load.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions Bot added the size/m label Jul 2, 2026

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

Copy link
Copy Markdown
Contributor

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 primarily addresses numerous typos in comments, documentation, and error messages across the codebase, alongside reformatting various log statements and function calls to improve readability. The feedback identifies a missed typo ('requjirement') in a reformatted error log within lib/fixtures/keycloak.go that should be corrected to 'requirement'.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread lib/fixtures/keycloak.go
if err := client.UpdateAuthenticationExecution(ctx, token.AccessToken, connectParams.Realm, topLevelFlowName, *execution); err != nil {
slog.Error("error updating x509 auth flow requjirement",
slog.Error(
"error updating x509 auth flow requjirement",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The typo requjirement was missed during reformatting. It should be corrected to requirement.

Suggested change
"error updating x509 auth flow requjirement",
"error updating x509 auth flow requirement",

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/code-typo-polish

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.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d1b3c4ce-40e8-49df-9692-7c8a9114a25a

📥 Commits

Reviewing files that changed from the base of the PR and between 4277e96 and f6a87b5.

⛔ Files ignored due to path filters (1)
  • protocol/go/policy/objects.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (40)
  • Dockerfile
  • docs/grpc/index.html
  • docs/openapi/authorization/authorization.openapi.yaml
  • docs/openapi/authorization/v2/authorization.openapi.yaml
  • docs/openapi/policy/actions/actions.openapi.yaml
  • docs/openapi/policy/attributes/attributes.openapi.yaml
  • docs/openapi/policy/dynamicvaluemapping/dynamic_value_mapping.openapi.yaml
  • docs/openapi/policy/kasregistry/key_access_server_registry.openapi.yaml
  • docs/openapi/policy/namespaces/namespaces.openapi.yaml
  • docs/openapi/policy/objects.openapi.yaml
  • docs/openapi/policy/obligations/obligations.openapi.yaml
  • docs/openapi/policy/registeredresources/registered_resources.openapi.yaml
  • docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml
  • docs/openapi/policy/subjectmapping/subject_mapping.openapi.yaml
  • docs/openapi/policy/unsafe/unsafe.openapi.yaml
  • examples/cmd/attributes.go
  • lib/fixtures/keycloak.go
  • otdfctl/e2e/registered-resources.bats
  • otdfctl/pkg/handlers/kas-registry.go
  • sdk/granter.go
  • sdk/granter_test.go
  • sdk/options.go
  • sdk/resource_locator.go
  • sdk/tdf.go
  • sdk/tdf_config.go
  • service/authorization/authorization.go
  • service/authorization/authorization_test.go
  • service/authorization/authorization_test_structures.go
  • service/entityresolution/keycloak/entity_resolution.go
  • service/entityresolution/keycloak/v2/entity_resolution.go
  • service/integration/attribute_values_test.go
  • service/integration/kas_registry_key_test.go
  • service/internal/access/pdp.go
  • service/logger/logger.go
  • service/pkg/db/errors.go
  • service/pkg/server/start.go
  • service/policy/db/obligations.go
  • service/policy/namespaces/namespaces_test.go
  • service/policy/objects.proto
  • service/policy/resourcemapping/resource_mapping_test.go

📝 Walkthrough

Walkthrough

This PR is a broad typo and comment/log-formatting cleanup across the codebase: correcting spelling errors ("identifcation", "defintion", "dependant", "namesapce", etc.) in comments, error messages, OpenAPI docs, and a proto file, reformatting several slog/logger calls to multi-line style, and renaming a misspelled function parameter (identiferidentifier) in a KAS registry handler.

Changes

Documentation and OpenAPI typo fixes

Layer / File(s) Summary
KasPublicKey description typo
service/policy/objects.proto, docs/grpc/index.html, docs/openapi/**/*.openapi.yaml
Corrects "identifcation" to "identification" in the proto comment and all generated OpenAPI/HTML docs referencing policy.KasPublicKey.
Dockerfile comment wording
Dockerfile
Fixes "dependant" to "dependent" in a build comment.

Go code comment, error message, log formatting, and typo fixes

Layer / File(s) Summary
examples logging and error text
examples/cmd/attributes.go
Reformats slog calls to multi-line and fixes "attribute"/"attribute value" error text.
Keycloak fixture logging
lib/fixtures/keycloak.go
Reformats call arguments and corrects wording in error/info log messages.
KAS registry identifier rename
otdfctl/pkg/handlers/kas-registry.go, otdfctl/e2e/registered-resources.bats
Renames misspelled identifer parameter to identifier and fixes a related test comment typo.
SDK granter logging and error fixes
sdk/granter.go
Reformats debug/warn logs into structured multi-line calls and fixes a "defintion" typo in an error string.
SDK misc error/comment/test fixes
sdk/resource_locator.go, sdk/tdf.go, sdk/tdf_config.go, sdk/options.go, sdk/granter_test.go
Corrects error messages and comment typos, and fixes test description spelling/formatting.
Authorization logging and test formatting
service/authorization/authorization.go, service/authorization/authorization_test.go, service/authorization/authorization_test_structures.go
Reformats log calls and rego.Module test setups to multiline style, fixes comment typos.
Keycloak entity resolution formatting
service/entityresolution/keycloak/entity_resolution.go, service/entityresolution/keycloak/v2/entity_resolution.go
Reformats DebugContext calls and corrects comment wording.
Miscellaneous comment/error typo fixes
service/integration/*.go, service/internal/access/pdp.go, service/logger/logger.go, service/pkg/db/errors.go, service/pkg/server/start.go, service/policy/db/obligations.go, service/policy/namespaces/namespaces_test.go, service/policy/resourcemapping/resource_mapping_test.go
Corrects miscellaneous spelling errors in comments, test descriptions, and error text constants.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested labels: comp:kas

Poem

Hop, hop, through the code I go,
Fixing typos row by row,
"Defintion" now spelled right,
Logs stretched out, tidy and light,
A rabbit's work — small but bright! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main cleanup theme, though the PR also fixes strings, tests, and generated docs beyond comments.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/code-typo-polish

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.

@github-actions

github-actions Bot commented Jul 2, 2026

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 206.830711ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

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

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 430.344056ms
Throughput 232.37 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 45.483692155s
Average Latency 453.25936ms
Throughput 109.93 requests/second

@github-actions

github-actions Bot commented Jul 2, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:authorization comp:db DB component comp:examples comp:lib:fixtures comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) comp:sdk A software development kit, including library, for client applications and inter-service communicati docs Documentation size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant