diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp index 8dd93d9..769442c 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp @@ -6095,6 +6095,18 @@ void UHyperTwistTrainingSubsystem::RefreshRepositoryViews() ResolvedReferenceUtc ) : FHyperTwistTrainingCoachActionClosureSummary(); + const bool bShouldCollapseRetainedIdleCoachActionability = + !bHasActiveRunContext + && !RetainedRepositoryViewUserId.IsEmpty() + && !ActiveReviewProgramSummary.LastCompletedPlanId.IsEmpty() + && ActiveReviewProgramSummary.PendingPlanCount == 0 + && !ActiveReviewProgramSummary.bHasCarryover + && !ActiveReviewPlanState.IsStructurallyValid() + && ActiveCoachActionClosureSummary.IsStructurallyValid() + && ActiveCoachActionClosureSummary.bSequenceClosed + && !ActiveCoachActionClosureSummary.bShouldSpawnFollowUp + && !ActiveCoachActionClosureSummary.bNeedsEscalation + && !ActiveCoachActionSequenceSummary.bHasOpenPlan; FHyperTwistTrainingSessionSummary RepositoryViewSessionSummary = bHasActiveRunContext ? ActiveRunSummary : FHyperTwistTrainingSessionSummary(); @@ -6154,6 +6166,7 @@ void UHyperTwistTrainingSubsystem::RefreshRepositoryViews() ActiveCoachSignals = ActiveCoachBrief.Signals; } const bool bShouldDeriveCoachFollowUpBrief = ActiveCoachActionPlanOutcomeSummary.IsStructurallyValid() + && !bShouldCollapseRetainedIdleCoachActionability && ( ActiveCoachActionClosureSummary.bShouldSpawnFollowUp || ( @@ -6165,6 +6178,27 @@ void UHyperTwistTrainingSubsystem::RefreshRepositoryViews() ); const auto RebuildActiveCoachQueueDerivedState = [&]() { + if (bShouldCollapseRetainedIdleCoachActionability) + { + ActiveCoachFollowUpBrief = FHyperTwistCoachBrief(); + ActiveCoachSessionQueueSummary = FHyperTwistCoachSessionQueueSummary(); + const FString QueueStateUserId = !ActiveCoachSessionQueueState.UserId.IsEmpty() + ? ActiveCoachSessionQueueState.UserId + : RepositoryViewUserId; + if (!QueueStateUserId.IsEmpty()) + { + TrainingRepositoryState = UHyperTwistTrainingRepositoryLibrary::RemoveCoachSessionQueueState( + TrainingRepositoryState, + QueueStateUserId, + HyperTwistTrainingSubsystemInternal::ActiveCoachSessionQueueId + ); + } + ActiveCoachSessionQueueState = FHyperTwistTrainingCoachSessionQueueState(); + ActiveCoachScheduleHorizonSummary = FHyperTwistCoachScheduleHorizonSummary(); + ActiveCoachSchedulePolicySummary = FHyperTwistCoachSchedulePolicySummary(); + ActiveCoachSessionQueueExecutionSummary = FHyperTwistTrainingCoachSessionQueueExecutionSummary(); + return; + } ActiveCoachFollowUpBrief = bShouldDeriveCoachFollowUpBrief ? UHyperTwistTrainingCoachLibrary::DeriveCoachFollowUpBrief( ActiveCoachBrief, diff --git a/docs/HYPERTWIST_ROADMAP_OVERHAUL_EXPANSION_GUIDE.md b/docs/HYPERTWIST_ROADMAP_OVERHAUL_EXPANSION_GUIDE.md index e66d58c..4bea5e2 100644 --- a/docs/HYPERTWIST_ROADMAP_OVERHAUL_EXPANSION_GUIDE.md +++ b/docs/HYPERTWIST_ROADMAP_OVERHAUL_EXPANSION_GUIDE.md @@ -66,9 +66,9 @@ Current correction call from the source-exposed audit and current execution refr - 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 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 carryover-review sequence-closure gap inside the already-live recognition-assisted coach-to-review continuity lane - - later carry-forward plans can now actually retire earlier unresolved follow-up and deferred-launch pressure in repository sequence/closure summaries instead of inheriting that pressure forever - - the current next bounded packet is to continue the same recognition-assisted coach-to-review closure validation pass at the final idle boundary, landing only the next continuity fix if stale follow-up, queue, or recommended actionability still survives after queue-backed carryover work and sequence pressure are both truly exhausted + - the latest landed bounded `Phase 4` packet closes the retained-idle actionability gap at the end of the already-live recognition-assisted coach-to-review continuity lane + - retained post-review refresh now stops rebuilding follow-up and queue actionability once review carryover is exhausted and the coach sequence is already closed underneath + - the current next bounded packet is to verify the retained idle dashboard/widget surface against that now-collapsed subsystem state and land only a presentation fix if stale follow-up, queue, or recommended narration still survives above it - 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_RETAINED_IDLE_ACTIONABILITY_CLOSURE_PACKET_2026-05-07.md b/docs/arch/HYPERTWIST_PHASE4_RETAINED_IDLE_ACTIONABILITY_CLOSURE_PACKET_2026-05-07.md new file mode 100644 index 0000000..f487b05 --- /dev/null +++ b/docs/arch/HYPERTWIST_PHASE4_RETAINED_IDLE_ACTIONABILITY_CLOSURE_PACKET_2026-05-07.md @@ -0,0 +1,108 @@ +# HyperTwist Phase 4 retained idle actionability closure packet + +Created on `2026-05-07` + +Status: + +- first-party HyperTwist packet +- bounded Phase `4` coach-to-review validation slice + +## Purpose + +This packet closes the last retained-idle actionability seam after queue-backed carryover work and coach-sequence pressure are both already exhausted. + +The open tasks are: + +- stop rebuilding follow-up and queue state from retained coach context after the completed review program has no carryover left and the coach action sequence is already closed +- stop leaving any retained active queue state behind once that same closed sequence has reached truthful idle + +It is not: + +- a new review-plan packet +- a new queue-priority packet +- a broader coach-memory redesign +- a dashboard layout rewrite + +## Scope + +Bounded lane: + +- detect the retained post-review state where: + - no run is active + - retained repository view context is still present + - the completed review program has no pending successor and no carryover + - no active review plan remains + - the coach action sequence is closed without follow-up or escalation pressure +- suppress follow-up brief derivation in that state +- remove any stored active queue state and clear derived queue/schedule execution state in that state +- leave retained repository summaries and closure history intact + +Out of scope: + +- changing coach signal scoring +- changing queue ordering heuristics +- rewriting dashboard presentation logic +- widening into unrelated analytics or template-selection work + +## Why this was the right next packet + +Before this slice: + +- resumed carryover review launches already restored review-plan lineage +- resumed carryover review launches already restored action-plan lineage +- resumed carryover review launches already restored matching queue execution lineage +- carry-forward sequence summaries could already retire earlier unresolved pressure when later plans cleared it + +But one continuity seam still remained: + +- retained refresh could still rebuild a follow-up brief and a fresh queue summary from coach memory even after the review program had no carryover and the coach sequence was already closed + +That meant: + +- the underlying repository closure state could already be truthful +- while retained idle refresh could still leave actionable queue or follow-up state alive above it + +So the next honest move was: + +- detect that truly closed retained-idle boundary directly in refresh +- and collapse follow-up plus queue reconstruction there instead of letting retained coach context recreate actionability + +## What landed + +Primary code changes: + +- `UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp` + - `RefreshRepositoryViews()` now computes `bShouldCollapseRetainedIdleCoachActionability` from exhausted review-program state plus closed coach-sequence state + - follow-up brief derivation is skipped in that state + - queue refresh removes the stored active queue state, clears queue/schedule execution summaries, and returns without rebuilding new queue actionability in that state + +## Product effect + +The final idle boundary is now more truthful: + +- retained post-review refresh no longer recreates follow-up or queue actionability after carryover and sequence pressure are both gone +- stored active queue state no longer survives that already-closed boundary +- retained repository context and closure history remain available for inspection without pretending that another coach action is still pending + +## Acceptance criteria + +- when retained post-review context has no active run, no active review plan, no carryover, and a closed coach sequence with no follow-up or escalation pressure, refresh does not rebuild follow-up or queue actionability +- any stored active queue state is removed in that state +- retained repository inspection context remains available +- full product build succeeds + +## Validation checklist + +1. build `UnrealHyperTwist.sln` / `UnrealHyperTwistEditor` +2. confirm retained post-review closure state skips follow-up brief derivation +3. confirm retained post-review closure state removes stored active queue state instead of rebuilding it +4. confirm retained repository summaries and closure history remain intact +5. confirm no broader coach-memory or dashboard redesign was reopened + +## Validation result + +- full `Development Editor|Win64` build succeeded on `2026-05-07` + +## Next bounded follow-on slice + +- verify the retained idle dashboard/widget surface against this now-collapsed panel state and land only a presentation fix if any stale follow-up, queue, or recommended narration still survives above the already-idle subsystem state