Skip to content

chore(proto): sync from resq-proto@3f31a3a#77

Open
WomB0ComB0 wants to merge 1 commit into
mainfrom
sync/protos-3f31a3a
Open

chore(proto): sync from resq-proto@3f31a3a#77
WomB0ComB0 wants to merge 1 commit into
mainfrom
sync/protos-3f31a3a

Conversation

@WomB0ComB0

Copy link
Copy Markdown
Member

Automated sync from resq-proto@3f31a3a4c4999b3ea5d0f3555c25d72ac6eabc50\n\nBSR revision: buf.build/resq-software/resq-proto:9b0f82297aca4f669603fd516e9e6263

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@WomB0ComB0, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c19ec40d-9ed0-4ed1-9475-d66584d01b04

📥 Commits

Reviewing files that changed from the base of the PR and between 4d54225 and 228698c.

⛔ Files ignored due to path filters (1)
  • proto-source.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • protos/health.proto
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/protos-3f31a3a

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.

@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 introduces a new Protobuf definition file protos/health.proto to define the ResQDiagnosticService and its associated messages and enums for detailed health reporting. The review feedback suggests prefixing enum values with their enum names to prevent collisions, changing the latency_ms field type from double to uint32 to avoid precision issues, and adding a disk_bytes_total field to ResourceMetrics for completeness.

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 protos/health.proto
Comment on lines +23 to +30
enum SystemState {
// Guards against proto3's zero-default masking failures: an unset
// overall_state / state must not read as HEALTHY.
SYSTEM_STATE_UNSPECIFIED = 0;
HEALTHY = 1;
DEGRADED = 2;
UNHEALTHY = 3;
}

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

Enum values should be prefixed with the enum name to prevent name collisions in languages like C++ or Go, adhering to the Google Protobuf Style Guide.

Suggested change
enum SystemState {
// Guards against proto3's zero-default masking failures: an unset
// overall_state / state must not read as HEALTHY.
SYSTEM_STATE_UNSPECIFIED = 0;
HEALTHY = 1;
DEGRADED = 2;
UNHEALTHY = 3;
}
enum SystemState {
// Guards against proto3's zero-default masking failures: an unset
// overall_state / state must not read as HEALTHY.
SYSTEM_STATE_UNSPECIFIED = 0;
SYSTEM_STATE_HEALTHY = 1;
SYSTEM_STATE_DEGRADED = 2;
SYSTEM_STATE_UNHEALTHY = 3;
}
References
  1. Enum value names should be in UPPER_CASE_WITH_UNDERSCORES and should be prefixed with the enum name to avoid collisions in languages that do not scope enums. (link)

Comment thread protos/health.proto
Comment on lines +32 to +39
enum DependencyType {
DEPENDENCY_TYPE_UNSPECIFIED = 0;
DATABASE = 1;
CACHE = 2;
MESSAGE_BROKER = 3;
PEER_SERVICE = 4;
INTERNAL_ENGINE = 5;
}

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

Enum values should be prefixed with the enum name to prevent name collisions in languages like C++ or Go, adhering to the Google Protobuf Style Guide.

Suggested change
enum DependencyType {
DEPENDENCY_TYPE_UNSPECIFIED = 0;
DATABASE = 1;
CACHE = 2;
MESSAGE_BROKER = 3;
PEER_SERVICE = 4;
INTERNAL_ENGINE = 5;
}
enum DependencyType {
DEPENDENCY_TYPE_UNSPECIFIED = 0;
DEPENDENCY_TYPE_DATABASE = 1;
DEPENDENCY_TYPE_CACHE = 2;
DEPENDENCY_TYPE_MESSAGE_BROKER = 3;
DEPENDENCY_TYPE_PEER_SERVICE = 4;
DEPENDENCY_TYPE_INTERNAL_ENGINE = 5;
}
References
  1. Enum value names should be in UPPER_CASE_WITH_UNDERSCORES and should be prefixed with the enum name to avoid collisions in languages that do not scope enums. (link)

Comment thread protos/health.proto
string name = 1;
DependencyType type = 2;
SystemState state = 3;
double latency_ms = 4;

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

