Retain aligned guidance handoff history on dashboard

This commit is contained in:
axiomlogicnexus 2026-04-29 22:35:47 +02:00
parent ee93ea3315
commit 4ba3a37446
2 changed files with 93 additions and 1 deletions

View file

@ -40,6 +40,8 @@ namespace HyperTwistCoachDashboardWidgetInternal
int32 QueueAcceptedDeltaCount = 0;
int32 FollowUpAcceptedDeltaCount = 0;
int32 RecommendedAcceptedDeltaCount = 0;
int32 AlignedTightFollowUpOutcomeAcceptedDeltaCount = 0;
int32 AlignedBroadRecommendedOutcomeAcceptedDeltaCount = 0;
int32 DeferredOverflowQueueAcceptedDeltaCount = 0;
int32 DeferredOverflowFollowUpAcceptedDeltaCount = 0;
int32 DeferredOverflowRecommendedAcceptedDeltaCount = 0;
@ -108,6 +110,7 @@ namespace HyperTwistCoachDashboardWidgetInternal
bool bHasReliableTrustedBroadPlanHistorySignal = false;
bool bHasReliableAlignedTrustedTightPlanOutcomeSignal = false;
bool bHasReliableAlignedTrustedBroadPlanOutcomeSignal = false;
bool bHasAlignedGuidanceOutcomeAcceptedSignal = false;
bool bHasSignal = false;
};
@ -1393,6 +1396,10 @@ namespace HyperTwistCoachDashboardWidgetInternal
bHasPreviousEntry ? PreviousEntry.AcceptedMethodDrillFollowUpHandoffCount : 0;
const int32 PreviousMethodDrillRecommendedCount =
bHasPreviousEntry ? PreviousEntry.AcceptedMethodDrillRecommendedHandoffCount : 0;
const int32 PreviousAlignedTightFollowUpOutcomeCount =
bHasPreviousEntry ? PreviousEntry.AcceptedAlignedTightFollowUpOutcomeHandoffCount : 0;
const int32 PreviousAlignedBroadRecommendedOutcomeCount =
bHasPreviousEntry ? PreviousEntry.AcceptedAlignedBroadRecommendedOutcomeHandoffCount : 0;
const int32 QueuedDelta =
FMath::Max(0, Entry.AcceptedQueuedHandoffCount - PreviousQueuedCount);
@ -1425,6 +1432,16 @@ namespace HyperTwistCoachDashboardWidgetInternal
0,
Entry.AcceptedMethodDrillRecommendedHandoffCount - PreviousMethodDrillRecommendedCount
);
const int32 AlignedTightFollowUpOutcomeDelta = FMath::Max(
0,
Entry.AcceptedAlignedTightFollowUpOutcomeHandoffCount
- PreviousAlignedTightFollowUpOutcomeCount
);
const int32 AlignedBroadRecommendedOutcomeDelta = FMath::Max(
0,
Entry.AcceptedAlignedBroadRecommendedOutcomeHandoffCount
- PreviousAlignedBroadRecommendedOutcomeCount
);
if (QueuedDelta > 0)
{
@ -1461,6 +1478,13 @@ namespace HyperTwistCoachDashboardWidgetInternal
Bias.FollowUpAcceptedDeltaCount += FollowUpDelta;
Bias.FollowUpScore += FollowUpDelta * 3;
Bias.bHasAcceptedSignal = true;
if (AlignedTightFollowUpOutcomeDelta > 0)
{
Bias.AlignedTightFollowUpOutcomeAcceptedDeltaCount
+= AlignedTightFollowUpOutcomeDelta;
Bias.FollowUpScore += AlignedTightFollowUpOutcomeDelta * 4;
Bias.bHasAlignedGuidanceOutcomeAcceptedSignal = true;
}
if (Entry.bUsedReliableTrustedTightStructurePlanHistory)
{
Bias.ReliableTrustedTightFollowUpAcceptedDeltaCount += FollowUpDelta;
@ -1491,6 +1515,13 @@ namespace HyperTwistCoachDashboardWidgetInternal
Bias.RecommendedAcceptedDeltaCount += RecommendedDelta;
Bias.RecommendedScore += RecommendedDelta * 3;
Bias.bHasAcceptedSignal = true;
if (AlignedBroadRecommendedOutcomeDelta > 0)
{
Bias.AlignedBroadRecommendedOutcomeAcceptedDeltaCount
+= AlignedBroadRecommendedOutcomeDelta;
Bias.RecommendedScore += AlignedBroadRecommendedOutcomeDelta * 4;
Bias.bHasAlignedGuidanceOutcomeAcceptedSignal = true;
}
if (Entry.bUsedReliableTrustedTightStructurePlanHistory)
{
Bias.ReliableTrustedTightRecommendedAcceptedDeltaCount += RecommendedDelta;
@ -8051,6 +8082,40 @@ void UHyperTwistCoachDashboardWidget::RecordCoachHandoffHistorySnapshot(
CachedCoachQueueExecutionSummary.StartedMethodDrillFollowUpHandoffEventCount;
Entry.AcceptedMethodDrillRecommendedHandoffCount =
CachedCoachQueueExecutionSummary.StartedMethodDrillRecommendedHandoffEventCount;
const int32 PreviousAcceptedFollowUpHandoffCount = HandoffHistoryEntries.Num() > 0
? HandoffHistoryEntries.Last().AcceptedFollowUpHandoffCount
: 0;
const int32 PreviousAcceptedRecommendedHandoffCount = HandoffHistoryEntries.Num() > 0
? HandoffHistoryEntries.Last().AcceptedRecommendedHandoffCount
: 0;
const int32 PreviousAcceptedAlignedTightFollowUpOutcomeHandoffCount =
HandoffHistoryEntries.Num() > 0
? HandoffHistoryEntries.Last().AcceptedAlignedTightFollowUpOutcomeHandoffCount
: 0;
const int32 PreviousAcceptedAlignedBroadRecommendedOutcomeHandoffCount =
HandoffHistoryEntries.Num() > 0
? HandoffHistoryEntries.Last().AcceptedAlignedBroadRecommendedOutcomeHandoffCount
: 0;
const int32 AcceptedFollowUpHandoffDelta = FMath::Max(
0,
Entry.AcceptedFollowUpHandoffCount - PreviousAcceptedFollowUpHandoffCount
);
const int32 AcceptedRecommendedHandoffDelta = FMath::Max(
0,
Entry.AcceptedRecommendedHandoffCount - PreviousAcceptedRecommendedHandoffCount
);
const bool bAlignedTightFollowUpGuidanceOutcomeSource =
CachedCoachPanelState.PreferredGuidanceSourceLabel
== TEXT("recommendation-history-aligned-tight-follow-up-outcome");
const bool bAlignedBroadRecommendedGuidanceOutcomeSource =
CachedCoachPanelState.PreferredGuidanceSourceLabel
== TEXT("recommendation-history-aligned-broad-recommended-outcome");
Entry.AcceptedAlignedTightFollowUpOutcomeHandoffCount =
PreviousAcceptedAlignedTightFollowUpOutcomeHandoffCount
+ (bAlignedTightFollowUpGuidanceOutcomeSource ? AcceptedFollowUpHandoffDelta : 0);
Entry.AcceptedAlignedBroadRecommendedOutcomeHandoffCount =
PreviousAcceptedAlignedBroadRecommendedOutcomeHandoffCount
+ (bAlignedBroadRecommendedGuidanceOutcomeSource ? AcceptedRecommendedHandoffDelta : 0);
Entry.ReliableAlignedTrustedTightPlanOutcomeHistoryCount =
CachedCoachPanelState
.ReliableAlignedTrustedTightMethodDrillRecoveryStructurePlanOutcomeHistoryCount;
@ -8124,6 +8189,10 @@ void UHyperTwistCoachDashboardWidget::RecordCoachHandoffHistorySnapshot(
== Entry.AcceptedMethodDrillFollowUpHandoffCount
&& HandoffHistoryEntries.Last().AcceptedMethodDrillRecommendedHandoffCount
== Entry.AcceptedMethodDrillRecommendedHandoffCount
&& HandoffHistoryEntries.Last().AcceptedAlignedTightFollowUpOutcomeHandoffCount
== Entry.AcceptedAlignedTightFollowUpOutcomeHandoffCount
&& HandoffHistoryEntries.Last().AcceptedAlignedBroadRecommendedOutcomeHandoffCount
== Entry.AcceptedAlignedBroadRecommendedOutcomeHandoffCount
&& HandoffHistoryEntries.Last().ReliableAlignedTrustedTightPlanOutcomeHistoryCount
== Entry.ReliableAlignedTrustedTightPlanOutcomeHistoryCount
&& HandoffHistoryEntries.Last().ReliableAlignedTrustedBroadPlanOutcomeHistoryCount
@ -10475,6 +10544,25 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation()
HandoffHistoryBias.FollowUpRecommendationCount,
HandoffHistoryBias.RecommendedRecommendationCount
);
CoachHandoffRecommendationDetailLine += FString::Printf(
TEXT(" | aligned guidance accepted follow-up/recommended %d/%d"),
HandoffHistoryBias.AlignedTightFollowUpOutcomeAcceptedDeltaCount,
HandoffHistoryBias.AlignedBroadRecommendedOutcomeAcceptedDeltaCount
);
if (HandoffHistoryBias.AlignedTightFollowUpOutcomeAcceptedDeltaCount > 0
&& HandoffHistoryBias.PreferredKind
== HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::FollowUp)
{
CoachHandoffRecommendationDetailLine +=
TEXT(" | Accepted aligned tight follow-up handoffs are directly reinforcing narrow continuation.");
}
else if (HandoffHistoryBias.AlignedBroadRecommendedOutcomeAcceptedDeltaCount > 0
&& HandoffHistoryBias.PreferredKind
== HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::Recommended)
{
CoachHandoffRecommendationDetailLine +=
TEXT(" | Accepted aligned broad recommended handoffs are directly reinforcing broader redirect.");
}
CoachHandoffRecommendationDetailLine += FString::Printf(
TEXT(" | upstream drill recovery strong/weak/history %d/%d/%d avg %.1f"),
CachedCoachPanelState.StrongMethodDrillRecoveryHistoryCount,
@ -10795,10 +10883,12 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation()
const FString HandoffHistoryDetailLine =
SelectedHandoffHistoryEntry != nullptr
? FString::Printf(
TEXT("Accepted queued/follow-up/recommended: %d/%d/%d | deferred-overflow queued/follow-up/recommended: %d/%d/%d | drill-driven queued/follow-up/recommended: %d/%d/%d | aligned reliable handoff outcomes tight/broad %d/%d avg %.1f/%.1f | deferred-first suppression recommendation used: %s | drill weighting used: %s | reliable trusted plan: %s | retained posture: %s | queue source: %s | preferred lane: %s | memory source: %s | recovery action: %s | recovery source: %s | closure continuation bias %d | closure suppression bias %d | readiness queue/follow-up/recommended: %s/%s/%s || %s"),
TEXT("Accepted queued/follow-up/recommended: %d/%d/%d | aligned guidance accepted follow-up/recommended: %d/%d | deferred-overflow queued/follow-up/recommended: %d/%d/%d | drill-driven queued/follow-up/recommended: %d/%d/%d | aligned reliable handoff outcomes tight/broad %d/%d avg %.1f/%.1f | deferred-first suppression recommendation used: %s | drill weighting used: %s | reliable trusted plan: %s | retained posture: %s | queue source: %s | preferred lane: %s | memory source: %s | recovery action: %s | recovery source: %s | closure continuation bias %d | closure suppression bias %d | readiness queue/follow-up/recommended: %s/%s/%s || %s"),
SelectedHandoffHistoryEntry->AcceptedQueuedHandoffCount,
SelectedHandoffHistoryEntry->AcceptedFollowUpHandoffCount,
SelectedHandoffHistoryEntry->AcceptedRecommendedHandoffCount,
SelectedHandoffHistoryEntry->AcceptedAlignedTightFollowUpOutcomeHandoffCount,
SelectedHandoffHistoryEntry->AcceptedAlignedBroadRecommendedOutcomeHandoffCount,
SelectedHandoffHistoryEntry->AcceptedDeferredOverflowQueuedHandoffCount,
SelectedHandoffHistoryEntry->AcceptedDeferredOverflowFollowUpHandoffCount,
SelectedHandoffHistoryEntry->AcceptedDeferredOverflowRecommendedHandoffCount,

View file

@ -338,6 +338,8 @@ struct FHyperTwistCoachDashboardHandoffHistoryEntry
int32 AcceptedMethodDrillQueuedHandoffCount = 0;
int32 AcceptedMethodDrillFollowUpHandoffCount = 0;
int32 AcceptedMethodDrillRecommendedHandoffCount = 0;
int32 AcceptedAlignedTightFollowUpOutcomeHandoffCount = 0;
int32 AcceptedAlignedBroadRecommendedOutcomeHandoffCount = 0;
int32 ReliableAlignedTrustedTightPlanOutcomeHistoryCount = 0;
int32 ReliableAlignedTrustedBroadPlanOutcomeHistoryCount = 0;
float ReliableAlignedTrustedTightPlanOutcomeAverageScore = 0.0f;