Reuse Guardian reviewer history for direct reviews (#61163)

## What changed

Route direct reviews through the reusable Guardian session so sequential `thread/guardianReview` calls on the same loaded thread can share review history with live approvals. Keep the reviewer conversation separate from the actor and follow the parent thread's persistence settings. Retries reassess the final call under the current policy.

## Testing

Extend app-server coverage to verify history reuse within a parent thread and isolation between parents. Extend the core scenario and snapshot to cover sequential direct reviews without executing the recorded commands.

GitOrigin-RevId: 5f10a04aec43a9351e38575265cb6b5ff06530a5
This commit is contained in:
swastik-oai
2026-11-12 18:30:45 +00:00
committed by copyberry
parent d2f7632472
commit e61a08f9ec
9 changed files with 213 additions and 131 deletions
@@ -1791,6 +1791,10 @@ pub struct ThreadReadResponse {
/// Calling `thread/guardianReview` subscribes the connection to the thread.
/// The subscription remains after the review completes, keeping the thread loaded
/// until the client calls `thread/unsubscribe` or disconnects.
/// Sequential calls on the same loaded thread can reuse Guardian history across
/// direct reviews and live approvals. The reviewer keeps a separate conversation
/// from the actor and follows the parent thread's normal persistence settings.
/// A retry evaluates the final call again under the current policy.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]