Skip to content

Comments

feat(provider): add BidScreening RPC and validation proto#243

Merged
troian merged 1 commit intomainfrom
feat/provider-bid-screening-rpc
Feb 24, 2026
Merged

feat(provider): add BidScreening RPC and validation proto#243
troian merged 1 commit intomainfrom
feat/provider-bid-screening-rpc

Conversation

@troian
Copy link
Member

@troian troian commented Feb 24, 2026

📝 Description

[Explain what this PR does in 2-3 sentences. Include context about the feature or problem being solved]

🔧 Purpose of the Change

  • New feature implementation
  • Bug fix
  • Documentation update
  • Code refactoring
  • Dependency upgrade
  • Other: [specify]

📌 Related Issues

  • Closes #ISSUE_NUMBER
  • References #ISSUE_NUMBER

✅ Checklist

  • I've updated relevant documentation
  • Code follows Akash Network's style guide
  • I've added/updated relevant unit tests
  • Dependencies have been properly updated
  • I agree and adhered to the Contribution Guidelines

📎 Notes for Reviewers

[Include any additional context, architectural decisions, or specific areas to focus on]

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

Walkthrough

Adds a new BidScreening RPC to ProviderRPC and introduces protobuf messages BidScreeningRequest and BidScreeningResponse (with related imports) to support bid validation and optional resource/price results.

Changes

Cohort / File(s) Summary
Provider proto
proto/provider/akash/provider/v1/service.proto
Added rpc BidScreening(BidScreeningRequest) returns (BidScreeningResponse); to ProviderRPC.
Validation messages
proto/provider/akash/provider/v1/validation.proto
New messages BidScreeningRequest (contains akash.deployment.v1beta4.GroupSpec group_spec, repeated string hostnames) and BidScreeningResponse (bool passed, repeated string reasons, optional akash.market.v1beta5.ResourceOffer resource_offer, optional cosmos.base.v1beta1.DecCoin price) plus gogoproto annotations and imports.
Documentation
docs/proto/provider.md
Added docs and TOC entries describing the new validation.proto messages and the BidScreening RPC in the Provider v1 API reference.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I checked the proto fields with care,
GroupSpecs and hosts all in a pair,
I screen each bid with a twitch and a hop,
Offer and price — I sort, never stop,
Hooray — a new RPC to share!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description uses the template structure but leaves critical sections blank: the main description explanation is missing, the related issues placeholders are unfilled, and reviewer notes are absent. Fill in the Description section with 2-3 sentences explaining the BidScreening feature and its purpose. Update Related Issues with actual issue numbers and add any relevant architectural notes in the Reviewer Notes section.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a BidScreening RPC method and validation proto to the provider module.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/provider-bid-screening-rpc

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
proto/provider/akash/provider/v1/service.proto (1)

29-29: Add a doc comment and consider google.api.http annotation.

