mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
feat: guard git enrichment (#26175)
Skip turn git metadata enrichment when a turn has remote or multiple executors, so we do not report the orchestrator checkout as executor workspace metadata. Test: `just test -p codex-core` (blocked by existing `Session::conversation_id` compile error in `close_agent.rs`).
This commit is contained in:
@@ -160,7 +160,9 @@ pub(super) async fn spawn_review_thread(
|
||||
client_id: None,
|
||||
}];
|
||||
let tc = Arc::new(review_turn_context);
|
||||
tc.turn_metadata_state.spawn_git_enrichment_task();
|
||||
if tc.environments.single_local_environment_cwd().is_some() {
|
||||
tc.turn_metadata_state.spawn_git_enrichment_task();
|
||||
}
|
||||
// TODO(ccunningham): Review turns currently rely on `spawn_task` for TurnComplete but do not
|
||||
// emit a parent TurnStarted. Consider giving review a full parent turn lifecycle
|
||||
// (TurnStarted + TurnComplete) for consistency with other standalone tasks.
|
||||
|
||||
@@ -814,7 +814,13 @@ impl Session {
|
||||
turn_context.final_output_json_schema = final_schema;
|
||||
}
|
||||
let turn_context = Arc::new(turn_context);
|
||||
turn_context.turn_metadata_state.spawn_git_enrichment_task();
|
||||
if turn_context
|
||||
.environments
|
||||
.single_local_environment_cwd()
|
||||
.is_some()
|
||||
{
|
||||
turn_context.turn_metadata_state.spawn_git_enrichment_task();
|
||||
}
|
||||
turn_context
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user