From 1dcdf0faadf0c70bb250f1b5130e43a3d751996d Mon Sep 17 00:00:00 2001 From: ilhom Date: Wed, 12 Aug 2026 14:43:35 +0700 Subject: [PATCH] feat(finance): add needs_repush signal to MB push preview Surface MB heads whose pushed cst_mb_cost row points at a superseded (or orphaned) source cost while a newer non-superseded calc result exists. These heads were already pushable but indistinguishable from freshly-computed ones, so a stale approved value could persist unnoticed. New field numbers only, no renumbering: - PushableMbHead.needs_repush = 7 - PreviewPushToHeadResponse.needs_repush_count = 4 Co-Authored-By: Claude Opus 5 --- finance/v1/yarn_master.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/finance/v1/yarn_master.proto b/finance/v1/yarn_master.proto index 03f312b..fef5332 100644 --- a/finance/v1/yarn_master.proto +++ b/finance/v1/yarn_master.proto @@ -3227,6 +3227,11 @@ message PushableMbHead { bool has_selling = 5; // Whether a FORECAST cost value is available to push. bool has_forecast = 6; + // Whether this head was already pushed for the period but its pushed cost has since gone + // stale — the source cst_product_cost row is SUPERSEDED (or unlinked) and a newer + // non-superseded row exists. Informational only: such a head is still pushable, and + // re-pushing is exactly the remedy. + bool needs_repush = 7; } // SkippedMbHead describes an MB Head excluded from the push, with the reason why. @@ -3249,6 +3254,9 @@ message PreviewPushToHeadResponse { repeated PushableMbHead pushable = 2; // MB Heads excluded from push, with reasons. repeated SkippedMbHead skipped = 3; + // Count of pushable heads flagged needs_repush — heads whose already-pushed cost went stale + // after a later MB Batch run. Surfaced as its own bucket so operators can act on it. + int32 needs_repush_count = 4; } // ExecutePushToHeadRequest is the request for executing a push-to-head batch for a period.