feat(cost): add GetInvoiceReadiness RPC for billing readiness check - #888
Merged
Conversation
kitkatchoco2002
requested review from
emsdelantar
and
a lite review from Copilot
August 19, 2026 14:10
There was a problem hiding this comment.
Pull request overview
Adds a new synchronous Cost service RPC (GetInvoiceReadiness) intended to let clients check whether billing is finalized for a given vendor + month without triggering an export job, and updates the generated OpenAPI spec accordingly.
Changes:
- Adds
GetInvoiceReadinessRPC tocost/v1/cost.protowith HTTP GET mapping at/v1/{vendor}/reports/invoicereadiness. - Introduces
GetInvoiceReadinessRequest/GetInvoiceReadinessResponsemessages. - Regenerates
openapiv2/apidocs.swagger.jsonto expose the new endpoint and response schema.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cost/v1/cost.proto | Adds the new unary readiness-check RPC and request/response messages. |
| openapiv2/apidocs.swagger.json | Updates generated OpenAPI paths/definitions to include the new endpoint. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ce required parameters
Ricz2024
approved these changes
Aug 20, 2026
emsdelantar
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Summary
GetInvoiceReadinessRPC on theCostservice so callers(e.g.
ripple-ui) can check whether billing is finalized for a given vendor +month before triggering a reserveshield export — no export job, email, or
long-running operation is created by this call.
vendor/monthrequest fields mirrorExportReportRequest.msp_idisintentionally omitted — like
ExportReportRequest, it's derived server-sidefrom the caller's session, so a client can't request another MSP's data.
openapiv2/apidocs.swagger.jsonto include the new endpoint.Why
The existing readiness signal (
invoice_id_check) only ever ran as a side effectof an actual export job, so there was no way to show a "is this month ready?"
banner before a user committed to exporting. This adds the missing synchronous
check, reusing the same underlying BigQuery query/parser the export pipeline
already relies on — no new readiness semantics introduced.