feat(finance): add product cost-sheet export contracts and remove legacy CalculateRMCost RPC - #54
Merged
ilramdhan merged 2 commits intoAug 7, 2026
Conversation
CalculateRMCost was an admin-only synchronous RPC that ran the V1 consumption-only RM cost calculation. V1 has been fully replaced by the V2 engine (cascade + marketing + simulation), and the async TriggerRMCostCalculation RPC is the only path production/UI ever call for recalculation. Verified zero live callers of CalculateRMCost anywhere in the frontend/BFF. Removes the CalculateRMCostRequest/CalculateRMCostResponse messages and the CalculateRMCost RPC (with its HTTP annotation) from RMCostService. Authored-By: Ilham R <ilhamram332@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds the RPCs and messages backing the async product-cost-sheet export feature: RequestProductCostSheetExport, GetProductCostSheetDownloadURL, GetProductCostSheetExportJobStatus, ListCostSheetExportBatchChildren, GetBatchChildDownloadUrl, DownloadExportBatchZip, ListExportJobs, and GetRouteCostSheet (route-stage snapshot query). Also extends ListCostResultsRequest with product_type_ids/sort_by/sort_order and adds ListCostResultPeriods, plus route_level on CostRMDetail and product_type_id/product_type_code on CostResult. Authored-By: Ilham R <ilhamram332@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
This PR introduces protobuf contracts backing the asynchronous product cost-sheet export feature in the finance domain. Additionally, it removes the deprecated and unused synchronous
CalculateRMCostRPC and its associated request/response messages, which have been superseded by the V2 cost calculation engine (TriggerRMCostCalculation).Change Type
Proto Files Changed
common/v1/common.protofinance/v1/uom.protofinance/v1/(RMCostService, cost result, and export proto contracts)Changes Made
RequestProductCostSheetExport,GetProductCostSheetDownloadURL,GetProductCostSheetExportJobStatus,ListCostSheetExportBatchChildren,GetBatchChildDownloadUrl,DownloadExportBatchZip,ListExportJobs, andGetRouteCostSheet.ListCostResultsRequestwithproduct_type_ids,sort_by, andsort_order.ListCostResultPeriodsRPC and corresponding messages.route_levelfield onCostRMDetail, andproduct_type_id/product_type_codeonCostResult.CalculateRMCostRPC (and HTTP REST annotation) fromRMCostService.CalculateRMCostRequestandCalculateRMCostResponsemessages.TriggerRMCostCalculation).Related Issues
Fixes #
Related to #
Breaking Change Check
Is this a breaking change?
buf breakingpassesBreaking Change Evidence
Lint Check
# Output of buf lint buf lintGenerated Code Preview (Optional)
// Generated Go code changes for RMCostService and Export Job contractsPre-merge Checklist
buf format -wappliedbuf lintpassesbuf breakingpasses (Removal of legacy V1 RPC)Impact Assessment
Reviewer Notes
CalculateRMCostwas an admin-only synchronous V1 RPC that is no longer in use. Production recalculations strictly use the asyncTriggerRMCostCalculationRPC under the V2 engine.