Consolidate guardian transcript tests in guardian-context (#45683)

## What changed

Remove core guardian tests for transcript numbering and unpaired tool outputs. Extend `guardian-context` coverage to assert that named image-only tool outputs retain their source and use `[non-text output]` for both sync and async contexts, with tool calls included or excluded.

GitOrigin-RevId: ba483e8f6e335697106a987051687a12ad2fde01
This commit is contained in:
felixxia-oai authored and copyberry committed 2026-09-15 12:14:59 +00:00
1 parent 954fa9057b
commit 709efcb7a9
2 files changed
+23 -114

No files matched your search

@@ -1,5 +1,7 @@
use codex_protocol::models::ContentItem;
use codex_protocol::models::FunctionCallOutputContentItem;
use codex_protocol::models::FunctionCallOutputPayload;
use codex_protocol::models::ImageReference;
use codex_protocol::models::LocalShellAction;
use codex_protocol::models::LocalShellExecAction;
use codex_protocol::models::LocalShellStatus;
@@ -241,6 +243,21 @@ fn outputs_with_call_ids_or_explicit_names_are_retained() {
Some("notifications"),
"named notification",
),
ResponseItem::FunctionCallOutput {
id: None,
call_id: None,
name: Some("notifications".to_string()),
namespace: Some("slack".to_string()),
output: FunctionCallOutputPayload::from_content_items(vec![
FunctionCallOutputContentItem::InputImage {
image: ImageReference::Inline {
image_url: "data:image/png;base64,image".to_string(),
},
detail: None,
},
]),
internal_chat_message_metadata_passthrough: None,
},
output(
Some("missing-call"),
Some("notifications"),
@@ -290,6 +307,12 @@ fn outputs_with_call_ids_or_explicit_names_are_retained() {
let mut expected = vec![
generic("orphaned function output"),
named.clone(),
entry(
ConversationTranscriptEntryKind::ToolOutput(
"tool slack.notifications result".to_string(),
),
"[non-text output]",
),
generic("named orphaned function output"),
generic("orphaned custom output"),
generic("named orphaned custom output"),