Skip to content
Open
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
10 changes: 10 additions & 0 deletions .github/workflows/rust-ci-full-nextest-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ jobs:
with:
targets: ${{ inputs.target }}

- name: Install cross Rust target
if: ${{ inputs.target == 'x86_64-unknown-linux-musl' || inputs.target == 'aarch64-unknown-linux-musl' || inputs.target == 'aarch64-pc-windows-msvc' }}
shell: bash
run: rustup target add ${{ inputs.target }}

- name: Expose MSVC SDK environment (Windows)
if: ${{ runner.os == 'Windows' && inputs.target == 'aarch64-pc-windows-msvc' }}
uses: ./.github/actions/setup-msvc-env
Expand Down Expand Up @@ -392,6 +397,11 @@ jobs:
with:
targets: ${{ inputs.target }}

- name: Install cross Rust target
if: ${{ inputs.target == 'x86_64-unknown-linux-musl' || inputs.target == 'aarch64-unknown-linux-musl' || inputs.target == 'aarch64-pc-windows-msvc' }}
shell: bash
run: rustup target add ${{ inputs.target }}

- uses: taiki-e/install-action@50414676f9f5d50a65992c6dd2ed02641263226c # v2.82.10
with:
tool: nextest@0.9.103
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/rust-ci-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ jobs:
targets: ${{ matrix.target }}
components: clippy

- name: Install cross Rust target
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl' || matrix.target == 'aarch64-pc-windows-msvc' }}
shell: bash
run: rustup target add ${{ matrix.target }}

- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}}
name: Use hermetic Cargo home (musl)
shell: bash
Expand Down
30 changes: 20 additions & 10 deletions codex-rs/app-server/src/message_processor_schedule_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1788,45 +1788,50 @@ fn thread_schedule_create_nests_loops_to_depth_five() -> Result<()> {
let thread_id = thread.thread.id.clone();

let root = harness
.create_interval_thread_schedule(&thread_id, "root loop", 1, None)
.create_interval_thread_schedule(
&thread_id,
"root loop",
/*amount_minutes*/ 1,
/*parent_schedule_id*/ None,
)
.await;
let level_2 = harness
.create_interval_thread_schedule(
&thread_id,
"level 2 loop",
2,
/*amount_minutes*/ 2,
Some(root.schedule_id.clone()),
)
.await;
let branch = harness
.create_interval_thread_schedule(
&thread_id,
"branch level 2 loop",
3,
/*amount_minutes*/ 3,
Some(root.schedule_id.clone()),
)
.await;
let level_3 = harness
.create_interval_thread_schedule(
&thread_id,
"level 3 loop",
3,
/*amount_minutes*/ 3,
Some(level_2.schedule_id.clone()),
)
.await;
let level_4 = harness
.create_interval_thread_schedule(
&thread_id,
"level 4 loop",
4,
/*amount_minutes*/ 4,
Some(level_3.schedule_id.clone()),
)
.await;
let level_5 = harness
.create_interval_thread_schedule(
&thread_id,
"level 5 loop",
5,
/*amount_minutes*/ 5,
Some(level_4.schedule_id.clone()),
)
.await;
Expand Down Expand Up @@ -1889,21 +1894,26 @@ fn thread_schedule_delete_parent_emits_descendant_delete_notifications() -> Resu
let thread = harness.start_materialized_thread().await;
let thread_id = thread.thread.id.clone();
let root = harness
.create_interval_thread_schedule(&thread_id, "root loop", 1, None)
.create_interval_thread_schedule(
&thread_id,
"root loop",
/*amount_minutes*/ 1,
/*parent_schedule_id*/ None,
)
.await;
let child = harness
.create_interval_thread_schedule(
&thread_id,
"child loop",
2,
/*amount_minutes*/ 2,
Some(root.schedule_id.clone()),
)
.await;
let grandchild = harness
.create_interval_thread_schedule(
&thread_id,
"grandchild loop",
3,
/*amount_minutes*/ 3,
Some(child.schedule_id.clone()),
)
.await;
Expand Down Expand Up @@ -2296,7 +2306,7 @@ fn schedule_create_materializes_fresh_thread_rollout_before_first_user_turn() ->
let rollout_path = codex_rollout::find_thread_path_by_id_str(
harness._codex_home.path(),
&thread_id,
Option::<&codex_state::StateRuntime>::None,
/*state_db_ctx*/ Option::<&codex_state::StateRuntime>::None,
)
.await?
.expect("fresh scheduled thread should have a materialized rollout");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,10 @@ mod tests {
assert_eq!(named_api_peer.auth_profile.as_deref(), Some("work"));
assert_eq!(named_api_peer.auth_profile_kind, AuthProfileKind::Named);

let default_api_peer = api_active_session_peer(test_active_peer(ThreadId::new(), None));
let default_api_peer = api_active_session_peer(test_active_peer(
ThreadId::new(),
/*auth_profile*/ None,
));

assert_eq!(default_api_peer.auth_profile, None);
assert_eq!(default_api_peer.auth_profile_kind, AuthProfileKind::Default);
Expand Down Expand Up @@ -682,7 +685,7 @@ mod tests {
auth_profile,
process: None,
capabilities: ActivePeerCapabilities::codewith_session(),
last_seen_at: LastSeenAt::from_unix_seconds(100),
last_seen_at: LastSeenAt::from_unix_seconds(/*seconds*/ 100),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4640,7 +4640,9 @@ mod tests {
assert_eq!(goal.objective, "Investigate flaky test");
assert_eq!(goal.status, codex_state::ThreadGoalStatus::Active);
let events = state_db
.list_background_agent_events_after("goal-run", /*after_seq*/ None, None)
.list_background_agent_events_after(
"goal-run", /*after_seq*/ None, /*limit*/ None,
)
.await?;
let thread_id_string = thread_id.to_string();
let initial_goal_events = events
Expand Down Expand Up @@ -4672,7 +4674,9 @@ mod tests {
.await?;

let events = state_db
.list_background_agent_events_after("goal-run", /*after_seq*/ None, None)
.list_background_agent_events_after(
"goal-run", /*after_seq*/ None, /*limit*/ None,
)
.await?;
let initial_goal_event_count = events
.iter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ mod tests {

let local_session = api_local_session(
thread,
None,
None,
/*model*/ None,
/*thread_agent_path*/ None,
&live_overlay,
&auth_profile_account_labels,
&HashSet::new(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ mod tests {
state_db
.upsert_thread(&builder.build("test-provider"))
.await?;
let monitor = test_monitor_for_thread(thread_id, None);
let monitor = test_monitor_for_thread(thread_id, /*cwd*/ None);

assert_eq!(monitor_thread_cwd(&state_db, &monitor).await?, thread_cwd);
assert_ne!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ mod thread_processor_behavior_tests {
permission_profile: PermissionProfile,
) -> RolloutItem {
let RolloutItem::TurnContext(mut turn_context) =
turn_context_with_auth_profile(thread_id, None)
turn_context_with_auth_profile(thread_id, /*auth_profile*/ None)
else {
unreachable!("helper returns turn context")
};
Expand All @@ -1016,7 +1016,7 @@ mod thread_processor_behavior_tests {
workspace_roots: Vec<AbsolutePathBuf>,
) -> RolloutItem {
let RolloutItem::TurnContext(mut turn_context) =
turn_context_with_auth_profile(thread_id, None)
turn_context_with_auth_profile(thread_id, /*auth_profile*/ None)
else {
unreachable!("helper returns turn context")
};
Expand All @@ -1030,7 +1030,7 @@ mod thread_processor_behavior_tests {
approval_policy: AskForApproval,
) -> RolloutItem {
let RolloutItem::TurnContext(mut turn_context) =
turn_context_with_auth_profile(thread_id, None)
turn_context_with_auth_profile(thread_id, /*auth_profile*/ None)
else {
unreachable!("helper returns turn context")
};
Expand Down Expand Up @@ -1290,7 +1290,11 @@ mod thread_processor_behavior_tests {
});
let mut typesafe_overrides = ConfigOverrides::default();

merge_persisted_permission_profile_from_history(&mut typesafe_overrides, None, &history);
merge_persisted_permission_profile_from_history(
&mut typesafe_overrides,
/*request_overrides*/ None,
&history,
);

assert_eq!(
typesafe_overrides.permission_profile,
Expand All @@ -1314,7 +1318,11 @@ mod thread_processor_behavior_tests {
..Default::default()
};

merge_persisted_permission_profile_from_history(&mut typesafe_overrides, None, &history);
merge_persisted_permission_profile_from_history(
&mut typesafe_overrides,
/*request_overrides*/ None,
&history,
);

assert_eq!(typesafe_overrides.permission_profile, None);
assert_eq!(
Expand All @@ -1340,7 +1348,11 @@ mod thread_processor_behavior_tests {
});
let mut typesafe_overrides = ConfigOverrides::default();

merge_persisted_approval_settings_from_history(&mut typesafe_overrides, None, &history);
merge_persisted_approval_settings_from_history(
&mut typesafe_overrides,
/*request_overrides*/ None,
&history,
);

assert_eq!(
typesafe_overrides.approval_policy,
Expand Down Expand Up @@ -1370,7 +1382,11 @@ mod thread_processor_behavior_tests {
..Default::default()
};

merge_persisted_approval_settings_from_history(&mut typesafe_overrides, None, &history);
merge_persisted_approval_settings_from_history(
&mut typesafe_overrides,
/*request_overrides*/ None,
&history,
);

assert_eq!(
typesafe_overrides.approval_policy,
Expand Down Expand Up @@ -1469,7 +1485,7 @@ mod thread_processor_behavior_tests {

merge_persisted_cwd_and_workspace_roots_from_history(
&mut typesafe_overrides,
None,
/*request_overrides*/ None,
&history,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2683,7 +2683,7 @@ mod tests {
&schedule.schedule_id,
&retry_claim.run.run_id,
"lease-retry",
None,
/*error*/ None,
completed_at,
)
.await
Expand Down Expand Up @@ -2765,7 +2765,7 @@ mod tests {
&schedule.schedule_id,
&claim.run.run_id,
"lease-run",
None,
/*error*/ None,
completed_at,
)
.await
Expand Down Expand Up @@ -2853,7 +2853,7 @@ mod tests {
unit: codex_state::ThreadScheduleIntervalUnit::Minutes,
}),
"UTC",
None,
/*scheduled_for*/ None,
at(/*seconds*/ 1_700_000_300),
)
.expect("next interval should compute")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ mod tests {
chatgpt_profile("third"),
];
let health_by_profile = BTreeMap::from([
("second".to_string(), health(20.0)),
("third".to_string(), health(80.0)),
("second".to_string(), health(/*remaining_percent*/ 20.0)),
("third".to_string(), health(/*remaining_percent*/ 80.0)),
]);
let now = Instant::now();

Expand Down Expand Up @@ -810,7 +810,7 @@ mod tests {
&BTreeMap::new(),
&BTreeMap::new(),
Instant::now(),
1_000,
/*now_epoch*/ 1_000,
)
);
}
Expand Down Expand Up @@ -902,8 +902,8 @@ mod tests {
#[test]
fn highest_available_dispatch_selects_healthiest_non_exhausted_profile() {
let health_by_profile = BTreeMap::from([
("second".to_string(), health(20.0)),
("third".to_string(), health(80.0)),
("second".to_string(), health(/*remaining_percent*/ 20.0)),
("third".to_string(), health(/*remaining_percent*/ 80.0)),
]);

assert_eq!(
Expand Down Expand Up @@ -1009,7 +1009,7 @@ mod tests {
/*trigger_window_label*/ None,
/*is_fresh*/ true,
),
health(60.0)
health(/*remaining_percent*/ 60.0)
);
}
}
Loading
Loading