Skip to content

fix(rm-cost): add V2 valuation and marketing flags for improved flag resolution in rm_cost.proto#26

Merged
ilramdhan merged 1 commit intomutugading:mainfrom
ilramdhan:feat/formula-master-proto
May 5, 2026
Merged

fix(rm-cost): add V2 valuation and marketing flags for improved flag resolution in rm_cost.proto#26
ilramdhan merged 1 commit intomutugading:mainfrom
ilramdhan:feat/formula-master-proto

Conversation

@ilramdhan
Copy link
Copy Markdown
Member

Description

This pull request adds two new fields to the RMCost message in the finance/v1/rm_cost.proto file to clarify which valuation and marketing flags are actually used after resolving any "AUTO" settings. This helps make downstream logic and data analysis more explicit and reliable.

Change Type

  • ✨ New service/message
  • ➕ Add field/RPC/enum value
  • 🔄 Modify validation
  • 📝 Documentation update
  • ⚠️ Deprecation
  • 🔧 Config/script changes

Proto Files Changed

  • common/v1/common.proto
  • finance/v1/uom.proto
  • Other: _______________

Changes Made

Enhancements to RMCost message:

  • Added valuation_flag_used field to record the resolved valuation flag after applying the AUTO cascade logic (CL→SL→FL fallback).
  • Added marketing_flag_used field to record the resolved marketing flag after applying the AUTO cascade logic (SP→PP→FP fallback).

Breaking Change Check

Is this a breaking change?

  • No - buf breaking passes
  • Yes - Requires version bump

Pre-merge Checklist

  • I have read and followed RULES.md
  • buf format -w applied
  • buf lint passes
  • buf breaking passes
  • Comments document new messages/fields
  • REST mappings follow conventions
  • Validation rules are complete
  • Field numbers are logical

Impact Assessment

  • Backend code regeneration required
  • Frontend code regeneration required
  • OpenAPI spec regeneration required

@ilramdhan ilramdhan requested a review from Copilot May 5, 2026 04:04
@ilramdhan ilramdhan self-assigned this May 5, 2026
@ilramdhan ilramdhan added the enhancement New feature or request label May 5, 2026
@ilramdhan ilramdhan merged commit 8394922 into mutugading:main May 5, 2026
3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the finance RM cost protobuf so RMCost can expose the resolved V2 valuation/marketing flags after AUTO fallback, making the computed branch more visible to API consumers.

Changes:

  • Added valuation_flag_used to RMCost for the resolved valuation flag.
  • Added marketing_flag_used to RMCost for the resolved marketing flag.
  • Documented the intended AUTO fallback behavior for both new fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread finance/v1/rm_cost.proto
optional double pr_rate = 38;
// V2: Valuation flag actually used after AUTO cascade (CL→SL→FL fallback).
// Equals valuation_flag when explicit, or the resolved choice when AUTO.
RMValuationFlag valuation_flag_used = 39;
Comment thread finance/v1/rm_cost.proto
Comment on lines +127 to +129
RMValuationFlag valuation_flag_used = 39;
// V2: Marketing flag actually used after AUTO cascade (SP→PP→FP fallback).
RMMarketingFlag marketing_flag_used = 40;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants