mirror of
https://github.com/openai/codex.git
synced 2026-10-21 05:22:21 +00:00
Remove obsolete Guardian thread-context enables from tests (#51184)
## Why Thread-owned Guardian context is always enabled, and `guardianv2.thread_context` is deprecated and ignored. ## What changed Remove explicit `GuardianThreadContext` enables from retained-context and heartbeat tests. Parameterize the heartbeat skill-context test with optional feature lists so it covers the default behavior and `GuardianRootHandoffContext`, each with one or three heartbeats. GitOrigin-RevId: 78e3159832bff08b79c7977d876d9acb587e9c71
This commit is contained in:
@@ -183,20 +183,23 @@ async fn heartbeat_keeps_user_restriction_after_status_questions(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test_case::test_case(Feature::GuardianThreadContext, 1; "existing_projection_first")]
|
||||
#[test_case::test_case(Feature::GuardianThreadContext, 3; "existing_projection_repeated")]
|
||||
#[test_case::test_case(Feature::GuardianRootHandoffContext, 1; "handoff_filter_first")]
|
||||
#[test_case::test_case(Feature::GuardianRootHandoffContext, 3; "handoff_filter_repeated")]
|
||||
#[test_case::test_case(&[], 1; "existing_projection_first")]
|
||||
#[test_case::test_case(&[], 3; "existing_projection_repeated")]
|
||||
#[test_case::test_case(&[Feature::GuardianRootHandoffContext], 1; "handoff_filter_first")]
|
||||
#[test_case::test_case(&[Feature::GuardianRootHandoffContext], 3; "handoff_filter_repeated")]
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn heartbeat_root_projection_uses_latest_turn_skills(
|
||||
feature: Feature,
|
||||
enabled_features: &'static [Feature],
|
||||
heartbeat_count: usize,
|
||||
) -> Result<()> {
|
||||
skip_if_no_network!(Ok(()));
|
||||
let server = start_mock_server().await;
|
||||
let test = test_codex()
|
||||
.with_config(move |config| {
|
||||
for feature in [Feature::Collab, Feature::MultiAgentV2, feature] {
|
||||
for feature in [Feature::Collab, Feature::MultiAgentV2]
|
||||
.into_iter()
|
||||
.chain(enabled_features.iter().copied())
|
||||
{
|
||||
config.features.enable(feature).expect("enable feature");
|
||||
}
|
||||
})
|
||||
|
||||
@@ -295,10 +295,6 @@ async fn streamed_question_precedes_reply_across_resume(
|
||||
.with_history_mode(ThreadHistoryMode::Paginated)
|
||||
.with_config(|config| {
|
||||
config.experimental_thread_store = ThreadStoreConfig::Local;
|
||||
config
|
||||
.features
|
||||
.enable(Feature::GuardianThreadContext)
|
||||
.expect("enable retained context");
|
||||
})
|
||||
.build_with_streaming_server(&server)
|
||||
.await?;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//! Guardian retains native encrypted parent replies across incremental reviews.
|
||||
|
||||
use codex_core::config::Constrained;
|
||||
use codex_features::Feature;
|
||||
use codex_protocol::AgentPath;
|
||||
use codex_protocol::config_types::ApprovalsReviewer;
|
||||
use codex_protocol::models::PermissionProfile;
|
||||
@@ -66,10 +65,6 @@ async fn encrypted_parent_reply_survives_incremental_guardian_reviews() -> anyho
|
||||
.with_model("gpt-5.5")
|
||||
.with_config(|config| {
|
||||
super::configure_scenario_catalog(config);
|
||||
config
|
||||
.features
|
||||
.enable(Feature::GuardianThreadContext)
|
||||
.unwrap();
|
||||
config.approvals_reviewer = ApprovalsReviewer::AutoReview;
|
||||
config.permissions.approval_policy = Constrained::allow_any(AskForApproval::OnRequest);
|
||||
config
|
||||
|
||||
@@ -58,10 +58,6 @@ async fn heartbeat_repetitions_keep_later_human_authorization() -> anyhow::Resul
|
||||
.features
|
||||
.disable(Feature::EnableRequestCompression)
|
||||
.unwrap();
|
||||
config
|
||||
.features
|
||||
.enable(Feature::GuardianThreadContext)
|
||||
.unwrap();
|
||||
config.approvals_reviewer = ApprovalsReviewer::AutoReview;
|
||||
config.permissions.approval_policy = Constrained::allow_any(AskForApproval::OnRequest);
|
||||
config
|
||||
|
||||
Reference in New Issue
Block a user