# HyperTwist Phase 4 idle review-plan continuity packet

Created on `2026-05-06`

Status:

- first-party HyperTwist packet
- bounded Phase `4` coach-to-review validation slice

## Purpose

This packet closes the next post-clear review continuity gap in the live recognition-assisted coach-to-review loop.

The open tasks are:

- keep the stored pending review plan materialized in runtime state after `ClearActiveRun()` while carryover still exists
- let dashboard/runtime review-policy inspection continue to reflect the repository-backed pending plan until the review program is genuinely exhausted

It is not:

- a new review-policy heuristic packet
- a queue-priority packet
- a dashboard layout redesign
- a recognition transport packet

## Scope

Bounded lane:

- rehydrate `ActiveReviewPlanState` from the repository-backed review program summary when there is no active run
- prefer `CurrentPlanId`, then `NextPlanId`, as the idle review-plan continuity target
- clear runtime review-plan state when repository context or repository-backed pending-plan state no longer exists
- keep the existing active-run review-plan path unchanged

Out of scope:

- new review recommendation scoring
- review-plan ordering redesign
- queue-memory retuning
- broad dashboard copy changes

## Why this was the right next packet

Before this slice:

- review finalization already preserved carryover instead of force-closing plans
- clear-run repository-view continuity was already landed
- post-clear queue retirement was already landed

But one continuity break still remained:

- once `ClearActiveRun()` reset `ActiveReviewPlanState`, the subsystem no longer rehydrated the stored pending review plan from repository state during idle repository refresh

That meant:

- `ActiveReviewProgramSummary` could still show pending carryover
- coach guidance could still point at review recovery pressure
- but runtime/dashboard review inspection fell back to "no active review policy is materialized" because the actual pending plan state was no longer live in memory

So the next honest move was:

- rehydrate the pending review plan from repository state during idle refresh, and clear it only when repository context or pending-plan state is truly gone

## What landed

Primary code changes:

- `UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp`
  - when no active run exists, repository refresh now reloads `ActiveReviewPlanState` from `CurrentPlanId` or `NextPlanId` in `ActiveReviewProgramSummary`
  - idle review-plan hydration is constrained to the retained repository-view user context
  - repository refresh now also clears `ActiveReviewPlanState` when repository view context cannot be resolved

## Product effect

The idle review lane is now more truthful:

- pending carryover review plans stay inspectable after run clear
- dashboard/runtime review-policy inspection stays aligned with repository-backed review-program state while carryover remains open
- once the review program is truly exhausted, the hydrated review-plan state collapses cleanly instead of lingering

## Acceptance criteria

- after `ClearActiveRun()`, a stored pending review plan is rehydrated from repository state when carryover still exists
- review-policy inspection continues to show the repository-backed active review plan during idle carryover
- runtime review-plan state clears when repository context or pending-plan state disappears
- active-run review-plan behavior remains unchanged
- full product build succeeds

## Validation checklist

1. build `UnrealHyperTwist.sln` / `UnrealHyperTwistEditor`
2. confirm idle repository refresh rehydrates the stored pending review plan from `CurrentPlanId` or `NextPlanId`
3. confirm review-plan inspection remains live after `ClearActiveRun()` while carryover exists
4. confirm runtime review-plan state clears when repository context or pending review state is gone
5. confirm no broader review-policy or queue redesign was reopened

That is the packet.
