diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp index 950bbef..996c419 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp @@ -562,7 +562,7 @@ namespace HyperTwistCoachDashboardWidgetInternal if (bUsedTemplateSignalSupportDecisionBiasSnapshotGuard) { Provenance.DecisionSummaryLine = FString::Printf( - TEXT("Selector: tied with %s on primary dashboard priority; analytics preferred %s on broader template-scoped outcome signal with earned-vs-non-earned support-bias snapshot guard reinforcement, then the decision-split guard tied again, and earned-vs-non-earned decision-bias snapshot history specifically broke the remaining tie: %s | chosen %s | peer %s."), + TEXT("Selector: tied with %s on primary dashboard priority; analytics preferred %s on broader template-scoped outcome signal with earned-vs-non-earned support-bias snapshot guard reinforcement, then the decision-split guard tied again, and earned-vs-non-earned decision-bias snapshot history only reinforced the winner after the reinforced lane also beat plain decision-split history: %s | chosen %s | peer %s."), *ResolveDashboardTemplateLaunchDisplayTitle(PeerTemplate), *ResolveDashboardTemplateLaunchDisplayTitle(SelectedTemplate), *SelectedComparablePeerConfidenceAuditClause, @@ -2148,6 +2148,19 @@ namespace HyperTwistCoachDashboardWidgetInternal constexpr float TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotMinimumMistakeImprovement = 0.5f; + constexpr int32 + TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumReinforcedOutcomeRuns = + 2; + constexpr int32 + TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumPlainDecisionSplitGuardOutcomeRuns = + 2; + constexpr int32 + TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumScoreDelta = 1; + constexpr float + TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumSuccessDelta = 0.05f; + constexpr float + TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumMistakeImprovement = + 0.5f; int32 CountTemplateLaunchOutcomeRuns(const FHyperTwistTrainingTemplateLaunchScopedStats* TemplateStats) { @@ -2718,12 +2731,70 @@ namespace HyperTwistCoachDashboardWidgetInternal - (EarnedStats != nullptr && EarnedStats->IsStructurallyValid() ? EarnedStats->AverageMistakesPerOutcomeRun : 0.0f); - return ScoreDelta + const bool bEarnedSnapshotBeatsComparison = + ScoreDelta >= TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotMinimumScoreDelta || SuccessDelta >= TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotMinimumSuccessDelta || MistakeImprovement >= TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotMinimumMistakeImprovement; + if (!bEarnedSnapshotBeatsComparison) + { + return false; + } + + const FHyperTwistTrainingTemplateLaunchSelectionScopedStats* ReinforcedStats = nullptr; + const FHyperTwistTrainingTemplateLaunchSelectionScopedStats* PlainDecisionSplitGuardStats = + nullptr; + if (TemplateStats != nullptr && TemplateStats->IsStructurallyValid()) + { + ReinforcedStats = + &TemplateStats + ->DashboardAnalyticsTieBreakTemplateScopedSignalSupportBiasSnapshotGuardDecisionSplitGuardDecisionBiasSnapshotGuardStats; + PlainDecisionSplitGuardStats = + &TemplateStats + ->DashboardAnalyticsTieBreakTemplateScopedSignalSupportBiasSnapshotGuardDecisionSplitGuardPlainStats; + } + + const int32 ReinforcedOutcomeRuns = CountTemplateLaunchSelectionOutcomeRuns( + ReinforcedStats); + const int32 PlainDecisionSplitGuardOutcomeRuns = CountTemplateLaunchSelectionOutcomeRuns( + PlainDecisionSplitGuardStats); + if (ReinforcedOutcomeRuns + < TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumReinforcedOutcomeRuns + || PlainDecisionSplitGuardOutcomeRuns + < TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumPlainDecisionSplitGuardOutcomeRuns) + { + return false; + } + + const int32 ReinforcedScore = + BuildTemplateLaunchSelectionLaneAnalyticsScore(ReinforcedStats); + const int32 PlainDecisionSplitGuardScore = + BuildTemplateLaunchSelectionLaneAnalyticsScore(PlainDecisionSplitGuardStats); + const int32 ReinforcedScoreDelta = ReinforcedScore - PlainDecisionSplitGuardScore; + const float ReinforcedSuccessDelta = + (ReinforcedStats != nullptr && ReinforcedStats->IsStructurallyValid() + ? ReinforcedStats->OverallSuccessRate + : 0.0f) + - (PlainDecisionSplitGuardStats != nullptr + && PlainDecisionSplitGuardStats->IsStructurallyValid() + ? PlainDecisionSplitGuardStats->OverallSuccessRate + : 0.0f); + const float ReinforcedMistakeImprovement = + (PlainDecisionSplitGuardStats != nullptr + && PlainDecisionSplitGuardStats->IsStructurallyValid() + ? PlainDecisionSplitGuardStats->AverageMistakesPerOutcomeRun + : 0.0f) + - (ReinforcedStats != nullptr && ReinforcedStats->IsStructurallyValid() + ? ReinforcedStats->AverageMistakesPerOutcomeRun + : 0.0f); + return ReinforcedScoreDelta + >= TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumScoreDelta + || ReinforcedSuccessDelta + >= TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumSuccessDelta + || ReinforcedMistakeImprovement + >= TemplateLaunchTemplateSignalSupportDecisionBiasSnapshotGuardMinimumMistakeImprovement; } int32 BuildTemplateLaunchAnalyticsTieBreakConfidenceBonus( diff --git a/docs/HYPERTWIST_ROADMAP_OVERHAUL_EXPANSION_GUIDE.md b/docs/HYPERTWIST_ROADMAP_OVERHAUL_EXPANSION_GUIDE.md index 07eb2ed..8103a51 100644 --- a/docs/HYPERTWIST_ROADMAP_OVERHAUL_EXPANSION_GUIDE.md +++ b/docs/HYPERTWIST_ROADMAP_OVERHAUL_EXPANSION_GUIDE.md @@ -65,7 +65,10 @@ Current correction call from the source-exposed audit and current execution refr - pre-Phase-5 speech governance gates - retained benchmark-oracle and mirror-intake reservations - current code reality in which training/coaching/catalog integration is materially ahead of recognition and hypercube runtime implementation - - the imported generated-mode gap, where request/config/selection plumbing exists but the actual clean-room executor is still absent + - the imported generated-mode gap is closed; request/config/selection plumbing and the bounded clean-room executor are already landed in first-party code + - the latest landed bounded `Phase 4` packet closes the dashboard template-launch analytics refinement lane above the already-landed recognition/review/queue continuity surfaces + - that closure now requires reinforced-vs-plain `DecisionSplitGuard` historical advantage before the final decision-bias snapshot guard can reinforce broader template-selection ties + - the current next bounded packet is the final full recognition-assisted coach-to-review closure validation pass across replay pressure, queue launch, post-clear review rehydration, post-clear action-plan rehydration, post-clear review resumption, final carryover consumption, review-program exhaustion, and truthful idle dashboard closure - the current execution-discipline rule that broad refactor / monolith-splitting work should not interrupt the active bounded roadmap packet unless structure is actually blocking it ## Current execution-reality references diff --git a/docs/arch/HYPERTWIST_PHASE4_TEMPLATE_SIGNAL_DECISION_BIAS_SNAPSHOT_GUARD_SELECTION_PACKET_2026-05-07.md b/docs/arch/HYPERTWIST_PHASE4_TEMPLATE_SIGNAL_DECISION_BIAS_SNAPSHOT_GUARD_SELECTION_PACKET_2026-05-07.md new file mode 100644 index 0000000..31bc452 --- /dev/null +++ b/docs/arch/HYPERTWIST_PHASE4_TEMPLATE_SIGNAL_DECISION_BIAS_SNAPSHOT_GUARD_SELECTION_PACKET_2026-05-07.md @@ -0,0 +1,53 @@ +# HyperTwist Phase 4 template-signal decision-bias snapshot guard selection packet + +## Purpose + +This packet feeds the new plain-vs-history-reinforced `DecisionSplitGuard` analytics split back into actual broader template selection. The final historical decision-bias snapshot guard now reinforces tied broader template-analytics choices only when its reinforced `DecisionSplitGuard` outcomes are meaningfully beating plain decision-split history instead of merely existing. + +## Scope + +- tighten the final broader template-analytics reinforcement guard inside `ResolveTemplateAnalyticsPreferenceDecision(...)` +- keep the existing earned-vs-non-earned decision-bias snapshot comparison as a prerequisite +- add a second minimum-sample comparison between: + - `plain-decision-split-guard` + - `decision-bias-snapshot-guard` +- require the reinforced lane to beat the plain decision-split lane on lane score or show meaningful success / mistake improvement before the final snapshot guard can award a tied-selection preference + +## What landed + +- `HyperTwistCoachDashboardWidget.cpp` + - widened `HasTemplateLaunchTemplateSignalSupportDecisionBiasSnapshotBias(...)` + - the final decision-bias snapshot guard now exits early unless: + - earned snapshot-guard history beats suppressed/no-retained decision-bias-snapshot history + - and the reinforced `DecisionSplitGuard` lane has enough outcome history to beat plain decision-split history + - updated the template launch decision summary line so at-launch provenance states that the final reinforcement only happened after reinforced history beat plain decision-split history + +## Product effect + +- broader template-scoped outcome-signal ties are now more conservative at the final reinforcement step +- the decision-bias snapshot guard no longer activates just because some reinforced history exists +- operators can trust that a final snapshot-guard reinforcement implies: + - earned-vs-non-earned decision-bias snapshot history is favorable + - and reinforced `DecisionSplitGuard` history is already outperforming plain decision-split history with minimum sample depth + +## Acceptance criteria + +- the final broader template-analytics decision-bias snapshot guard still requires the earlier earned-vs-non-earned snapshot advantage +- reinforced `DecisionSplitGuard` history must now also beat plain decision-split history with minimum sample depth before the guard can reinforce selection +- sparse reinforced or plain decision-split history suppresses the final reinforcement +- full `Development Editor|Win64` build succeeds + +## Validation checklist + +1. full `Development Editor|Win64` build succeeds +2. confirm `HasTemplateLaunchTemplateSignalSupportDecisionBiasSnapshotBias(...)` now checks reinforced-vs-plain decision-split history after the earned-vs-non-earned snapshot comparison passes +3. confirm the new reinforced-vs-plain gate requires minimum sample depth on both lanes +4. confirm template launch provenance states that the final reinforcement only happened after reinforced history beat plain decision-split history + +## Validation result + +- full `Development Editor|Win64` build succeeded on `2026-05-07` + +## Next bounded follow-on slice + +- run the final full recognition-assisted coach-to-review closure validation pass across replay pressure, queue launch, post-clear review rehydration, post-clear action-plan rehydration, post-clear review resumption, final carryover consumption, review-program exhaustion, and truthful idle dashboard closure