Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ async fn execute_native_provider_path(provider: &str, home: &Path) -> HostAdmiss
}

#[tokio::test]
async fn current_codex_user_pair_projects_once_and_rejects_malformed_items() {
async fn current_codex_user_pair_projects_each_record_and_rejects_malformed_items() {
let tmp = TempDir::new().unwrap();
let project = tmp.path().join("project");
std::fs::create_dir_all(&project).unwrap();
Expand Down Expand Up @@ -913,13 +913,16 @@ async fn current_codex_user_pair_projects_once_and_rejects_malformed_items() {
.await
.unwrap();

assert_eq!(projection.projected_outputs, 1);
// a2a0cb1c53 (#3884) made a user `response_item` message a turn of its
// own beside its `item_completed` echo. The two malformed items still
// project nothing.
assert_eq!(projection.projected_outputs, 2);
assert_eq!(
runtime
.session_message_count_for_test(HostAdmissionScope::Project, None)
.await
.unwrap(),
1
2
);
let messages = runtime
.search_session_messages_for_test(
Expand All @@ -931,8 +934,19 @@ async fn current_codex_user_pair_projects_once_and_rejects_malformed_items() {
)
.await
.unwrap();
assert_eq!(messages.len(), 1);
assert_eq!(messages[0].message.message_id, "user-item-1");
assert_eq!(messages.len(), 2);
assert!(
messages
.iter()
.all(|hit| hit.message.role == "user" && hit.message.text == prompt),
"{messages:?}"
);
assert!(
messages
.iter()
.any(|hit| hit.message.message_id == "user-item-1"),
"{messages:?}"
);
}

#[tokio::test]
Expand Down
7 changes: 6 additions & 1 deletion scripts/bazel/rust_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ def _isolated_rust_test_impl(ctx):
runfiles = runfiles.merge(target[DefaultInfo].default_runfiles)
test_environment = ctx.attr.test_binary[RunEnvironmentInfo]
environment = dict(test_environment.environment)
environment["RUSTUP_TOOLCHAIN"] = toolchain.version
# rustup names a dated nightly or beta `<channel>-<date>`. `version` alone
# is the compiler's semver (1.100.0 for nightly-2026-09-27), which rustup
# treats as an uninstalled stable toolchain, so rust-analyzer never starts.
environment["RUSTUP_TOOLCHAIN"] = (
"{}-{}".format(toolchain.channel, toolchain.iso_date) if toolchain.iso_date else toolchain.version
)
environment["RUSTC_WRAPPER"] = ""
environment["RUSTC_WORKSPACE_WRAPPER"] = ""
return [
Expand Down
Loading