Two minor gaps:

  1. Missing doc commentGetStatus and StreamStatus both have documentation comments; BidScreening has none. Add a comment like:

    +  // BidScreening screens a deployment group specification for bid eligibility
    +  // against the provider's capabilities.
       rpc BidScreening(BidScreeningRequest) returns (BidScreeningResponse);
  2. No google.api.http optionGetStatus is exposed via REST with this annotation. If BidScreening is intended to be callable over HTTP (e.g., by off-chain tooling querying the provider's gRPC-gateway), it needs an option (google.api.http) block. Omitting it is fine if this is intentionally gRPC-only, but worth confirming.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@proto/provider/akash/provider/v1/service.proto` at line 29, Add a one-line
doc comment for the BidScreening RPC (e.g., describing that it evaluates or
filters bids and what BidScreeningRequest/BidScreeningResponse contain) to match
the style used for GetStatus and StreamStatus, and if this RPC should be exposed
via REST also add an option (google.api.http) block for BidScreening that maps
an appropriate HTTP method/path to the BidScreeningRequest; if it is
intentionally gRPC-only explicitly leave out the google.api.http option but
still add the doc comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@proto/provider/akash/provider/v1/validation.proto`:
- Around line 48-53: The price field currently uses (gogoproto.nullable)=true
but its (gogoproto.jsontag) is "price" so unset values serialize as "price":
null; update the price field metadata to include omitempty (e.g., change
(gogoproto.jsontag) to "price,omitempty") and mirror the omission behavior for
other tags (optionally add omitempty to (gogoproto.moretags) like
yaml:"price,omitempty") so that when the Price pointer is nil the JSON output
omits the key, matching resource_offer.

---

Nitpick comments:
In `@proto/provider/akash/provider/v1/service.proto`:
- Line 29: Add a one-line doc comment for the BidScreening RPC (e.g., describing
that it evaluates or filters bids and what
BidScreeningRequest/BidScreeningResponse contain) to match the style used for
GetStatus and StreamStatus, and if this RPC should be exposed via REST also add
an option (google.api.http) block for BidScreening that maps an appropriate HTTP
method/path to the BidScreeningRequest; if it is intentionally gRPC-only
explicitly leave out the google.api.http option but still add the doc comment.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0433094 and 29d187d.

⛔ Files ignored due to path filters (2)
  • go/provider/v1/service.pb.go is excluded by !**/*.pb.go
  • go/provider/v1/validation.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (2)
  • proto/provider/akash/provider/v1/service.proto
  • proto/provider/akash/provider/v1/validation.proto

Signed-off-by: Artur Troian <troian@users.noreply.github.com>
@troian troian force-pushed the feat/provider-bid-screening-rpc branch from 29d187d to 3cdfd20 Compare February 24, 2026 02:31
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/proto/provider.md`:
- Around line 1105-1141: The generated validation section produces indented
headings and unresolved fragment links for types used by
BidScreeningRequest/BidScreeningResponse (fields: group_spec, hostnames, passed,
reasons, resource_offer, price); update the doc generator (or markdownlint
config) so headings are emitted at column 1 (no leading spaces) and modify link
generation to either emit local anchors for external types (e.g.,
akash.deployment.v1beta4.GroupSpec, akash.market.v1beta5.ResourceOffer,
cosmos.base.v1beta1.DecCoin) or produce full external URLs when the fragment
cannot be resolved, ensuring all references are resolvable by the linter.
- Line 1179: The table row for BidScreening in docs/proto/provider.md is missing
the Endpoint column; update the generator/template that emits the row for the
BidScreening RPC so the row has six pipe-separated cells (e.g., add an empty
endpoint cell between the description and the trailing pipe). Locate the code
that outputs the RPC table entry for BidScreening (references: BidScreening,
BidScreeningRequest, BidScreeningResponse) and ensure it emits the additional
empty cell (or the actual endpoint string) to match the table header.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 29d187d and 3cdfd20.

⛔ Files ignored due to path filters (9)
  • go/provider/v1/service.pb.go is excluded by !**/*.pb.go
  • go/provider/v1/validation.pb.go is excluded by !**/*.pb.go
  • ts/src/generated/createProviderSDK.ts is excluded by !**/generated/**
  • ts/src/generated/patches/providerCustomTypePatches.spec.ts is excluded by !**/generated/**
  • ts/src/generated/patches/providerCustomTypePatches.ts is excluded by !**/generated/**
  • ts/src/generated/patches/providerPatchMessage.ts is excluded by !**/generated/**
  • ts/src/generated/protos/akash/provider/v1/service_akash.ts is excluded by !**/generated/**
  • ts/src/generated/protos/akash/provider/v1/validation.ts is excluded by !**/generated/**
  • ts/src/generated/protos/index.provider.akash.v1.ts is excluded by !**/generated/**
📒 Files selected for processing (3)
  • docs/proto/provider.md
  • proto/provider/akash/provider/v1/service.proto
  • proto/provider/akash/provider/v1/validation.proto
🚧 Files skipped from review as they are similar to previous changes (1)
  • proto/provider/akash/provider/v1/service.proto

Comment on lines +1105 to +1141
<a name="akash/provider/v1/validation.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## akash/provider/v1/validation.proto



<a name="akash.provider.v1.BidScreeningRequest"></a>

### BidScreeningRequest
BidScreeningRequest represents a request to screen a deployment group
specification for bid eligibility against the provider's capabilities.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `group_spec` | [akash.deployment.v1beta4.GroupSpec](#akash.deployment.v1beta4.GroupSpec) | | GroupSpec is the deployment group specification to screen for bid eligibility. |
| `hostnames` | [string](#string) | repeated | Hostnames is the list of hostnames requested by the deployment. |






<a name="akash.provider.v1.BidScreeningResponse"></a>

### BidScreeningResponse
BidScreeningResponse represents the result of screening a deployment group
specification for bid eligibility against the provider's capabilities.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `passed` | [bool](#bool) | | Passed indicates whether the deployment group passed bid screening. |
| `reasons` | [string](#string) | repeated | Reasons contains explanations when screening fails. |
| `resource_offer` | [akash.market.v1beta5.ResourceOffer](#akash.market.v1beta5.ResourceOffer) | | ResourceOffer is the provider's resource offer for the screened group, if passed. |
| `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | Price is the minimum bid price for the screened group. |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix markdownlint warnings in the generated validation section.

Headings appear indented and the new field links reference fragments that aren’t resolvable in this doc. Since the file is auto-generated, update the doc generator (or lint config) to:

  • emit headings at column 1, and
  • ensure anchors exist for referenced external types or use external links.
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 1108-1108: Headings must start at the beginning of the line

(MD023, heading-start-left)


[warning] 1114-1114: Headings must start at the beginning of the line

(MD023, heading-start-left)


[warning] 1121-1121: Link fragments should be valid

(MD051, link-fragments)


[warning] 1131-1131: Headings must start at the beginning of the line

(MD023, heading-start-left)


[warning] 1140-1140: Link fragments should be valid

(MD051, link-fragments)


[warning] 1141-1141: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/proto/provider.md` around lines 1105 - 1141, The generated validation
section produces indented headings and unresolved fragment links for types used
by BidScreeningRequest/BidScreeningResponse (fields: group_spec, hostnames,
passed, reasons, resource_offer, price); update the doc generator (or
markdownlint config) so headings are emitted at column 1 (no leading spaces) and
modify link generation to either emit local anchors for external types (e.g.,
akash.deployment.v1beta4.GroupSpec, akash.market.v1beta5.ResourceOffer,
cosmos.base.v1beta1.DecCoin) or produce full external URLs when the fragment
cannot be resolved, ensuring all references are resolvable by the linter.

| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `GetStatus` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Status](#akash.provider.v1.Status) | GetStatus defines a method to query provider state buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/v1/status|
| `StreamStatus` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Status](#akash.provider.v1.Status) stream | Status defines a method to stream provider state buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | |
| `BidScreening` | [BidScreeningRequest](#akash.provider.v1.BidScreeningRequest) | [BidScreeningResponse](#akash.provider.v1.BidScreeningResponse) | BidScreening screens a deployment group spec for bid eligibility and returns pricing | |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Table row is missing the Endpoint column.

The BidScreening row has 5 cells but the header expects 6. Add an empty endpoint cell (or a real endpoint if applicable) in the generator.

Suggested row format
-| `BidScreening` | [BidScreeningRequest](`#akash.provider.v1.BidScreeningRequest`) | [BidScreeningResponse](`#akash.provider.v1.BidScreeningResponse`) | BidScreening screens a deployment group spec for bid eligibility and returns pricing | |
+| `BidScreening` | [BidScreeningRequest](`#akash.provider.v1.BidScreeningRequest`) | [BidScreeningResponse](`#akash.provider.v1.BidScreeningResponse`) | BidScreening screens a deployment group spec for bid eligibility and returns pricing | | |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| `BidScreening` | [BidScreeningRequest](#akash.provider.v1.BidScreeningRequest) | [BidScreeningResponse](#akash.provider.v1.BidScreeningResponse) | BidScreening screens a deployment group spec for bid eligibility and returns pricing | |
| `BidScreening` | [BidScreeningRequest](`#akash.provider.v1.BidScreeningRequest`) | [BidScreeningResponse](`#akash.provider.v1.BidScreeningResponse`) | BidScreening screens a deployment group spec for bid eligibility and returns pricing | | |
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 1179-1179: Table column count
Expected: 6; Actual: 5; Too few cells, row will be missing data

(MD056, table-column-count)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/proto/provider.md` at line 1179, The table row for BidScreening in
docs/proto/provider.md is missing the Endpoint column; update the
generator/template that emits the row for the BidScreening RPC so the row has
six pipe-separated cells (e.g., add an empty endpoint cell between the
description and the trailing pipe). Locate the code that outputs the RPC table
entry for BidScreening (references: BidScreening, BidScreeningRequest,
BidScreeningResponse) and ensure it emits the additional empty cell (or the
actual endpoint string) to match the table header.

@troian troian merged commit 1fadf95 into main Feb 24, 2026
7 of 8 checks passed
@troian troian deleted the feat/provider-bid-screening-rpc branch February 24, 2026 02:46
troian added a commit that referenced this pull request Feb 24, 2026
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Co-authored-by: Artur Troian <troian@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant