Weight handoff history by drill-driven acceptance

This commit is contained in:
axiomlogicnexus 2026-04-29 03:34:47 +02:00
parent 982e512902
commit 80ddba6946
2 changed files with 96 additions and 5 deletions

View file

@ -36,12 +36,18 @@ namespace HyperTwistCoachDashboardWidgetInternal
int32 DeferredOverflowQueueAcceptedDeltaCount = 0;
int32 DeferredOverflowFollowUpAcceptedDeltaCount = 0;
int32 DeferredOverflowRecommendedAcceptedDeltaCount = 0;
int32 MethodDrillQueueAcceptedDeltaCount = 0;
int32 MethodDrillFollowUpAcceptedDeltaCount = 0;
int32 MethodDrillRecommendedAcceptedDeltaCount = 0;
int32 QueueRecommendationCount = 0;
int32 FollowUpRecommendationCount = 0;
int32 RecommendedRecommendationCount = 0;
int32 DeferredFirstQueueRecommendationCount = 0;
int32 DeferredFirstFollowUpRecommendationCount = 0;
int32 DeferredFirstRecommendedRecommendationCount = 0;
int32 MethodDrillQueueRecommendationCount = 0;
int32 MethodDrillFollowUpRecommendationCount = 0;
int32 MethodDrillRecommendedRecommendationCount = 0;
int32 QueueScore = 0;
int32 FollowUpScore = 0;
int32 RecommendedScore = 0;
@ -51,6 +57,8 @@ namespace HyperTwistCoachDashboardWidgetInternal
bool bHasRecommendationSignal = false;
bool bHasDeferredOverflowAcceptedSignal = false;
bool bHasDeferredFirstSuppressionRecommendationSignal = false;
bool bHasMethodDrillAcceptedSignal = false;
bool bHasMethodDrillRecommendationSignal = false;
bool bHasSignal = false;
};
@ -520,6 +528,12 @@ namespace HyperTwistCoachDashboardWidgetInternal
bHasPreviousEntry ? PreviousEntry.AcceptedDeferredOverflowFollowUpHandoffCount : 0;
const int32 PreviousDeferredOverflowRecommendedCount =
bHasPreviousEntry ? PreviousEntry.AcceptedDeferredOverflowRecommendedHandoffCount : 0;
const int32 PreviousMethodDrillQueuedCount =
bHasPreviousEntry ? PreviousEntry.AcceptedMethodDrillQueuedHandoffCount : 0;
const int32 PreviousMethodDrillFollowUpCount =
bHasPreviousEntry ? PreviousEntry.AcceptedMethodDrillFollowUpHandoffCount : 0;
const int32 PreviousMethodDrillRecommendedCount =
bHasPreviousEntry ? PreviousEntry.AcceptedMethodDrillRecommendedHandoffCount : 0;
const int32 QueuedDelta =
FMath::Max(0, Entry.AcceptedQueuedHandoffCount - PreviousQueuedCount);
@ -540,6 +554,18 @@ namespace HyperTwistCoachDashboardWidgetInternal
Entry.AcceptedDeferredOverflowRecommendedHandoffCount
- PreviousDeferredOverflowRecommendedCount
);
const int32 MethodDrillQueuedDelta = FMath::Max(
0,
Entry.AcceptedMethodDrillQueuedHandoffCount - PreviousMethodDrillQueuedCount
);
const int32 MethodDrillFollowUpDelta = FMath::Max(
0,
Entry.AcceptedMethodDrillFollowUpHandoffCount - PreviousMethodDrillFollowUpCount
);
const int32 MethodDrillRecommendedDelta = FMath::Max(
0,
Entry.AcceptedMethodDrillRecommendedHandoffCount - PreviousMethodDrillRecommendedCount
);
if (QueuedDelta > 0)
{
@ -580,12 +606,39 @@ namespace HyperTwistCoachDashboardWidgetInternal
Bias.bHasAcceptedSignal = true;
Bias.bHasDeferredOverflowAcceptedSignal = true;
}
if (MethodDrillQueuedDelta > 0)
{
Bias.MethodDrillQueueAcceptedDeltaCount += MethodDrillQueuedDelta;
Bias.QueueScore += MethodDrillQueuedDelta * 2;
Bias.bHasAcceptedSignal = true;
Bias.bHasMethodDrillAcceptedSignal = true;
}
if (MethodDrillFollowUpDelta > 0)
{
Bias.MethodDrillFollowUpAcceptedDeltaCount += MethodDrillFollowUpDelta;
Bias.FollowUpScore += MethodDrillFollowUpDelta * 3;
Bias.bHasAcceptedSignal = true;
Bias.bHasMethodDrillAcceptedSignal = true;
}
if (MethodDrillRecommendedDelta > 0)
{
Bias.MethodDrillRecommendedAcceptedDeltaCount += MethodDrillRecommendedDelta;
Bias.RecommendedScore += MethodDrillRecommendedDelta * 2;
Bias.bHasAcceptedSignal = true;
Bias.bHasMethodDrillAcceptedSignal = true;
}
if (Entry.RecommendedHandoffKindLabel.Equals(TEXT("queue"), ESearchCase::IgnoreCase))
{
++Bias.QueueRecommendationCount;
++Bias.QueueScore;
Bias.bHasRecommendationSignal = true;
if (Entry.bUsedMethodDrillWeighting)
{
++Bias.MethodDrillQueueRecommendationCount;
Bias.QueueScore += 2;
Bias.bHasMethodDrillRecommendationSignal = true;
}
if (Entry.bUsedDeferredFirstSuppressionSignal)
{
++Bias.DeferredFirstQueueRecommendationCount;
@ -598,6 +651,12 @@ namespace HyperTwistCoachDashboardWidgetInternal
++Bias.FollowUpRecommendationCount;
++Bias.FollowUpScore;
Bias.bHasRecommendationSignal = true;
if (Entry.bUsedMethodDrillWeighting)
{
++Bias.MethodDrillFollowUpRecommendationCount;
Bias.FollowUpScore += 3;
Bias.bHasMethodDrillRecommendationSignal = true;
}
if (Entry.bUsedDeferredFirstSuppressionSignal)
{
++Bias.DeferredFirstFollowUpRecommendationCount;
@ -610,6 +669,12 @@ namespace HyperTwistCoachDashboardWidgetInternal
++Bias.RecommendedRecommendationCount;
++Bias.RecommendedScore;
Bias.bHasRecommendationSignal = true;
if (Entry.bUsedMethodDrillWeighting)
{
++Bias.MethodDrillRecommendedRecommendationCount;
Bias.RecommendedScore += 2;
Bias.bHasMethodDrillRecommendationSignal = true;
}
if (Entry.bUsedDeferredFirstSuppressionSignal)
{
++Bias.DeferredFirstRecommendedRecommendationCount;
@ -4993,7 +5058,8 @@ void UHyperTwistCoachDashboardWidget::RecordCoachHandoffHistorySnapshot(
const bool bQueueReady,
const bool bFollowUpReady,
const bool bRecommendedReady,
const bool bUsedDeferredFirstSuppressionSignal)
const bool bUsedDeferredFirstSuppressionSignal,
const bool bUsedMethodDrillWeighting)
{
FHyperTwistCoachDashboardHandoffHistoryEntry Entry;
Entry.RecordedAtUtc = FDateTime::UtcNow().ToIso8601();
@ -5019,12 +5085,19 @@ void UHyperTwistCoachDashboardWidget::RecordCoachHandoffHistorySnapshot(
CachedCoachQueueExecutionSummary.StartedDeferredOverflowFollowUpHandoffEventCount;
Entry.AcceptedDeferredOverflowRecommendedHandoffCount =
CachedCoachQueueExecutionSummary.StartedDeferredOverflowRecommendedHandoffEventCount;
Entry.AcceptedMethodDrillQueuedHandoffCount =
CachedCoachQueueExecutionSummary.StartedMethodDrillQueuedHandoffEventCount;
Entry.AcceptedMethodDrillFollowUpHandoffCount =
CachedCoachQueueExecutionSummary.StartedMethodDrillFollowUpHandoffEventCount;
Entry.AcceptedMethodDrillRecommendedHandoffCount =
CachedCoachQueueExecutionSummary.StartedMethodDrillRecommendedHandoffEventCount;
Entry.ClosureContinuationBias = ClosureContinuationBias;
Entry.ClosureSuppressionBias = ClosureSuppressionBias;
Entry.bQueueReady = bQueueReady;
Entry.bFollowUpReady = bFollowUpReady;
Entry.bRecommendedReady = bRecommendedReady;
Entry.bUsedDeferredFirstSuppressionSignal = bUsedDeferredFirstSuppressionSignal;
Entry.bUsedMethodDrillWeighting = bUsedMethodDrillWeighting;
if (!Entry.IsStructurallyValid())
{
return;
@ -5057,6 +5130,12 @@ void UHyperTwistCoachDashboardWidget::RecordCoachHandoffHistorySnapshot(
== Entry.AcceptedDeferredOverflowFollowUpHandoffCount
&& HandoffHistoryEntries.Last().AcceptedDeferredOverflowRecommendedHandoffCount
== Entry.AcceptedDeferredOverflowRecommendedHandoffCount
&& HandoffHistoryEntries.Last().AcceptedMethodDrillQueuedHandoffCount
== Entry.AcceptedMethodDrillQueuedHandoffCount
&& HandoffHistoryEntries.Last().AcceptedMethodDrillFollowUpHandoffCount
== Entry.AcceptedMethodDrillFollowUpHandoffCount
&& HandoffHistoryEntries.Last().AcceptedMethodDrillRecommendedHandoffCount
== Entry.AcceptedMethodDrillRecommendedHandoffCount
&& HandoffHistoryEntries.Last().ClosureContinuationBias
== Entry.ClosureContinuationBias
&& HandoffHistoryEntries.Last().ClosureSuppressionBias
@ -5065,7 +5144,9 @@ void UHyperTwistCoachDashboardWidget::RecordCoachHandoffHistorySnapshot(
&& HandoffHistoryEntries.Last().bFollowUpReady == Entry.bFollowUpReady
&& HandoffHistoryEntries.Last().bRecommendedReady == Entry.bRecommendedReady
&& HandoffHistoryEntries.Last().bUsedDeferredFirstSuppressionSignal
== Entry.bUsedDeferredFirstSuppressionSignal;
== Entry.bUsedDeferredFirstSuppressionSignal
&& HandoffHistoryEntries.Last().bUsedMethodDrillWeighting
== Entry.bUsedMethodDrillWeighting;
if (bMatchesLastEntry)
{
return;
@ -6289,7 +6370,8 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation()
bQueueReadyForHandoff,
bFollowUpReadyForHandoff,
bRecommendedReadyForHandoff,
bHandoffRecommendationUsedDeferredFirstSuppressionSignal
bHandoffRecommendationUsedDeferredFirstSuppressionSignal,
bHandoffRecommendationUsedMethodDrillWeighting
);
FString QueuedRunLabel = CachedCoachPanelState.NextQueueSourceLabel.IsEmpty()
? TEXT("Start Queue")
@ -6335,14 +6417,18 @@ 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 | deferred-first suppression recommendation used: %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 | deferred-overflow queued/follow-up/recommended: %d/%d/%d | drill-driven queued/follow-up/recommended: %d/%d/%d | deferred-first suppression recommendation used: %s | drill weighting used: %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->AcceptedDeferredOverflowQueuedHandoffCount,
SelectedHandoffHistoryEntry->AcceptedDeferredOverflowFollowUpHandoffCount,
SelectedHandoffHistoryEntry->AcceptedDeferredOverflowRecommendedHandoffCount,
SelectedHandoffHistoryEntry->AcceptedMethodDrillQueuedHandoffCount,
SelectedHandoffHistoryEntry->AcceptedMethodDrillFollowUpHandoffCount,
SelectedHandoffHistoryEntry->AcceptedMethodDrillRecommendedHandoffCount,
SelectedHandoffHistoryEntry->bUsedDeferredFirstSuppressionSignal ? TEXT("yes") : TEXT("no"),
SelectedHandoffHistoryEntry->bUsedMethodDrillWeighting ? TEXT("yes") : TEXT("no"),
SelectedHandoffHistoryEntry->QueueSourceLabel.IsEmpty()
? TEXT("n/a")
: *SelectedHandoffHistoryEntry->QueueSourceLabel,

View file

@ -252,12 +252,16 @@ struct FHyperTwistCoachDashboardHandoffHistoryEntry
int32 AcceptedDeferredOverflowQueuedHandoffCount = 0;
int32 AcceptedDeferredOverflowFollowUpHandoffCount = 0;
int32 AcceptedDeferredOverflowRecommendedHandoffCount = 0;
int32 AcceptedMethodDrillQueuedHandoffCount = 0;
int32 AcceptedMethodDrillFollowUpHandoffCount = 0;
int32 AcceptedMethodDrillRecommendedHandoffCount = 0;
int32 ClosureContinuationBias = 0;
int32 ClosureSuppressionBias = 0;
bool bQueueReady = false;
bool bFollowUpReady = false;
bool bRecommendedReady = false;
bool bUsedDeferredFirstSuppressionSignal = false;
bool bUsedMethodDrillWeighting = false;
bool IsStructurallyValid() const
{
@ -1249,7 +1253,8 @@ private:
bool bQueueReady,
bool bFollowUpReady,
bool bRecommendedReady,
bool bUsedDeferredFirstSuppressionSignal
bool bUsedDeferredFirstSuppressionSignal,
bool bUsedMethodDrillWeighting
);
void RecordQueueSuppressionSnapshot();
void RecordClosureRecoverySnapshot();