Using double for latency can introduce floating-point precision issues. It is recommended to use an integer type like uint32 (representing milliseconds) or google.protobuf.Duration for representing durations and latencies in Protobuf.

Suggested change
double latency_ms = 4;
uint32 latency_ms = 4;

Comment thread protos/health.proto
Comment on lines +50 to +55
message ResourceMetrics {
double cpu_usage_percent = 1;
uint64 memory_bytes_used = 2;
uint64 memory_bytes_total = 3;
uint64 disk_bytes_free = 4;
}

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

Adding disk_bytes_total allows calculating the percentage of disk space remaining or used, similar to how memory metrics provide both used and total bytes.

Suggested change
message ResourceMetrics {
double cpu_usage_percent = 1;
uint64 memory_bytes_used = 2;
uint64 memory_bytes_total = 3;
uint64 disk_bytes_free = 4;
}
message ResourceMetrics {
double cpu_usage_percent = 1;
uint64 memory_bytes_used = 2;
uint64 memory_bytes_total = 3;
uint64 disk_bytes_free = 4;
uint64 disk_bytes_total = 5;
}

@github-actions

Copy link
Copy Markdown

Audit Results for PR #77

I have audited the changes in this PR, which primarily involve the addition of and an update to .

Findings for

1. Security: Information Disclosure

The message and the field in expose internal system details (CPU, memory, disk usage, and potentially internal error messages).

  • Recommendation: Ensure the is only exposed to authorized internal clients. Consider sanitizing the field in to prevent accidental leakage of sensitive information like connection strings or stack traces.

2. Logic: Completeness of Resource Metrics

The message currently includes but lacks a corresponding field.

  • Recommendation: Add to allow clients to calculate the percentage of disk space used.

3. Documentation: Metric Units

The unit for is not explicitly defined.

  • Recommendation: Add a comment specifying if the value is expected to be in the range or .

4. Standards: gRPC Health Checking

The PR introduces a custom for health checks.

  • Recommendation: For better integration with standard infrastructure tools (like Kubernetes), consider also implementing the standard gRPC Health Checking Protocol () in addition to this detailed diagnostic service.

Other Observations

  • The update correctly pins the latest version of the shared protocols.
  • The use of in enums is a good practice to avoid proto3 default value ambiguity.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • localhost

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

Generated by ai-auditor for issue #77 ·

@github-actions

Copy link
Copy Markdown

Audit Results for PR #77

I have audited the changes in this PR, which primarily involve the addition of protos/health.proto and an update to proto-source.lock.

Findings for protos/health.proto

1. Security: Information Disclosure

The ResourceMetrics message and the detail field in DependencyCheck expose internal system details (CPU, memory, disk usage, and potentially internal error messages).

  • Recommendation: Ensure the ResQDiagnosticService is only exposed to authorized internal clients. Consider sanitizing the detail field in DependencyCheck to prevent accidental leakage of sensitive information like connection strings or stack traces.

2. Logic: Completeness of Resource Metrics

The ResourceMetrics message currently includes disk_bytes_free but lacks a corresponding disk_bytes_total field.

  • Recommendation: Add uint64 disk_bytes_total = 5; to allow clients to calculate the percentage of disk space used.

3. Documentation: Metric Units

The unit for cpu_usage_percent is not explicitly defined.

  • Recommendation: Add a comment specifying if the value is expected to be in the range [0.0, 1.0] or [0.0, 100.0].

4. Standards: gRPC Health Checking

The PR introduces a custom ResQDiagnosticService for health checks.

  • Recommendation: For better integration with standard infrastructure tools (like Kubernetes), consider also implementing the standard gRPC Health Checking Protocol (grpc.health.v1.Health) in addition to this detailed diagnostic service.

Other Observations

  • The proto-source.lock update correctly pins the latest version of the shared protocols.
  • The use of SYSTEM_STATE_UNSPECIFIED = 0 in enums is a good practice to avoid proto3 default value ambiguity.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • localhost

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

Generated by ai-auditor for issue #77 ·

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.

1 participant