mirror of
https://github.com/openai/codex.git
synced 2026-11-07 08:34:29 +00:00
Remove the unused legacy remote compaction implementation (#44273)
## Why Remote compaction already uses the normal Responses API, leaving the legacy `/responses/compact` runner unused. ## What changed - Remove the legacy runner, endpoint client, request types, analytics variant, and obsolete test helpers and snapshots. - Move tool-output trimming and its metadata tests into `compact_remote_history` for reuse by remote compaction v2. - Consolidate retained-history filtering in the v2 implementation and remove redundant `RemoteCompactionV2` settings from tests. ## Testing Extend the retained-history unit test to explicitly check that hook prompts survive compaction. GitOrigin-RevId: 999bb1391aa22c3c281d6a96f98817d6c9e46ed9
This commit is contained in:
1 parent
a3ba42b010
commit
1ac689cc7d
44 files changed
+169
-1964
No files matched your search
@@ -637,9 +637,6 @@ async fn response_item_ids_are_sent_for_all_remote_v2_compaction_requests() -> a
|
||||
.await;
|
||||
let test = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(|config| {
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
})
|
||||
.build(&server)
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -2892,7 +2892,6 @@ async fn pre_sampling_compact_falls_back_after_previous_model_invalid_request_on
|
||||
config.model_provider = model_provider;
|
||||
config.tool_registry.turn_metadata_includes_tool_info = true;
|
||||
set_test_compact_prompt(config);
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
});
|
||||
let test = builder.build(&server).await.expect("build test codex");
|
||||
|
||||
@@ -5312,10 +5311,7 @@ async fn remote_v2_compaction_keeps_creation_time_instructions_after_same_path_m
|
||||
)?;
|
||||
let mut builder = test_codex()
|
||||
.with_home(Arc::clone(&home))
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(|config| {
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
});
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing());
|
||||
let test = builder.build(&server).await?;
|
||||
|
||||
// Materialize the old snapshot, rewrite the selected file in place, and compact remotely.
|
||||
@@ -5375,10 +5371,7 @@ async fn remote_v2_compaction_keeps_creation_time_instructions_after_same_path_m
|
||||
let mut resume_builder = test_codex()
|
||||
.with_home(Arc::clone(&home))
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(move |config| {
|
||||
config.cwd = resumed_cwd;
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
});
|
||||
.with_config(move |config| config.cwd = resumed_cwd);
|
||||
let resumed = resume_builder
|
||||
.resume(&server, Arc::clone(&home), rollout_path)
|
||||
.await?;
|
||||
|
||||
@@ -188,7 +188,6 @@ fn amazon_bedrock_test_codex() -> TestCodexBuilder {
|
||||
.with_auth(auth)
|
||||
.with_model(AMAZON_BEDROCK_GPT_5_5_MODEL_ID)
|
||||
.with_config(|config| {
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
config.model_provider = ModelProviderInfo {
|
||||
base_url: config.model_provider.base_url.clone(),
|
||||
..ModelProviderInfo::create_amazon_bedrock_provider(/*aws*/ None)
|
||||
@@ -353,10 +352,6 @@ async fn remote_compact_v2_retains_only_client_developer_messages_when_enabled(
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(move |config| {
|
||||
config
|
||||
.features
|
||||
.enable(Feature::RemoteCompactionV2)
|
||||
.expect("remote compaction v2 should be configurable");
|
||||
if enabled {
|
||||
config
|
||||
.features
|
||||
@@ -441,14 +436,7 @@ async fn remote_compact_v2_records_usage_before_output_validation() -> Result<()
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let harness = TestCodexHarness::with_auto_env_builder(
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(|config| {
|
||||
config
|
||||
.features
|
||||
.enable(Feature::RemoteCompactionV2)
|
||||
.expect("remote compaction v2 should be configurable");
|
||||
}),
|
||||
test_codex().with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing()),
|
||||
)
|
||||
.await?;
|
||||
let codex = &harness.test().codex;
|
||||
@@ -588,7 +576,6 @@ async fn remote_compact_v2_charges_retained_images_to_token_budget(
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(move |config| {
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
let _ = config.features.enable(Feature::UnifiedImageBudget);
|
||||
if let Some(enabled) = image_budget_enabled {
|
||||
let _ = config
|
||||
@@ -724,11 +711,7 @@ async fn remote_compact_v2_reuses_compaction_trigger_for_followups() -> Result<(
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let harness = TestCodexHarness::with_builder(
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(|config| {
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
}),
|
||||
test_codex().with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing()),
|
||||
)
|
||||
.await?;
|
||||
let image_url = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAASsJTYQAAAAASUVORK5CYII=";
|
||||
@@ -1082,7 +1065,6 @@ async fn remote_compact_v2_retries_failures_with_stream_retry_budget() -> Result
|
||||
.with_history_mode(ThreadHistoryMode::Paginated)
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(|config| {
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
config.model_provider.request_max_retries = Some(0);
|
||||
config.model_provider.stream_max_retries = Some(2);
|
||||
}),
|
||||
@@ -1418,7 +1400,6 @@ async fn remote_mid_turn_compact_v2_sends_turn_state_over_http() -> Result<()> {
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(|config| {
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
config.model_auto_compact_token_limit = Some(200);
|
||||
}),
|
||||
)
|
||||
@@ -1547,7 +1528,6 @@ async fn remote_mid_turn_compact_v2_sends_turn_state_over_websocket() -> Result<
|
||||
let mut builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(|config| {
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
config.model_auto_compact_token_limit = Some(200);
|
||||
});
|
||||
let test = builder.build_with_websocket_server(&server).await?;
|
||||
|
||||
@@ -217,10 +217,7 @@ async fn cyber_access_program_survives_mid_turn_remote_compaction_v2() -> Result
|
||||
.await;
|
||||
let test = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_config(|config| {
|
||||
let _ = config.features.disable(Feature::RemoteCompactionV2);
|
||||
config.model_auto_compact_token_limit = Some(200);
|
||||
})
|
||||
.with_config(|config| config.model_auto_compact_token_limit = Some(200))
|
||||
.build_with_auto_env(&server)
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -1255,7 +1255,6 @@ async fn terminal_compaction_error_does_not_retry_pending_input(
|
||||
.with_config(move |config| {
|
||||
config.model_provider.base_url = Some(base_url);
|
||||
config.model_auto_compact_token_limit = Some(100_000);
|
||||
let _ = config.features.enable(Feature::RemoteCompactionV2);
|
||||
// The streaming fixture records raw request bodies for JSON assertions.
|
||||
let _ = config.features.disable(Feature::EnableRequestCompression);
|
||||
})
|
||||
|
||||
@@ -376,12 +376,7 @@ async fn compaction_budget_exhaustion_fails_without_retry(
|
||||
reminder_at_remaining_tokens: vec![5],
|
||||
..rollout_budget()
|
||||
});
|
||||
if remote_v2 {
|
||||
config
|
||||
.features
|
||||
.enable(Feature::RemoteCompactionV2)
|
||||
.expect("test config should allow remote compaction v2");
|
||||
} else {
|
||||
if !remote_v2 {
|
||||
config.model_provider.name = "OpenAI-compatible test provider".to_string();
|
||||
}
|
||||
})
|
||||
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "context_snapshot::format_request_body_diff_snapshot(scenario,\n\"Last Normal /responses Request\", &normal_request,\n\"Remote /responses/compact Request\", &compact_request,\n&ContextSnapshotOptions::default(),)"
|
||||
---
|
||||
Scenario: After five varied API-key-auth turns, remote manual compaction omits service_tier, reuses prompt_cache_key, and still omits responses-only fields.
|
||||
|
||||
--- Last Normal /responses Request
|
||||
+++ Remote /responses/compact Request
|
||||
- "client_metadata": {
|
||||
- "root_turn_id": "<UUID>",
|
||||
- "session_id": "<UUID>",
|
||||
- "thread_id": "<UUID>",
|
||||
- "turn_id": "<UUID>",
|
||||
- "x-codex-installation-id": "<UUID>",
|
||||
- "x-codex-turn-metadata": "{\"installation_id\":\"<UUID>\",\"session_id\":\"<UUID>\",\"thread_id\":\"<UUID>\",\"agent_name\":\"/root\",\"turn_id\":\"<UUID>\",\"window_id\":\"<UUID>:0\",\"window_number\":0,\"context_window_id\":\"<UUID>\",\"request_kind\":\"turn\",\"root_turn_id\":\"<UUID>\",\"sandbox\":\"<SANDBOX>\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":<UNIX_MS>}",
|
||||
- "x-codex-window-id": "<UUID>:0"
|
||||
- },
|
||||
- "include": [
|
||||
- "reasoning.encrypted_content"
|
||||
- ],
|
||||
+ },
|
||||
+ {
|
||||
+ "content": [
|
||||
+ {
|
||||
+ "text": "turn five raw content",
|
||||
+ "type": "reasoning_text"
|
||||
+ }
|
||||
+ ],
|
||||
+ "encrypted_content": "YmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYnR1cm4gZml2ZSByYXcgY29udGVudA==",
|
||||
+ "summary": [
|
||||
+ {
|
||||
+ "text": "TURN_FIVE_REASONING",
|
||||
+ "type": "summary_text"
|
||||
+ }
|
||||
+ ],
|
||||
+ "type": "reasoning"
|
||||
+ },
|
||||
+ {
|
||||
+ "content": [
|
||||
+ {
|
||||
+ "text": "TURN_FIVE_ASSISTANT",
|
||||
+ "type": "output_text"
|
||||
+ }
|
||||
+ ],
|
||||
+ "role": "assistant",
|
||||
+ "type": "message"
|
||||
- "service_tier": "priority",
|
||||
- "store": false,
|
||||
- "stream": true,
|
||||
- "tool_choice": "auto",
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "context_snapshot::format_request_body_diff_snapshot(scenario,\n\"Last Normal /responses Request\", &normal_request,\n\"Remote /responses/compact Request\", &compact_request,\n&ContextSnapshotOptions::default(),)"
|
||||
---
|
||||
Scenario: After five varied ChatGPT-auth turns, remote manual compaction reuses service_tier and prompt_cache_key while omitting responses-only fields.
|
||||
|
||||
--- Last Normal /responses Request
|
||||
+++ Remote /responses/compact Request
|
||||
- "client_metadata": {
|
||||
- "root_turn_id": "<UUID>",
|
||||
- "session_id": "<UUID>",
|
||||
- "thread_id": "<UUID>",
|
||||
- "turn_id": "<UUID>",
|
||||
- "x-codex-installation-id": "<UUID>",
|
||||
- "x-codex-turn-metadata": "{\"installation_id\":\"<UUID>\",\"session_id\":\"<UUID>\",\"thread_id\":\"<UUID>\",\"agent_name\":\"/root\",\"turn_id\":\"<UUID>\",\"window_id\":\"<UUID>:0\",\"window_number\":0,\"context_window_id\":\"<UUID>\",\"request_kind\":\"turn\",\"root_turn_id\":\"<UUID>\",\"sandbox\":\"<SANDBOX>\",\"sandbox_mode\":\"danger-full-access\",\"auto_review_enabled\":false,\"node_repl_auto_review_required\":false,\"node_repl_disabled\":false,\"turn_started_at_unix_ms\":<UNIX_MS>}",
|
||||
- "x-codex-window-id": "<UUID>:0"
|
||||
- },
|
||||
- "include": [
|
||||
- "reasoning.encrypted_content"
|
||||
- ],
|
||||
+ },
|
||||
+ {
|
||||
+ "content": [
|
||||
+ {
|
||||
+ "text": "turn five raw content",
|
||||
+ "type": "reasoning_text"
|
||||
+ }
|
||||
+ ],
|
||||
+ "encrypted_content": "YmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYnR1cm4gZml2ZSByYXcgY29udGVudA==",
|
||||
+ "summary": [
|
||||
+ {
|
||||
+ "text": "TURN_FIVE_REASONING",
|
||||
+ "type": "summary_text"
|
||||
+ }
|
||||
+ ],
|
||||
+ "type": "reasoning"
|
||||
+ },
|
||||
+ {
|
||||
+ "content": [
|
||||
+ {
|
||||
+ "text": "TURN_FIVE_ASSISTANT",
|
||||
+ "type": "output_text"
|
||||
+ }
|
||||
+ ],
|
||||
+ "role": "assistant",
|
||||
+ "type": "message"
|
||||
- "store": false,
|
||||
- "stream": true,
|
||||
- "tool_choice": "auto",
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote manual /compact while realtime remains active: the next regular turn restates realtime-start instructions after compaction clears the baseline.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", post_compact_request),])"
|
||||
---
|
||||
Scenario: Remote manual /compact while realtime remains active: the next regular turn restates realtime-start instructions after compaction clears the baseline.
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer[2]:
|
||||
[01] <realtime_conversation>\nRealtime conversation started.\n\nYou a...
|
||||
[02] <PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:USER_ONE
|
||||
03:message/assistant:REMOTE_FIRST_REPLY
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:compaction:encrypted=true
|
||||
01:message/developer[2]:
|
||||
[01] <realtime_conversation>\nRealtime conversation started.\n\nYou a...
|
||||
[02] <PERMISSIONS_INSTRUCTIONS>
|
||||
02:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
03:message/user:USER_TWO
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote manual /compact where remote compact output is compaction-only: follow-up layout uses the returned compaction item plus new user message.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", follow_up_request),])"
|
||||
---
|
||||
Scenario: Remote manual /compact where remote compact output is compaction-only: follow-up layout uses the returned compaction item plus new user message.
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:hello remote compact
|
||||
03:message/assistant:FIRST_REMOTE_REPLY
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:compaction:encrypted=true
|
||||
01:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
02:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
03:message/user:after compact
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote manual /compact with no prior user turn skips the remote compact request; the follow-up turn carries canonical context and new user message.\",\n&[(\"Remote Post-Compaction History Layout\", &follow_up_request)])"
|
||||
---
|
||||
Scenario: Remote manual /compact with no prior user turn skips the remote compact request; the follow-up turn carries canonical context and new user message.
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:USER_ONE
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote mid-turn continuation compaction after realtime was closed before the turn: the initial second-turn request emits realtime-end instructions, but the continuation request does not restate them after compaction because the current turn already established the inactive baseline.\",\n&[(\"Second Turn Initial Request\", second_turn_request),\n(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", post_compact_request),])"
|
||||
---
|
||||
Scenario: Remote mid-turn continuation compaction after realtime was closed before the turn: the initial second-turn request emits realtime-end instructions, but the continuation request does not restate them after compaction because the current turn already established the inactive baseline.
|
||||
|
||||
## Second Turn Initial Request
|
||||
00:message/developer[2]:
|
||||
[01] <realtime_conversation>\nRealtime conversation started.\n\nYou a...
|
||||
[02] <PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:SETUP_USER
|
||||
03:message/assistant:REMOTE_SETUP_REPLY
|
||||
04:message/developer:<realtime_conversation>\nRealtime conversation ended.\n\nSubsequ...
|
||||
05:message/user:USER_TWO
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer[2]:
|
||||
[01] <realtime_conversation>\nRealtime conversation started.\n\nYou a...
|
||||
[02] <PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:SETUP_USER
|
||||
03:message/assistant:REMOTE_SETUP_REPLY
|
||||
04:message/developer:<realtime_conversation>\nRealtime conversation ended.\n\nSubsequ...
|
||||
05:message/user:USER_TWO
|
||||
06:function_call/test_tool
|
||||
07:function_call_output:unsupported call: test_tool
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:compaction:encrypted=true
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"After a prior manual /compact produced an older remote compaction item, the next turn hits remote auto-compaction before the next sampling request. The compact request carries forward that earlier compaction item, and the next sampling request shows the latest compaction item with context reinjected before USER_TWO.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Second Turn Request (After Compaction)\", &second_turn_request),])"
|
||||
---
|
||||
Scenario: After a prior manual /compact produced an older remote compaction item, the next turn hits remote auto-compaction before the next sampling request. The compact request carries forward that earlier compaction item, and the next sampling request shows the latest compaction item with context reinjected before USER_TWO.
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/user:USER_ONE
|
||||
01:compaction:encrypted=true
|
||||
|
||||
## Second Turn Request (After Compaction)
|
||||
00:message/user:USER_ONE
|
||||
01:compaction:encrypted=true
|
||||
02:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
03:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
04:message/user:USER_TWO
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote mid-turn continuation compaction after tool output: compact request includes tool artifacts and the follow-up request includes the returned compaction item.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", &requests[1]),])"
|
||||
---
|
||||
Scenario: Remote mid-turn continuation compaction after tool output: compact request includes tool artifacts and the follow-up request includes the returned compaction item.
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:USER_ONE
|
||||
03:function_call/test_tool
|
||||
04:function_call_output:unsupported call: test_tool
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:USER_ONE
|
||||
03:compaction:encrypted=true
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote mid-turn compaction where compact output has only a compaction item: continuation layout reinjects context before that compaction item.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", &post_compact_turn_request),])"
|
||||
---
|
||||
Scenario: Remote mid-turn compaction where compact output has only a compaction item: continuation layout reinjects context before that compaction item.
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:USER_ONE
|
||||
03:function_call/test_tool
|
||||
04:function_call_output:unsupported call: test_tool
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:compaction:encrypted=true
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote pre-turn auto-compaction context-window failure: compaction request excludes the incoming user message and the turn errors.\",\n&[(\"Remote Compaction Request (Incoming User Excluded)\",\n&include_attempt_request),])"
|
||||
---
|
||||
Scenario: Remote pre-turn auto-compaction context-window failure: compaction request excludes the incoming user message and the turn errors.
|
||||
|
||||
## Remote Compaction Request (Incoming User Excluded)
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:USER_ONE
|
||||
03:message/assistant:REMOTE_FIRST_REPLY
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote pre-turn auto-compaction parse failure: compaction request excludes the incoming user message and the turn stops.\",\n&[(\"Remote Compaction Request (Incoming User Excluded)\",\n&first_compact_mock.single_request()),])"
|
||||
---
|
||||
Scenario: Remote pre-turn auto-compaction parse failure: compaction request excludes the incoming user message and the turn stops.
|
||||
|
||||
## Remote Compaction Request (Incoming User Excluded)
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:turn that exceeds token threshold
|
||||
03:message/assistant:initial turn complete
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote pre-turn auto-compaction with a context override emits the context diff in the compact request while excluding the incoming user message.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", &requests[2]),])"
|
||||
---
|
||||
Scenario: Remote pre-turn auto-compaction with a context override emits the context diff in the compact request while excluding the incoming user message.
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:USER_ONE
|
||||
03:message/assistant:REMOTE_FIRST_REPLY
|
||||
04:message/user:USER_TWO
|
||||
05:message/assistant:REMOTE_SECOND_REPLY
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:message/user:USER_ONE
|
||||
01:message/user:USER_TWO
|
||||
02:compaction:encrypted=true
|
||||
03:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
04:message/user:<ENVIRONMENT_CONTEXT:cwd=PRETURN_CONTEXT_DIFF_CWD>
|
||||
05:message/user:USER_THREE
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote pre-turn auto-compaction while realtime remains active: compaction clears the reference baseline, so the follow-up request restates realtime-start instructions.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", post_compact_request),])"
|
||||
---
|
||||
Scenario: Remote pre-turn auto-compaction while realtime remains active: compaction clears the reference baseline, so the follow-up request restates realtime-start instructions.
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer[2]:
|
||||
[01] <realtime_conversation>\nRealtime conversation started.\n\nYou a...
|
||||
[02] <PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:USER_ONE
|
||||
03:message/assistant:REMOTE_FIRST_REPLY
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:compaction:encrypted=true
|
||||
01:message/developer[2]:
|
||||
[01] <realtime_conversation>\nRealtime conversation started.\n\nYou a...
|
||||
[02] <PERMISSIONS_INSTRUCTIONS>
|
||||
02:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
03:message/user:USER_TWO
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "format_labeled_requests_snapshot(\"Remote pre-turn compaction during model switch currently excludes incoming user input, strips incoming <model_switch> from the compact request payload, and restores it in the post-compaction follow-up request.\",\n&[(\"Initial Request (Previous Model)\", &initial_turn_request),\n(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", &post_compact_turn_request),])"
|
||||
---
|
||||
Scenario: Remote pre-turn compaction during model switch currently excludes incoming user input, strips incoming <model_switch> from the compact request payload, and restores it in the post-compaction follow-up request.
|
||||
|
||||
## Initial Request (Previous Model)
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:BEFORE_SWITCH_USER
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
02:message/user:BEFORE_SWITCH_USER
|
||||
03:message/assistant:BEFORE_SWITCH_REPLY
|
||||
|
||||
## Remote Post-Compaction History Layout
|
||||
00:message/user:BEFORE_SWITCH_USER
|
||||
01:compaction:encrypted=true
|
||||
02:message/developer[2]:
|
||||
[01] <model_switch>\nThe user was previously using a different model....
|
||||
[02] <PERMISSIONS_INSTRUCTIONS>
|
||||
03:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
04:message/user:AFTER_SWITCH_USER
|
||||
Reference in new issue
Block a user