mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
tests: remove main-branch wording from compaction snapshots
This commit is contained in:
@@ -3095,7 +3095,7 @@ async fn auto_compact_runs_when_reasoning_header_clears_between_turns() {
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
// TODO(ccunningham): Update once pre-turn compaction includes incoming user input on main.
|
||||
// TODO(ccunningham): Update once pre-turn compaction includes incoming user input.
|
||||
async fn snapshot_request_shape_pre_turn_compaction_including_incoming_user_message() {
|
||||
skip_if_no_network!();
|
||||
|
||||
@@ -3185,7 +3185,7 @@ async fn snapshot_request_shape_pre_turn_compaction_including_incoming_user_mess
|
||||
insta::assert_snapshot!(
|
||||
"pre_turn_compaction_including_incoming_shapes",
|
||||
sectioned_request_shapes(
|
||||
"Pre-turn auto-compaction with a context override emits the context diff in the compact request while the incoming user message is still excluded on main.",
|
||||
"Pre-turn auto-compaction with a context override emits the context diff in the compact request while the incoming user message is still excluded.",
|
||||
&[
|
||||
("Local Compaction Request", &requests[2]),
|
||||
("Local Post-Compaction History Layout", &requests[3]),
|
||||
@@ -3202,7 +3202,7 @@ async fn snapshot_request_shape_pre_turn_compaction_including_incoming_user_mess
|
||||
);
|
||||
assert!(
|
||||
!compact_shape.contains("USER_THREE"),
|
||||
"current main behavior excludes incoming user message from pre-turn compaction input"
|
||||
"current behavior excludes incoming user message from pre-turn compaction input"
|
||||
);
|
||||
let follow_up_has_incoming_image = requests[3].inputs_of_type("message").iter().any(|item| {
|
||||
if item.get("role").and_then(Value::as_str) != Some("user") {
|
||||
@@ -3233,7 +3233,7 @@ async fn snapshot_request_shape_pre_turn_compaction_including_incoming_user_mess
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
// TODO(ccunningham): Update once pre-turn compaction context-overflow handling includes incoming
|
||||
// user input and emits richer oversized-input messaging on main.
|
||||
// user input and emits richer oversized-input messaging.
|
||||
async fn snapshot_request_shape_pre_turn_compaction_context_window_exceeded() {
|
||||
skip_if_no_network!();
|
||||
|
||||
@@ -3307,9 +3307,9 @@ async fn snapshot_request_shape_pre_turn_compaction_context_window_exceeded() {
|
||||
insta::assert_snapshot!(
|
||||
"pre_turn_compaction_context_window_exceeded_shapes",
|
||||
sectioned_request_shapes(
|
||||
"Pre-turn auto-compaction context-window failure on main: compaction request excludes the incoming user message and the turn errors.",
|
||||
"Pre-turn auto-compaction context-window failure : compaction request excludes the incoming user message and the turn errors.",
|
||||
&[(
|
||||
"Local Compaction Request (Incoming User Excluded on main)",
|
||||
"Local Compaction Request (Incoming User Excluded)",
|
||||
&requests[1]
|
||||
),]
|
||||
)
|
||||
@@ -3317,7 +3317,7 @@ async fn snapshot_request_shape_pre_turn_compaction_context_window_exceeded() {
|
||||
|
||||
assert!(
|
||||
!include_attempt_shape.contains("USER_TWO"),
|
||||
"current main behavior excludes incoming user message from pre-turn compaction input"
|
||||
"current behavior excludes incoming user message from pre-turn compaction input"
|
||||
);
|
||||
assert!(
|
||||
error_message.contains("ran out of room in the model's context window"),
|
||||
|
||||
@@ -1494,7 +1494,7 @@ async fn remote_compact_refreshes_stale_developer_instructions_without_resume()
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
// TODO(ccunningham): Update once remote pre-turn compaction includes incoming user input on main.
|
||||
// TODO(ccunningham): Update once remote pre-turn compaction includes incoming user input.
|
||||
async fn snapshot_request_shape_remote_pre_turn_compaction_including_incoming_user_message()
|
||||
-> Result<()> {
|
||||
skip_if_no_network!(Ok(()));
|
||||
@@ -1582,7 +1582,7 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_including_incoming_us
|
||||
insta::assert_snapshot!(
|
||||
"remote_pre_turn_compaction_including_incoming_shapes",
|
||||
sectioned_request_shapes(
|
||||
"Remote pre-turn auto-compaction with a context override emits the context diff in the compact request while excluding the incoming user message on main.",
|
||||
"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", &compact_request),
|
||||
("Remote Post-Compaction History Layout", &requests[2]),
|
||||
@@ -1595,7 +1595,7 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_including_incoming_us
|
||||
);
|
||||
assert!(
|
||||
!compact_shape.contains("USER_THREE"),
|
||||
"current main behavior excludes incoming user message from remote pre-turn compaction input"
|
||||
"current behavior excludes incoming user message from remote pre-turn compaction input"
|
||||
);
|
||||
assert!(
|
||||
follow_up_shape.contains("<SUMMARY:REMOTE_PRE_TURN_SUMMARY>"),
|
||||
@@ -1607,7 +1607,7 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_including_incoming_us
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
// TODO(ccunningham): Update once remote pre-turn compaction failure path includes incoming
|
||||
// user input on main.
|
||||
// user input.
|
||||
async fn snapshot_request_shape_remote_pre_turn_compaction_failure_stops_without_retry()
|
||||
-> Result<()> {
|
||||
skip_if_no_network!(Ok(()));
|
||||
@@ -1689,16 +1689,16 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_failure_stops_without
|
||||
insta::assert_snapshot!(
|
||||
"remote_pre_turn_compaction_failure_shapes",
|
||||
sectioned_request_shapes(
|
||||
"Remote pre-turn auto-compaction parse failure on main: compaction request excludes the incoming user message and the turn stops.",
|
||||
"Remote pre-turn auto-compaction parse failure : compaction request excludes the incoming user message and the turn stops.",
|
||||
&[(
|
||||
"Remote Compaction Request (Incoming User Excluded on main)",
|
||||
"Remote Compaction Request (Incoming User Excluded)",
|
||||
&include_attempt_request
|
||||
),]
|
||||
)
|
||||
);
|
||||
assert!(
|
||||
!include_attempt_shape.contains("USER_TWO"),
|
||||
"current main behavior excludes incoming user message from remote pre-turn compaction input"
|
||||
"current behavior excludes incoming user message from remote pre-turn compaction input"
|
||||
);
|
||||
assert!(
|
||||
error_message.contains("invalid compact payload shape")
|
||||
@@ -1834,7 +1834,7 @@ async fn snapshot_request_shape_remote_manual_compact_without_previous_user_mess
|
||||
assert_eq!(
|
||||
compact_mock.requests().len(),
|
||||
1,
|
||||
"current main behavior still issues remote compaction for manual /compact without prior user"
|
||||
"current behavior still issues remote compaction for manual /compact without prior user"
|
||||
);
|
||||
let compact_request = compact_mock.single_request();
|
||||
let follow_up_request = responses_mock.single_request();
|
||||
@@ -1842,7 +1842,7 @@ async fn snapshot_request_shape_remote_manual_compact_without_previous_user_mess
|
||||
insta::assert_snapshot!(
|
||||
"remote_manual_compact_without_prev_user_shapes",
|
||||
sectioned_request_shapes(
|
||||
"Remote manual /compact with no prior user turn still issues a compact request on main; follow-up turn carries canonical context and new user message.",
|
||||
"Remote manual /compact with no prior user turn still issues a compact request; follow-up turn carries canonical context and new user message.",
|
||||
&[
|
||||
("Remote Compaction Request", &compact_request),
|
||||
("Remote Post-Compaction History Layout", &follow_up_request),
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
source: core/tests/suite/compact.rs
|
||||
expression: "sectioned_request_shapes(\"Pre-turn auto-compaction context-window failure on main: compaction request excludes the incoming user message and the turn errors.\",\n&[(\"Local Compaction Request (Incoming User Excluded on main)\",\n&requests[1]),])"
|
||||
expression: "sectioned_request_shapes(\"Pre-turn auto-compaction context-window failure : compaction request excludes the incoming user message and the turn errors.\",\n&[(\"Local Compaction Request (Incoming User Excluded)\",\n&requests[1]),])"
|
||||
---
|
||||
Scenario: Pre-turn auto-compaction context-window failure on main: compaction request excludes the incoming user message and the turn errors.
|
||||
Scenario: Pre-turn auto-compaction context-window failure : compaction request excludes the incoming user message and the turn errors.
|
||||
|
||||
## Local Compaction Request (Incoming User Excluded on main)
|
||||
## Local Compaction Request (Incoming User Excluded)
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<AGENTS_MD>
|
||||
02:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
source: core/tests/suite/compact.rs
|
||||
expression: "sectioned_request_shapes(\"Pre-turn auto-compaction with a context override emits the context diff in the compact request while the incoming user message is still excluded on main.\",\n&[(\"Local Compaction Request\", &requests[2]),\n(\"Local Post-Compaction History Layout\", &requests[3]),])"
|
||||
expression: "sectioned_request_shapes(\"Pre-turn auto-compaction with a context override emits the context diff in the compact request while the incoming user message is still excluded.\",\n&[(\"Local Compaction Request\", &requests[2]),\n(\"Local Post-Compaction History Layout\", &requests[3]),])"
|
||||
---
|
||||
Scenario: Pre-turn auto-compaction with a context override emits the context diff in the compact request while the incoming user message is still excluded on main.
|
||||
Scenario: Pre-turn auto-compaction with a context override emits the context diff in the compact request while the incoming user message is still excluded.
|
||||
|
||||
## Local Compaction Request
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "sectioned_request_shapes(\"Remote manual /compact with no prior user turn still issues a compact request on main; follow-up turn carries canonical context and new user message.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", &follow_up_request),])"
|
||||
expression: "sectioned_request_shapes(\"Remote manual /compact with no prior user turn still issues a compact request; follow-up turn carries canonical context and new user message.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", &follow_up_request),])"
|
||||
---
|
||||
Scenario: Remote manual /compact with no prior user turn still issues a compact request on main; follow-up turn carries canonical context and new user message.
|
||||
Scenario: Remote manual /compact with no prior user turn still issues a compact request; follow-up turn carries canonical context and new user message.
|
||||
|
||||
## Remote Compaction Request
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "sectioned_request_shapes(\"Remote pre-turn auto-compaction parse failure on main: compaction request excludes the incoming user message and the turn stops.\",\n&[(\"Remote Compaction Request (Incoming User Excluded on main)\",\n&include_attempt_request),])"
|
||||
expression: "sectioned_request_shapes(\"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&include_attempt_request),])"
|
||||
---
|
||||
Scenario: Remote pre-turn auto-compaction parse failure on main: compaction request excludes the incoming user message and the turn stops.
|
||||
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 on main)
|
||||
## Remote Compaction Request (Incoming User Excluded)
|
||||
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
|
||||
01:message/user:<AGENTS_MD>
|
||||
02:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
source: core/tests/suite/compact_remote.rs
|
||||
expression: "sectioned_request_shapes(\"Remote pre-turn auto-compaction with a context override emits the context diff in the compact request while excluding the incoming user message on main.\",\n&[(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", &requests[2]),])"
|
||||
expression: "sectioned_request_shapes(\"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 on main.
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user