Consolidate Guardian tests at shared policy and context boundaries (#46064)

## What changed

- Move approval routing tests into `guardian-reviewer`, covering both reviewer choices across `UnlessTrusted`, `OnRequest`, `Granular`, and `Never` without host session setup.
- Combine reviewer configuration checks into one test for isolation from parent customizations.
- Cover filtering of ordinary developer messages while preserving manual approvals in `guardian-context`, removing the duplicate async scorer test.

GitOrigin-RevId: b39ef21475e2f5d99d758f2d27615449b252dc65
This commit is contained in:
felixxia-oai authored and copyberry committed 2026-09-17 00:39:08 +00:00
1 parent e412b93d08
commit 08663cc91b
6 files changed
+85 -209

No files matched your search

@@ -42,7 +42,7 @@ fn entry(kind: ConversationTranscriptEntryKind, text: &str) -> ConversationTrans
}
#[test]
fn registered_transcript_preserves_shared_roles_and_node_repl_tool_attribution() {
fn registered_transcript_filters_roles_and_preserves_node_repl_tool_attribution() {
let approved_action = format!(
"{MANUAL_APPROVAL_DEVELOPER_PREFIX}\nApproved action: {}",
"exact action ".repeat(/*n*/ 1_000)
@@ -57,6 +57,15 @@ fn registered_transcript_preserves_shared_roles_and_node_repl_tool_attribution()
phase: None,
internal_chat_message_metadata_passthrough: None,
},
ResponseItem::Message {
id: None,
role: "developer".to_string(),
content: vec![ContentItem::InputText {
text: "ordinary developer context".to_string(),
}],
phase: None,
internal_chat_message_metadata_passthrough: None,
},
ResponseItem::Message {
id: None,
role: "developer".to_string(),