mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Route extension warnings to app-server threads (#35168)
## Why Extension warnings need a stable thread target even when they are emitted outside an active turn. ## What changed - Add `ExtensionWarning` and a dedicated `ExtensionEventSink::emit_warning` path with an explicit thread ID and optional turn ID. - Deliver extension warnings as thread-scoped app-server `warning` notifications, preserving listener ordering and waiting briefly for a subscriber when no listener is active. - Move skills warnings to the new path, limiting provider catalog warnings to four messages of 256 bytes each. ## Testing - Cover warning routing, ordering, UTF-8-safe truncation, subscriber fallback, and invalid thread IDs. - Verify skills warning bounds and app-server delivery of executor catalog budget warnings. GitOrigin-RevId: 4dcb1ba7f17c0edb1a9d548f9568e0c734bffc15
This commit is contained in:
1 parent
c8957bbf0f
commit
5dd992acd3
15 files changed
+592
-65
No files matched your search
@@ -61,6 +61,10 @@ pub(crate) enum ThreadListenerCommand {
|
||||
turn_id: Option<String>,
|
||||
goal: ThreadGoal,
|
||||
},
|
||||
// EmitWarning is used to order extension warnings with other thread notifications.
|
||||
EmitWarning {
|
||||
message: String,
|
||||
},
|
||||
// EmitThreadGoalCleared is used to order app-server goal clears with running-thread resume responses.
|
||||
EmitThreadGoalCleared,
|
||||
// EmitThreadGoalSnapshot is used to read and emit the latest goal state in the listener order.
|
||||
|
||||
Reference in new issue
Block a user