From 2d6e3955d925869715693b782c1742dcd4875c97 Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Thu, 7 May 2026 02:33:41 +0200 Subject: [PATCH] Explain confidence lanes in analytics tie-breaks --- .../HyperTwistCoachDashboardWidget.cpp | 49 ++++++++++++++- ...IDENCE_LANE_RATIONALE_PACKET_2026-05-07.md | 61 +++++++++++++++++++ 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 docs/arch/HYPERTWIST_PHASE4_TEMPLATE_LAUNCH_ANALYTICS_TIEBREAK_CONFIDENCE_LANE_RATIONALE_PACKET_2026-05-07.md diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp index 132f776..2d220c1 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp @@ -125,6 +125,11 @@ namespace HyperTwistCoachDashboardWidgetInternal const FHyperTwistTrainingTemplateLaunchScopedStats* TemplateStats ); + FString BuildTemplateLaunchComparablePeerConfidenceAuditClause( + const FHyperTwistTrainingTemplateLaunchScopedStats* TemplateStats, + const TCHAR* SubjectLabel + ); + bool HasTemplateLaunchComparablePeerEvidenceForConfidenceBonus( const FHyperTwistTrainingTemplateLaunchScopedStats* TemplateStats, int32* OutComparablePeerOutcomeRuns = nullptr, @@ -349,10 +354,15 @@ namespace HyperTwistCoachDashboardWidgetInternal } else { + const FString SelectedComparablePeerConfidenceAuditClause = + BuildTemplateLaunchComparablePeerConfidenceAuditClause( + SelectedStats, + TEXT("chosen template")); Provenance.DecisionSummaryLine = FString::Printf( - TEXT("Selector: tied with %s on primary dashboard priority; analytics preferred %s on broader template-scoped outcome signal without selector-split confidence support: chosen %s | peer %s."), + TEXT("Selector: tied with %s on primary dashboard priority; analytics preferred %s on broader template-scoped outcome signal without selector-split confidence support: %s | chosen %s | peer %s."), *ResolveDashboardTemplateLaunchDisplayTitle(PeerTemplate), *ResolveDashboardTemplateLaunchDisplayTitle(SelectedTemplate), + *SelectedComparablePeerConfidenceAuditClause, *BuildTemplateLaunchAnalyticsTieBreakSignalFragment(SelectedStats), *BuildTemplateLaunchAnalyticsTieBreakSignalFragment(PeerStats) ); @@ -663,6 +673,43 @@ namespace HyperTwistCoachDashboardWidgetInternal ); } + FString BuildTemplateLaunchComparablePeerConfidenceAuditClause( + const FHyperTwistTrainingTemplateLaunchScopedStats* TemplateStats, + const TCHAR* SubjectLabel + ) + { + const TCHAR* ResolvedSubjectLabel = + SubjectLabel != nullptr && SubjectLabel[0] != TEXT('\0') + ? SubjectLabel + : TEXT("template"); + if (TemplateStats == nullptr || !TemplateStats->IsStructurallyValid()) + { + return FString::Printf( + TEXT("%s has no retained comparable-peer confidence lane yet"), + ResolvedSubjectLabel + ); + } + + int32 ComparablePeerOutcomeRuns = 0; + int32 SplitConfidenceOutcomeRuns = 0; + int32 PeerNoEvidenceOutcomeRuns = 0; + float ComparablePeerOutcomeShare = 0.0f; + const bool bGuardEarned = HasTemplateLaunchComparablePeerEvidenceForConfidenceBonus( + TemplateStats, + &ComparablePeerOutcomeRuns, + &SplitConfidenceOutcomeRuns, + &ComparablePeerOutcomeShare, + &PeerNoEvidenceOutcomeRuns + ); + + return FString::Printf( + TEXT("%s split-confidence lane is currently %s under the comparable-peer guard: %s"), + ResolvedSubjectLabel, + bGuardEarned ? TEXT("confidence-eligible") : TEXT("suppressed"), + *BuildTemplateLaunchComparablePeerConfidenceLaneFragment(TemplateStats) + ); + } + FString BuildTemplateLaunchSelectionAnalyticsSupportDetailFragment( const FHyperTwistTrainingTemplateLaunchSelectionProvenance* SelectionProvenance ) diff --git a/docs/arch/HYPERTWIST_PHASE4_TEMPLATE_LAUNCH_ANALYTICS_TIEBREAK_CONFIDENCE_LANE_RATIONALE_PACKET_2026-05-07.md b/docs/arch/HYPERTWIST_PHASE4_TEMPLATE_LAUNCH_ANALYTICS_TIEBREAK_CONFIDENCE_LANE_RATIONALE_PACKET_2026-05-07.md new file mode 100644 index 0000000..a9af520 --- /dev/null +++ b/docs/arch/HYPERTWIST_PHASE4_TEMPLATE_LAUNCH_ANALYTICS_TIEBREAK_CONFIDENCE_LANE_RATIONALE_PACKET_2026-05-07.md @@ -0,0 +1,61 @@ +# HyperTwist Phase 4 template launch analytics tie-break confidence-lane rationale packet + +Created on `2026-05-07` + +Status: + +- first-party HyperTwist packet +- bounded Phase `4` dashboard selector rationale slice + +## Purpose + +This packet reuses the new comparable-peer confidence lanes inside the persisted analytics tie-break explanation itself. When a dashboard tie breaks on broader template-scoped outcome signal instead of `SelectorSplitConfidence`, the selector rationale now still says whether the chosen template's stored split-confidence lane is currently confidence-eligible or suppressed under the comparable-peer guard. + +## Scope + +Bounded lane: + +- add a small helper that converts the shared comparable-peer confidence lane data into a selector-rationale clause +- wire that helper only into the broader template-scoped outcome signal branch of analytics tie-break provenance +- keep the existing `SelectorSplitConfidence` rationale path unchanged +- let live launch detail, template history, and template-backed recap inherit the richer explanation through existing provenance plumbing + +Out of scope: + +- widening provenance schema +- changing selector policy or thresholds again +- changing repository aggregation +- adding another dashboard section + +## What landed + +Primary code changes: + +- `UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp` + - added a helper that turns comparable-peer confidence lanes into a concise audit clause + - broader outcome-signal tie-break rationale now says whether the chosen template's split-confidence lane is currently `confidence-eligible` or `suppressed` + - that rationale clause includes the same synthesized `comparable-peer-backed` vs `peer-no-evidence-heavy` lane data already shown in shared template analytics + +## Product effect + +Analytics tie-break audit is now more coherent: + +- if analytics pick a template on broader outcome signal, the rationale still shows where that template currently stands on future split-confidence reinforcement +- operators can compare the current tie-break reason against the template's comparable-peer confidence posture without leaving the persisted selector summary +- live `[Template Launch]`, template launch history, and template-backed recap all inherit that explanation automatically + +## Acceptance criteria + +- broader template-scoped outcome-signal tie-break rationale includes comparable-peer confidence eligibility or suppression +- rationale includes the synthesized confidence-lane view used elsewhere in shared template analytics +- live launch detail, template history, and recap all inherit the richer rationale through persisted provenance +- full product build succeeds + +## Validation checklist + +1. build `UnrealHyperTwist.sln` / `UnrealHyperTwistEditor` +2. confirm broader outcome-signal tie-break rationale mentions confidence-eligible or suppressed split-confidence lane status +3. confirm the same rationale includes the comparable-peer-backed vs peer-no-evidence-heavy lane view +4. confirm live detail, template history, and recap all inherit the richer rationale + +That is the packet.