mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Simplify queued user message admission (#38092)
## What changed - Resolve user message admission when Core accepts the input as a new turn or a steer, without waiting for rollout persistence. - Remove persistence- and hook-specific admission errors and task bookkeeping. - Delete queued messages after Core accepts them for turn processing, including messages subsequently stopped by a prompt hook. ## Testing - Update concurrent admission and queue service tests for acceptance-based admission. GitOrigin-RevId: 7dcc311cfecd3d710733b420f2add546edb86153
This commit is contained in:
1 parent
4c89139da9
commit
da2803c73c
14 files changed
+41
-600
No files matched your search
@@ -123,9 +123,6 @@ impl Session {
|
||||
));
|
||||
}
|
||||
|
||||
let (input_persisted_sender, input_persisted_receiver) =
|
||||
has_user_input.then(tokio::sync::oneshot::channel).unzip();
|
||||
let original_input = input.clone();
|
||||
let task_input = if has_user_input {
|
||||
self.clear_connector_selection().await;
|
||||
for item in &input {
|
||||
@@ -144,18 +141,9 @@ impl Session {
|
||||
turn_context,
|
||||
task_input,
|
||||
RegularTask::new(),
|
||||
input_persisted_sender,
|
||||
MailboxParentProvenance::Ignore,
|
||||
)
|
||||
.await;
|
||||
if let Some(receiver) = input_persisted_receiver {
|
||||
return receiver
|
||||
.await
|
||||
.unwrap_or(Err(
|
||||
TryStartTurnIfIdleRejectionReason::TaskEndedBeforePersistence,
|
||||
))
|
||||
.map_err(|reason| TryStartTurnIfIdleError::new(reason, original_input));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user