Remove unrelated test stabilization changes

This commit is contained in:
pakrym-oai
2026-04-07 14:59:54 -07:00
parent 8c3060813b
commit 2bc85545b0
3 changed files with 9 additions and 43 deletions

View File

@@ -356,6 +356,7 @@ async fn get_auth_status_omits_token_after_proactive_refresh_failure() -> Result
"code": "refresh_token_reused"
}
})))
.expect(2)
.mount(&server)
.await;
@@ -395,6 +396,7 @@ async fn get_auth_status_omits_token_after_proactive_refresh_failure() -> Result
}
);
server.verify().await;
Ok(())
}
@@ -421,6 +423,7 @@ async fn get_auth_status_returns_token_after_proactive_refresh_recovery() -> Res
"code": "refresh_token_reused"
}
})))
.expect(2)
.mount(&server)
.await;
@@ -493,6 +496,7 @@ async fn get_auth_status_returns_token_after_proactive_refresh_recovery() -> Res
}
);
server.verify().await;
Ok(())
}

View File

@@ -1164,45 +1164,6 @@ async fn record_initial_history_reconstructs_forked_transcript() {
assert_eq!(expected, history.raw_items());
}
fn normalize_fork_startup_request_snapshot(snapshot: &str) -> String {
let lines = snapshot.lines().collect::<Vec<_>>();
let developer_index = lines
.iter()
.position(|line| {
*line == "00:message/developer[2]:" || line.ends_with(":message/developer[2]:")
})
.expect("fork request should contain developer[2] instructions");
let _env_line = lines
.iter()
.find(|line| line.contains("message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>"))
.copied()
.expect("fork request should contain environment context");
let _after_fork_line = lines
.iter()
.find(|line| line.ends_with("message/user:after fork"))
.copied()
.expect("fork request should contain the post-fork user input");
let mut normalized = vec![
lines[0].to_string(),
lines[1].to_string(),
lines[2].to_string(),
"00:message/developer[2]:".to_string(),
];
normalized.extend(
lines[developer_index + 1..]
.iter()
.copied()
.take_while(|line| line.starts_with(" "))
.map(str::to_string),
);
normalized.extend([
"01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>".to_string(),
"02:message/user:after fork".to_string(),
]);
normalized.join("\n")
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn fork_startup_context_then_first_turn_diff_snapshot() -> anyhow::Result<()> {
let server = start_mock_server().await;
@@ -1304,7 +1265,6 @@ async fn fork_startup_context_then_first_turn_diff_snapshot() -> anyhow::Result<
.strip_capability_instructions()
.strip_agents_md_user_context(),
);
let snapshot = normalize_fork_startup_request_snapshot(&snapshot);
let mut settings = insta::Settings::clone_current();
settings.set_snapshot_path("snapshots");

View File

@@ -6,8 +6,10 @@ expression: snapshot
Scenario: First request after fork when startup preserves the parent baseline, the fork changes approval policy, and the first forked turn enters plan mode.
## First Forked Turn Request
00:message/developer[2]:
00:message/developer:<PERMISSIONS_INSTRUCTIONS>
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
02:message/user:fork seed
03:message/developer[2]:
[01] <PERMISSIONS_INSTRUCTIONS>
[02] <collaboration_mode>Fork turn collaboration instructions.</collaboration_mode>
01:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
02:message/user:after fork
04:message/user:after fork