From 3425d7ab7026ab577decd1b7e9770387ad645895 Mon Sep 17 00:00:00 2001 From: won Date: Wed, 15 Apr 2026 14:29:52 -0700 Subject: [PATCH] rebrand guardian to auto-review --- .../schema/json/ClientRequest.json | 2 +- .../schema/json/ServerNotification.json | 14 +++++------ .../codex_app_server_protocol.schemas.json | 16 ++++++------- .../codex_app_server_protocol.v2.schemas.json | 16 ++++++------- .../schema/json/v2/ConfigReadResponse.json | 2 +- .../v2/ConfigRequirementsReadResponse.json | 2 +- ...anApprovalReviewCompletedNotification.json | 12 +++++----- ...dianApprovalReviewStartedNotification.json | 10 ++++---- .../schema/json/v2/ThreadForkParams.json | 2 +- .../schema/json/v2/ThreadForkResponse.json | 2 +- .../schema/json/v2/ThreadResumeParams.json | 2 +- .../schema/json/v2/ThreadResumeResponse.json | 2 +- .../schema/json/v2/ThreadStartParams.json | 2 +- .../schema/json/v2/ThreadStartResponse.json | 2 +- .../schema/json/v2/TurnStartParams.json | 2 +- .../schema/typescript/v2/ApprovalsReviewer.ts | 4 ++-- .../typescript/v2/AutoReviewDecisionSource.ts | 2 +- .../typescript/v2/GuardianApprovalReview.ts | 2 +- .../v2/GuardianApprovalReviewStatus.ts | 2 +- .../schema/typescript/v2/GuardianRiskLevel.ts | 2 +- .../v2/GuardianUserAuthorization.ts | 2 +- ...dianApprovalReviewCompletedNotification.ts | 4 ++-- ...ardianApprovalReviewStartedNotification.ts | 4 ++-- .../app-server-protocol/src/protocol/v2.rs | 22 ++++++++--------- codex-rs/app-server/README.md | 8 +++---- codex-rs/core/src/guardian/review.rs | 2 +- codex-rs/features/src/lib.rs | 4 ++-- codex-rs/features/src/tests.rs | 4 ++-- codex-rs/tui/src/app.rs | 22 ++++++++--------- codex-rs/tui/src/chatwidget.rs | 6 ++--- .../tui/src/chatwidget/tests/permissions.rs | 24 +++++++++---------- .../chatwidget/tests/popups_and_settings.rs | 4 ++-- 32 files changed, 103 insertions(+), 103 deletions(-) diff --git a/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/codex-rs/app-server-protocol/schema/json/ClientRequest.json index a2659bd234a..5fb690a31e2 100644 --- a/codex-rs/app-server-protocol/schema/json/ClientRequest.json +++ b/codex-rs/app-server-protocol/schema/json/ClientRequest.json @@ -6,7 +6,7 @@ "type": "string" }, "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/codex-rs/app-server-protocol/schema/json/ServerNotification.json index 4edff15748a..012940d7699 100644 --- a/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -389,7 +389,7 @@ ] }, "AutoReviewDecisionSource": { - "description": "[UNSTABLE] Source that produced a terminal guardian approval review decision.", + "description": "[UNSTABLE] Source that produced a terminal approval auto-review decision.", "enum": [ "agent" ], @@ -1135,7 +1135,7 @@ "type": "object" }, "GuardianApprovalReview": { - "description": "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", "properties": { "rationale": { "type": [ @@ -1343,7 +1343,7 @@ ] }, "GuardianApprovalReviewStatus": { - "description": "[UNSTABLE] Lifecycle state for a guardian approval review.", + "description": "[UNSTABLE] Lifecycle state for an approval auto-review.", "enum": [ "inProgress", "approved", @@ -1361,7 +1361,7 @@ "type": "string" }, "GuardianRiskLevel": { - "description": "[UNSTABLE] Risk level assigned by guardian approval review.", + "description": "[UNSTABLE] Risk level assigned by approval auto-review.", "enum": [ "low", "medium", @@ -1371,7 +1371,7 @@ "type": "string" }, "GuardianUserAuthorization": { - "description": "[UNSTABLE] Authorization level assigned by guardian approval review.", + "description": "[UNSTABLE] Authorization level assigned by approval auto-review.", "enum": [ "unknown", "low", @@ -1596,7 +1596,7 @@ "type": "object" }, "ItemGuardianApprovalReviewCompletedNotification": { - "description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", "properties": { "action": { "$ref": "#/definitions/GuardianApprovalReviewAction" @@ -1636,7 +1636,7 @@ "type": "object" }, "ItemGuardianApprovalReviewStartedNotification": { - "description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", "properties": { "action": { "$ref": "#/definitions/GuardianApprovalReviewAction" diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index ec3db749457..3ecd1e01f06 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -5461,7 +5461,7 @@ "type": "object" }, "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" @@ -5637,7 +5637,7 @@ ] }, "AutoReviewDecisionSource": { - "description": "[UNSTABLE] Source that produced a terminal guardian approval review decision.", + "description": "[UNSTABLE] Source that produced a terminal approval auto-review decision.", "enum": [ "agent" ], @@ -8198,7 +8198,7 @@ "type": "object" }, "GuardianApprovalReview": { - "description": "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", "properties": { "rationale": { "type": [ @@ -8406,7 +8406,7 @@ ] }, "GuardianApprovalReviewStatus": { - "description": "[UNSTABLE] Lifecycle state for a guardian approval review.", + "description": "[UNSTABLE] Lifecycle state for an approval auto-review.", "enum": [ "inProgress", "approved", @@ -8424,7 +8424,7 @@ "type": "string" }, "GuardianRiskLevel": { - "description": "[UNSTABLE] Risk level assigned by guardian approval review.", + "description": "[UNSTABLE] Risk level assigned by approval auto-review.", "enum": [ "low", "medium", @@ -8434,7 +8434,7 @@ "type": "string" }, "GuardianUserAuthorization": { - "description": "[UNSTABLE] Authorization level assigned by guardian approval review.", + "description": "[UNSTABLE] Authorization level assigned by approval auto-review.", "enum": [ "unknown", "low", @@ -8694,7 +8694,7 @@ }, "ItemGuardianApprovalReviewCompletedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", "properties": { "action": { "$ref": "#/definitions/v2/GuardianApprovalReviewAction" @@ -8736,7 +8736,7 @@ }, "ItemGuardianApprovalReviewStartedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", "properties": { "action": { "$ref": "#/definitions/v2/GuardianApprovalReviewAction" diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 9294e533f34..e782744c924 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -540,7 +540,7 @@ "type": "object" }, "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" @@ -716,7 +716,7 @@ ] }, "AutoReviewDecisionSource": { - "description": "[UNSTABLE] Source that produced a terminal guardian approval review decision.", + "description": "[UNSTABLE] Source that produced a terminal approval auto-review decision.", "enum": [ "agent" ], @@ -4930,7 +4930,7 @@ "type": "object" }, "GuardianApprovalReview": { - "description": "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", "properties": { "rationale": { "type": [ @@ -5138,7 +5138,7 @@ ] }, "GuardianApprovalReviewStatus": { - "description": "[UNSTABLE] Lifecycle state for a guardian approval review.", + "description": "[UNSTABLE] Lifecycle state for an approval auto-review.", "enum": [ "inProgress", "approved", @@ -5156,7 +5156,7 @@ "type": "string" }, "GuardianRiskLevel": { - "description": "[UNSTABLE] Risk level assigned by guardian approval review.", + "description": "[UNSTABLE] Risk level assigned by approval auto-review.", "enum": [ "low", "medium", @@ -5166,7 +5166,7 @@ "type": "string" }, "GuardianUserAuthorization": { - "description": "[UNSTABLE] Authorization level assigned by guardian approval review.", + "description": "[UNSTABLE] Authorization level assigned by approval auto-review.", "enum": [ "unknown", "low", @@ -5470,7 +5470,7 @@ }, "ItemGuardianApprovalReviewCompletedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", "properties": { "action": { "$ref": "#/definitions/GuardianApprovalReviewAction" @@ -5512,7 +5512,7 @@ }, "ItemGuardianApprovalReviewStartedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", "properties": { "action": { "$ref": "#/definitions/GuardianApprovalReviewAction" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json index 58f8186266f..b52a1f0feaa 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json @@ -97,7 +97,7 @@ "type": "object" }, "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ConfigRequirementsReadResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ConfigRequirementsReadResponse.json index 614575a9555..3a5f63a675b 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ConfigRequirementsReadResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ConfigRequirementsReadResponse.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewCompletedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewCompletedNotification.json index 590a7a5d65d..8be611c0af3 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewCompletedNotification.json @@ -2,14 +2,14 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "AutoReviewDecisionSource": { - "description": "[UNSTABLE] Source that produced a terminal guardian approval review decision.", + "description": "[UNSTABLE] Source that produced a terminal approval auto-review decision.", "enum": [ "agent" ], "type": "string" }, "GuardianApprovalReview": { - "description": "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", "properties": { "rationale": { "type": [ @@ -217,7 +217,7 @@ ] }, "GuardianApprovalReviewStatus": { - "description": "[UNSTABLE] Lifecycle state for a guardian approval review.", + "description": "[UNSTABLE] Lifecycle state for an approval auto-review.", "enum": [ "inProgress", "approved", @@ -235,7 +235,7 @@ "type": "string" }, "GuardianRiskLevel": { - "description": "[UNSTABLE] Risk level assigned by guardian approval review.", + "description": "[UNSTABLE] Risk level assigned by approval auto-review.", "enum": [ "low", "medium", @@ -245,7 +245,7 @@ "type": "string" }, "GuardianUserAuthorization": { - "description": "[UNSTABLE] Authorization level assigned by guardian approval review.", + "description": "[UNSTABLE] Authorization level assigned by approval auto-review.", "enum": [ "unknown", "low", @@ -264,7 +264,7 @@ "type": "string" } }, - "description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", "properties": { "action": { "$ref": "#/definitions/GuardianApprovalReviewAction" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewStartedNotification.json index fdb01f27e54..f25280369ff 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewStartedNotification.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "GuardianApprovalReview": { - "description": "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", "properties": { "rationale": { "type": [ @@ -210,7 +210,7 @@ ] }, "GuardianApprovalReviewStatus": { - "description": "[UNSTABLE] Lifecycle state for a guardian approval review.", + "description": "[UNSTABLE] Lifecycle state for an approval auto-review.", "enum": [ "inProgress", "approved", @@ -228,7 +228,7 @@ "type": "string" }, "GuardianRiskLevel": { - "description": "[UNSTABLE] Risk level assigned by guardian approval review.", + "description": "[UNSTABLE] Risk level assigned by approval auto-review.", "enum": [ "low", "medium", @@ -238,7 +238,7 @@ "type": "string" }, "GuardianUserAuthorization": { - "description": "[UNSTABLE] Authorization level assigned by guardian approval review.", + "description": "[UNSTABLE] Authorization level assigned by approval auto-review.", "enum": [ "unknown", "low", @@ -257,7 +257,7 @@ "type": "string" } }, - "description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", "properties": { "action": { "$ref": "#/definitions/GuardianApprovalReviewAction" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkParams.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkParams.json index a8fa95e2e99..c828754da53 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkParams.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkParams.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json index 5af02d344ee..e784b234d53 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json @@ -9,7 +9,7 @@ "type": "string" }, "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeParams.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeParams.json index 3c8eb552ae8..b78ec265024 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeParams.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeParams.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json index d888485d15b..cc01ac9aabd 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json @@ -9,7 +9,7 @@ "type": "string" }, "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartParams.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartParams.json index 21f4d7ef744..ac9de0dea6d 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartParams.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartParams.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json index 7a0e0830938..790e17c92ce 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json @@ -9,7 +9,7 @@ "type": "string" }, "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/json/v2/TurnStartParams.json b/codex-rs/app-server-protocol/schema/json/v2/TurnStartParams.json index cad1d8b5bc9..e1dc06b05a4 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnStartParams.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnStartParams.json @@ -6,7 +6,7 @@ "type": "string" }, "ApprovalsReviewer": { - "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses the auto-reviewer subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", "enum": [ "user", "guardian_subagent" diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ApprovalsReviewer.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ApprovalsReviewer.ts index a5a26ae0e40..47a522cd2c6 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ApprovalsReviewer.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ApprovalsReviewer.ts @@ -5,8 +5,8 @@ /** * Configures who approval requests are routed to for review. Examples * include sandbox escapes, blocked network access, MCP approval prompts, and - * ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully - * prompted subagent to gather relevant context and apply a risk-based + * ARC escalations. Defaults to `user`. `guardian_subagent` uses the + * auto-reviewer subagent to gather relevant context and apply a risk-based * decision framework before approving or denying the request. */ export type ApprovalsReviewer = "user" | "guardian_subagent"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AutoReviewDecisionSource.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AutoReviewDecisionSource.ts index aa776c8ca5c..8806981237f 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AutoReviewDecisionSource.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/AutoReviewDecisionSource.ts @@ -3,6 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. /** - * [UNSTABLE] Source that produced a terminal guardian approval review decision. + * [UNSTABLE] Source that produced a terminal approval auto-review decision. */ export type AutoReviewDecisionSource = "agent"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.ts b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.ts index 0cdb12cc73c..11d797eb194 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.ts @@ -6,7 +6,7 @@ import type { GuardianRiskLevel } from "./GuardianRiskLevel"; import type { GuardianUserAuthorization } from "./GuardianUserAuthorization"; /** - * [UNSTABLE] Temporary guardian approval review payload used by + * [UNSTABLE] Temporary approval auto-review payload used by * `item/autoApprovalReview/*` notifications. This shape is expected to change * soon. */ diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReviewStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReviewStatus.ts index ae59854bde7..ae892572f5d 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReviewStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReviewStatus.ts @@ -3,6 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. /** - * [UNSTABLE] Lifecycle state for a guardian approval review. + * [UNSTABLE] Lifecycle state for an approval auto-review. */ export type GuardianApprovalReviewStatus = "inProgress" | "approved" | "denied" | "timedOut" | "aborted"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianRiskLevel.ts b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianRiskLevel.ts index 24e36716004..7734016aa87 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianRiskLevel.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianRiskLevel.ts @@ -3,6 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. /** - * [UNSTABLE] Risk level assigned by guardian approval review. + * [UNSTABLE] Risk level assigned by approval auto-review. */ export type GuardianRiskLevel = "low" | "medium" | "high" | "critical"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianUserAuthorization.ts b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianUserAuthorization.ts index 04f6a739d28..936611f7849 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianUserAuthorization.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianUserAuthorization.ts @@ -3,6 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. /** - * [UNSTABLE] Authorization level assigned by guardian approval review. + * [UNSTABLE] Authorization level assigned by approval auto-review. */ export type GuardianUserAuthorization = "unknown" | "low" | "medium" | "high"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts index f5114ab6759..5b162cf4b97 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts @@ -6,8 +6,8 @@ import type { GuardianApprovalReview } from "./GuardianApprovalReview"; import type { GuardianApprovalReviewAction } from "./GuardianApprovalReviewAction"; /** - * [UNSTABLE] Temporary notification payload for guardian automatic approval - * review. This shape is expected to change soon. + * [UNSTABLE] Temporary notification payload for approval auto-review. This + * shape is expected to change soon. */ export type ItemGuardianApprovalReviewCompletedNotification = { threadId: string, turnId: string, /** diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts index e2330610a51..81ba2cdebf1 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts @@ -5,8 +5,8 @@ import type { GuardianApprovalReview } from "./GuardianApprovalReview"; import type { GuardianApprovalReviewAction } from "./GuardianApprovalReviewAction"; /** - * [UNSTABLE] Temporary notification payload for guardian automatic approval - * review. This shape is expected to change soon. + * [UNSTABLE] Temporary notification payload for approval auto-review. This + * shape is expected to change soon. */ export type ItemGuardianApprovalReviewStartedNotification = { threadId: string, turnId: string, /** diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs index 6144ac290f4..db558d47956 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -303,8 +303,8 @@ impl From for AskForApproval { #[ts(rename_all = "snake_case", export_to = "v2/")] /// Configures who approval requests are routed to for review. Examples /// include sandbox escapes, blocked network access, MCP approval prompts, and -/// ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully -/// prompted subagent to gather relevant context and apply a risk-based +/// ARC escalations. Defaults to `user`. `guardian_subagent` uses the +/// auto-reviewer subagent to gather relevant context and apply a risk-based /// decision framework before approving or denying the request. pub enum ApprovalsReviewer { User, @@ -4671,7 +4671,7 @@ impl ThreadItem { #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] -/// [UNSTABLE] Lifecycle state for a guardian approval review. +/// [UNSTABLE] Lifecycle state for an approval auto-review. pub enum GuardianApprovalReviewStatus { InProgress, Approved, @@ -4683,7 +4683,7 @@ pub enum GuardianApprovalReviewStatus { #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] -/// [UNSTABLE] Source that produced a terminal guardian approval review decision. +/// [UNSTABLE] Source that produced a terminal approval auto-review decision. pub enum AutoReviewDecisionSource { Agent, } @@ -4699,7 +4699,7 @@ impl From for AutoReviewDecisionSource { #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "lowercase")] #[ts(export_to = "v2/")] -/// [UNSTABLE] Risk level assigned by guardian approval review. +/// [UNSTABLE] Risk level assigned by approval auto-review. pub enum GuardianRiskLevel { Low, Medium, @@ -4721,7 +4721,7 @@ impl From for GuardianRiskLevel { #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "lowercase")] #[ts(export_to = "v2/")] -/// [UNSTABLE] Authorization level assigned by guardian approval review. +/// [UNSTABLE] Authorization level assigned by approval auto-review. pub enum GuardianUserAuthorization { Unknown, Low, @@ -4740,7 +4740,7 @@ impl From for GuardianUserAuthorization { } } -/// [UNSTABLE] Temporary guardian approval review payload used by +/// [UNSTABLE] Temporary approval auto-review payload used by /// `item/autoApprovalReview/*` notifications. This shape is expected to change /// soon. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] @@ -5450,8 +5450,8 @@ pub struct ItemStartedNotification { #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] -/// [UNSTABLE] Temporary notification payload for guardian automatic approval -/// review. This shape is expected to change soon. +/// [UNSTABLE] Temporary notification payload for approval auto-review. This +/// shape is expected to change soon. pub struct ItemGuardianApprovalReviewStartedNotification { pub thread_id: String, pub turn_id: String, @@ -5476,8 +5476,8 @@ pub struct ItemGuardianApprovalReviewStartedNotification { #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] -/// [UNSTABLE] Temporary notification payload for guardian automatic approval -/// review. This shape is expected to change soon. +/// [UNSTABLE] Temporary notification payload for approval auto-review. This +/// shape is expected to change soon. pub struct ItemGuardianApprovalReviewCompletedNotification { pub thread_id: String, pub turn_id: String, diff --git a/codex-rs/app-server/README.md b/codex-rs/app-server/README.md index 9715db92f22..bba1bf52c4d 100644 --- a/codex-rs/app-server/README.md +++ b/codex-rs/app-server/README.md @@ -489,7 +489,7 @@ You can optionally specify config overrides on the new turn. If specified, these `approvalsReviewer` accepts: - `"user"` — default. Review approval requests directly in the client. -- `"guardian_subagent"` — route approval requests to a carefully prompted subagent that gathers relevant context and applies a risk-based decision framework before approving or denying the request. +- `"guardian_subagent"` — route approval requests to the auto-reviewer subagent, which gathers relevant context and applies a risk-based decision framework before approving or denying the request. ```json { "method": "turn/start", "id": 30, "params": { @@ -1004,10 +1004,10 @@ All items emit shared lifecycle events: - `item/started` — emits the full `item` when a new unit of work begins so the UI can render it immediately; the `item.id` in this payload matches the `itemId` used by deltas. - `item/completed` — sends the final `item` once that work itself finishes (for example, after a tool call or message completes); treat this as the authoritative execution/result state. -- `item/autoApprovalReview/started` — [UNSTABLE] temporary guardian notification carrying `{threadId, turnId, targetItemId, review, action}` when guardian approval review begins. This shape is expected to change soon. -- `item/autoApprovalReview/completed` — [UNSTABLE] temporary guardian notification carrying `{threadId, turnId, targetItemId, review, action}` when guardian approval review resolves. This shape is expected to change soon. +- `item/autoApprovalReview/started` — [UNSTABLE] temporary auto-review notification carrying `{threadId, turnId, targetItemId, review, action}` when approval auto-review begins. This shape is expected to change soon. +- `item/autoApprovalReview/completed` — [UNSTABLE] temporary auto-review notification carrying `{threadId, turnId, targetItemId, review, action}` when approval auto-review resolves. This shape is expected to change soon. -`review` is [UNSTABLE] and currently has `{status, riskLevel?, userAuthorization?, rationale?}`, where `status` is one of `inProgress`, `approved`, `denied`, or `aborted`. `riskLevel` is one of `"low"`, `"medium"`, `"high"`, or `"critical"` when present. `userAuthorization` is one of `"unknown"`, `"low"`, `"medium"`, or `"high"` when present. `action` is a tagged union with `type: "command" | "execve" | "applyPatch" | "networkAccess" | "mcpToolCall"`. Command-like actions include a `source` discriminator (`"shell"` or `"unifiedExec"`). These notifications are separate from the target item's own `item/completed` lifecycle and are intentionally temporary while the guardian app protocol is still being designed. +`review` is [UNSTABLE] and currently has `{status, riskLevel?, userAuthorization?, rationale?}`, where `status` is one of `inProgress`, `approved`, `denied`, or `aborted`. `riskLevel` is one of `"low"`, `"medium"`, `"high"`, or `"critical"` when present. `userAuthorization` is one of `"unknown"`, `"low"`, `"medium"`, or `"high"` when present. `action` is a tagged union with `type: "command" | "execve" | "applyPatch" | "networkAccess" | "mcpToolCall"`. Command-like actions include a `source` discriminator (`"shell"` or `"unifiedExec"`). These notifications are separate from the target item's own `item/completed` lifecycle and are intentionally temporary while the auto-review app protocol is still being designed. There are additional item-specific events: diff --git a/codex-rs/core/src/guardian/review.rs b/codex-rs/core/src/guardian/review.rs index 861d3576cdb..60ffd058439 100644 --- a/codex-rs/core/src/guardian/review.rs +++ b/codex-rs/core/src/guardian/review.rs @@ -57,7 +57,7 @@ pub(crate) async fn guardian_rejection_message(session: &Session, review_id: &st .remove(review_id) .filter(|rejection| !rejection.rationale.trim().is_empty()) .unwrap_or_else(|| GuardianRejection { - rationale: "Guardian denied the action without a specific rationale.".to_string(), + rationale: "Auto-reviewer denied the action without a specific rationale.".to_string(), source: GuardianAssessmentDecisionSource::Agent, }); match rejection.source { diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index aa32a457189..9f743bd4918 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -826,8 +826,8 @@ pub const FEATURES: &[FeatureSpec] = &[ id: Feature::GuardianApproval, key: "guardian_approval", stage: Stage::Experimental { - name: "Guardian Approvals", - menu_description: "When Codex needs approval for higher-risk actions (e.g. sandbox escapes or blocked network access), route eligible approval requests to a carefully-prompted security reviewer subagent rather than blocking the agent on your input. This can consume significantly more tokens because it runs a subagent on every approval request.", + name: "Auto-Review", + menu_description: "When Codex needs approval for higher-risk actions (e.g. sandbox escapes or blocked network access), route eligible approval requests to the auto-reviewer subagent rather than blocking the agent on your input. This can consume significantly more tokens because it runs a subagent on every approval request.", announcement: "", }, default_enabled: false, diff --git a/codex-rs/features/src/tests.rs b/codex-rs/features/src/tests.rs index 3ecab0997c8..d9df16ee9df 100644 --- a/codex-rs/features/src/tests.rs +++ b/codex-rs/features/src/tests.rs @@ -86,11 +86,11 @@ fn guardian_approval_is_experimental_and_user_toggleable() { let stage = spec.stage; assert!(matches!(stage, Stage::Experimental { .. })); - assert_eq!(stage.experimental_menu_name(), Some("Guardian Approvals")); + assert_eq!(stage.experimental_menu_name(), Some("Auto-Review")); assert_eq!( stage.experimental_menu_description().map(str::to_owned), Some( - "When Codex needs approval for higher-risk actions (e.g. sandbox escapes or blocked network access), route eligible approval requests to a carefully-prompted security reviewer subagent rather than blocking the agent on your input. This can consume significantly more tokens because it runs a subagent on every approval request.".to_string() + "When Codex needs approval for higher-risk actions (e.g. sandbox escapes or blocked network access), route eligible approval requests to the auto-reviewer subagent rather than blocking the agent on your input. This can consume significantly more tokens because it runs a subagent on every approval request.".to_string() ) ); assert_eq!(stage.experimental_announcement(), None); diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index ba8de0bacd9..65459be0297 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -268,8 +268,8 @@ struct GuardianApprovalsMode { sandbox_policy: SandboxPolicy, } -/// Enabling the Guardian Approvals experiment in the TUI should also switch the -/// current `/approvals` settings to the matching Guardian Approvals mode. Users +/// Enabling the Auto-Review experiment in the TUI should also switch the +/// current `/approvals` settings to the matching Auto-Review mode. Users /// can still change `/approvals` afterward; this just assumes that opting into /// the experiment means they want guardian review enabled immediately. fn guardian_approvals_mode() -> GuardianApprovalsMode { @@ -1249,7 +1249,7 @@ impl App { let mut approvals_reviewer_override = None; let mut sandbox_policy_override = None; let mut feature_updates_to_apply = Vec::with_capacity(updates.len()); - // Guardian Approvals owns `approvals_reviewer`, but disabling the feature + // Auto-Review owns `approvals_reviewer`, but disabling the feature // from inside a profile should not silently clear a value configured at // the root scope. let (root_approvals_reviewer_blocks_profile_disable, profile_approvals_reviewer_configured) = { @@ -1282,7 +1282,7 @@ impl App { && root_approvals_reviewer_blocks_profile_disable { self.chat_widget.add_error_message( - "Cannot disable Guardian Approvals in this profile because `approvals_reviewer` is configured outside the active profile.".to_string(), + "Cannot disable Auto-Review in this profile because `approvals_reviewer` is configured outside the active profile.".to_string(), ); continue; } @@ -1315,7 +1315,7 @@ impl App { .into(), }); if previous_approvals_reviewer != guardian_approvals_preset.approvals_reviewer { - permissions_history_label = Some("Guardian Approvals"); + permissions_history_label = Some("Auto-Review"); } } else if !effective_enabled { if profile_approvals_reviewer_configured || self.active_profile.is_none() { @@ -1332,13 +1332,13 @@ impl App { } if feature == Feature::GuardianApproval && effective_enabled { // The feature flag alone is not enough for the live session. - // We also align approval policy + sandbox to the Guardian - // Approvals preset so enabling the experiment immediately + // We also align approval policy + sandbox to the Auto-Review + // preset so enabling the experiment immediately // makes guardian review observable in the current thread. if !self.try_set_approval_policy_on_config( &mut feature_config, guardian_approvals_preset.approval_policy, - "Failed to enable Guardian Approvals", + "Failed to enable Auto-Review", "failed to set guardian approvals approval policy on staged config", ) { continue; @@ -1346,7 +1346,7 @@ impl App { if !self.try_set_sandbox_policy_on_config( &mut feature_config, guardian_approvals_preset.sandbox_policy.clone(), - "Failed to enable Guardian Approvals", + "Failed to enable Auto-Review", "failed to set guardian approvals sandbox policy on staged config", ) { continue; @@ -1403,7 +1403,7 @@ impl App { "failed to set guardian approvals sandbox policy on chat config" ); self.chat_widget - .add_error_message(format!("Failed to enable Guardian Approvals: {err}")); + .add_error_message(format!("Failed to enable Auto-Review: {err}")); } if approval_policy_override.is_some() @@ -8001,7 +8001,7 @@ mod tests { .map(|line| line.to_string()) .collect::>() .join("\n"); - assert!(rendered.contains("Permissions updated to Guardian Approvals")); + assert!(rendered.contains("Permissions updated to Auto-Review")); let config = std::fs::read_to_string(codex_home.path().join("config.toml"))?; assert!(config.contains("guardian_approval = true")); diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 25f9472c8ac..74c9bc71d98 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -8430,9 +8430,9 @@ impl ChatWidget { if guardian_approval_enabled { items.push(SelectionItem { - name: "Guardian Approvals".to_string(), + name: "Auto-Review".to_string(), description: Some( - "Same workspace-write permissions as Default, but eligible `on-request` approvals are routed through the guardian reviewer subagent." + "Same workspace-write permissions as Default, but eligible `on-request` approvals are routed through the auto-reviewer subagent." .to_string(), ), is_current: current_review_policy == ApprovalsReviewer::GuardianSubagent @@ -8444,7 +8444,7 @@ impl ChatWidget { actions: Self::approval_preset_actions( preset.approval, preset.sandbox.clone(), - "Guardian Approvals".to_string(), + "Auto-Review".to_string(), ApprovalsReviewer::GuardianSubagent, ), dismiss_on_select: true, diff --git a/codex-rs/tui/src/chatwidget/tests/permissions.rs b/codex-rs/tui/src/chatwidget/tests/permissions.rs index ea623712fd1..75482d9e103 100644 --- a/codex-rs/tui/src/chatwidget/tests/permissions.rs +++ b/codex-rs/tui/src/chatwidget/tests/permissions.rs @@ -329,7 +329,7 @@ async fn permissions_selection_history_snapshot_full_access_to_default() { chat.open_permissions_popup(); let popup = render_bottom_popup(&chat, /*width*/ 120); chat.handle_key_event(KeyEvent::from(KeyCode::Up)); - if popup.contains("Guardian Approvals") { + if popup.contains("Auto-Review") { chat.handle_key_event(KeyEvent::from(KeyCode::Up)); } chat.handle_key_event(KeyEvent::from(KeyCode::Enter)); @@ -400,8 +400,8 @@ async fn permissions_selection_hides_guardian_approvals_when_feature_disabled() let popup = render_bottom_popup(&chat, /*width*/ 120); assert!( - !popup.contains("Guardian Approvals"), - "expected Guardian Approvals to stay hidden until the experimental feature is enabled: {popup}" + !popup.contains("Auto-Review"), + "expected Auto-Review to stay hidden until the experimental feature is enabled: {popup}" ); } @@ -432,8 +432,8 @@ async fn permissions_selection_hides_guardian_approvals_when_feature_disabled_ev let popup = render_bottom_popup(&chat, /*width*/ 120); assert!( - !popup.contains("Guardian Approvals"), - "expected Guardian Approvals to stay hidden when the experimental feature is disabled: {popup}" + !popup.contains("Auto-Review"), + "expected Auto-Review to stay hidden when the experimental feature is disabled: {popup}" ); } @@ -477,8 +477,8 @@ async fn permissions_selection_marks_guardian_approvals_current_after_session_co let popup = render_bottom_popup(&chat, /*width*/ 120); assert!( - popup.contains("Guardian Approvals (current)"), - "expected Guardian Approvals to be current after SessionConfigured sync: {popup}" + popup.contains("Auto-Review (current)"), + "expected Auto-Review to be current after SessionConfigured sync: {popup}" ); } @@ -531,8 +531,8 @@ async fn permissions_selection_marks_guardian_approvals_current_with_custom_work let popup = render_bottom_popup(&chat, /*width*/ 120); assert!( - popup.contains("Guardian Approvals (current)"), - "expected Guardian Approvals to be current even with custom workspace-write details: {popup}" + popup.contains("Auto-Review (current)"), + "expected Auto-Review to be current even with custom workspace-write details: {popup}" ); } @@ -567,7 +567,7 @@ async fn permissions_selection_can_disable_guardian_approvals() { event, AppEvent::UpdateApprovalsReviewer(ApprovalsReviewer::User) )), - "expected selecting Default from Guardian Approvals to switch back to manual approval review: {events:?}" + "expected selecting Default from Auto-Review to switch back to manual approval review: {events:?}" ); assert!( !events @@ -613,8 +613,8 @@ async fn permissions_selection_sends_approvals_reviewer_in_override_turn_context assert!( popup .lines() - .any(|line| line.contains("Guardian Approvals") && line.contains('›')), - "expected one Down from Default to select Guardian Approvals: {popup}" + .any(|line| line.contains("Auto-Review") && line.contains('›')), + "expected one Down from Default to select Auto-Review: {popup}" ); chat.handle_key_event(KeyEvent::from(KeyCode::Enter)); diff --git a/codex-rs/tui/src/chatwidget/tests/popups_and_settings.rs b/codex-rs/tui/src/chatwidget/tests/popups_and_settings.rs index e2635d322dc..8d3ff020ca0 100644 --- a/codex-rs/tui/src/chatwidget/tests/popups_and_settings.rs +++ b/codex-rs/tui/src/chatwidget/tests/popups_and_settings.rs @@ -1464,11 +1464,11 @@ async fn experimental_popup_includes_guardian_approval() { let normalized_popup = popup.split_whitespace().collect::>().join(" "); assert!( popup.contains(guardian_name), - "expected guardian approvals entry in experimental popup, got:\n{popup}" + "expected auto-review entry in experimental popup, got:\n{popup}" ); assert!( normalized_popup.contains(guardian_description), - "expected guardian approvals description in experimental popup, got:\n{popup}" + "expected auto-review description in experimental popup, got:\n{popup}" ); }