mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Preserve Guardian context sections and share planned-action rendering (#43534)
## What changed - Replace `ComposedContext` with ordered `ContextSection` values that retain section identities through transcript selection and rendering. - Add a shared `PlannedAction` section and renderer for core synchronous approval prompts and the Guardian V2 asynchronous scorer, preserving full, delta, terminal-input, and network-request framing. - Keep action JSON and retry reasons out of `PlannedAction` debug output. ## Testing Update registry and transcript tests to assert section identities and source roles. Extend registry coverage to verify planned-action collection for both consumers and omission of action JSON and reasons from debug output. GitOrigin-RevId: 675b841a2cad06afce03f414615b4d7aa0553b13
This commit is contained in:
1 parent
53ba408a2f
commit
93ac341410
12 files changed
+437
-233
No files matched your search
@@ -98,6 +98,7 @@ fn registered_transcript_preserves_shared_roles_and_node_repl_tool_attribution()
|
||||
transcript: &config,
|
||||
root_conversation: &[],
|
||||
trusted_user_answers: &[],
|
||||
planned_action: None,
|
||||
})
|
||||
.expect("transcript collection should succeed");
|
||||
|
||||
@@ -170,6 +171,7 @@ fn excluded_tool_calls_still_attribute_included_results() {
|
||||
transcript: &config,
|
||||
root_conversation: &[],
|
||||
trusted_user_answers: &[],
|
||||
planned_action: None,
|
||||
})
|
||||
.expect("transcript collection should succeed");
|
||||
|
||||
@@ -261,6 +263,7 @@ fn outputs_with_call_ids_or_explicit_names_are_retained() {
|
||||
transcript: &config,
|
||||
root_conversation: &[],
|
||||
trusted_user_answers: &[],
|
||||
planned_action: None,
|
||||
})
|
||||
.expect("transcript collection should succeed");
|
||||
let mut expected = vec![
|
||||
@@ -306,6 +309,7 @@ fn reused_registry_applies_current_history_sources_and_entry_limits() {
|
||||
transcript: &config,
|
||||
root_conversation: &[],
|
||||
trusted_user_answers: &[],
|
||||
planned_action: None,
|
||||
})
|
||||
.expect("transcript collection should succeed");
|
||||
assert_eq!(
|
||||
@@ -338,6 +342,7 @@ fn reused_registry_applies_current_history_sources_and_entry_limits() {
|
||||
transcript: &config,
|
||||
root_conversation: &[],
|
||||
trusted_user_answers: &[],
|
||||
planned_action: None,
|
||||
})
|
||||
.expect("transcript collection should succeed");
|
||||
let mut expected = vec![ConversationTranscriptEntry {
|
||||
|
||||
Reference in new issue
Block a user