mirror of
https://github.com/openai/codex.git
synced 2026-11-16 06:54:36 +00:00
Skip Git enrichment for prewarm and Guardian turns (#34728)
## Why Startup prewarms and Guardian review sessions do not need workspace Git metadata. Collecting it for those requests performs redundant work, while user turns still need a fresh view of the repository. ## What changed - Add a per-session Git enrichment policy. - Skip enrichment for startup prewarm, preview, and Guardian review turns. - Keep fresh enrichment enabled for regular sessions and one-shot delegated turns. ## Testing - Cover prewarm and Guardian requests omitting workspace metadata while subsequent user turns observe repository changes. - Cover concurrent repositories and worktrees retaining distinct metadata. - Verify concurrent enrichment is coalesced and canceled enrichment can be retried. GitOrigin-RevId: 4a68615288bb568c75f2e487d9c0776e3e80f191
This commit is contained in:
1 parent
9fc715c086
commit
33d394c69e
12 files changed
+691
-21
No files matched your search
@@ -43,6 +43,7 @@ use crate::config::NetworkProxySpec;
|
||||
use crate::config::Permissions;
|
||||
use crate::context::ContextualUserFragment;
|
||||
use crate::context::GuardianFollowupReviewReminder;
|
||||
use crate::session::GitEnrichmentPolicy;
|
||||
use crate::session::SessionIo;
|
||||
use crate::session::session::Session;
|
||||
use crate::session::turn_context::TurnContext;
|
||||
@@ -678,6 +679,7 @@ async fn spawn_guardian_review_session(
|
||||
cancel_token.clone(),
|
||||
SubAgentSource::Other(GUARDIAN_REVIEWER_NAME.to_string()),
|
||||
initial_history,
|
||||
GitEnrichmentPolicy::Skip,
|
||||
))
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in new issue
Block a user