chore: enforce argument-comment lint across all targets

This commit is contained in:
Michael Bolin
2026-03-27 17:34:47 -07:00
parent f4f6eca871
commit f05597bbc0
307 changed files with 7720 additions and 4706 deletions
+2 -2
View File
@@ -408,7 +408,7 @@ mod tests {
&self,
id: TaskId,
) -> codex_cloud_tasks_client::Result<TaskSummary> {
self.list_tasks(None, None, None)
self.list_tasks(/*env*/ None, /*limit*/ None, /*cursor*/ None)
.await?
.tasks
.into_iter()
@@ -497,7 +497,7 @@ mod tests {
let backend = FakeBackend { by_env };
// Act + Assert
let root = load_tasks(&backend, None).await.unwrap();
let root = load_tasks(&backend, /*env*/ None).await.unwrap();
assert_eq!(root.len(), 2);
assert_eq!(root[0].title, "root-1");
+18 -9
View File
@@ -2174,7 +2174,7 @@ mod tests {
async fn branch_override_is_used_when_provided() {
let git_ref = resolve_git_ref_with_git_info(
Some(&"feature/override".to_string()),
&StubGitInfo::new(None, None),
&StubGitInfo::new(/*default_branch*/ None, /*current_branch*/ None),
)
.await;
@@ -2185,7 +2185,7 @@ mod tests {
async fn trims_override_whitespace() {
let git_ref = resolve_git_ref_with_git_info(
Some(&" feature/spaces ".to_string()),
&StubGitInfo::new(None, None),
&StubGitInfo::new(/*default_branch*/ None, /*current_branch*/ None),
)
.await;
@@ -2195,7 +2195,7 @@ mod tests {
#[tokio::test]
async fn prefers_current_branch_when_available() {
let git_ref = resolve_git_ref_with_git_info(
None,
/*branch_override*/ None,
&StubGitInfo::new(
Some("default-main".to_string()),
Some("feature/current".to_string()),
@@ -2209,8 +2209,8 @@ mod tests {
#[tokio::test]
async fn falls_back_to_current_branch_when_default_is_missing() {
let git_ref = resolve_git_ref_with_git_info(
None,
&StubGitInfo::new(None, Some("develop".to_string())),
/*branch_override*/ None,
&StubGitInfo::new(/*default_branch*/ None, Some("develop".to_string())),
)
.await;
@@ -2219,7 +2219,11 @@ mod tests {
#[tokio::test]
async fn falls_back_to_main_when_no_git_info_is_available() {
let git_ref = resolve_git_ref_with_git_info(None, &StubGitInfo::new(None, None)).await;
let git_ref = resolve_git_ref_with_git_info(
/*branch_override*/ None,
&StubGitInfo::new(/*default_branch*/ None, /*current_branch*/ None),
)
.await;
assert_eq!(git_ref, "main");
}
@@ -2242,7 +2246,7 @@ mod tests {
is_review: false,
attempt_total: None,
};
let lines = format_task_status_lines(&task, now, false);
let lines = format_task_status_lines(&task, now, /*colorize*/ false);
assert_eq!(
lines,
vec![
@@ -2267,7 +2271,7 @@ mod tests {
is_review: false,
attempt_total: Some(1),
};
let lines = format_task_status_lines(&task, now, false);
let lines = format_task_status_lines(&task, now, /*colorize*/ false);
assert_eq!(
lines,
vec![
@@ -2309,7 +2313,12 @@ mod tests {
attempt_total: Some(1),
},
];
let lines = format_task_list_lines(&tasks, "https://chatgpt.com/backend-api", now, false);
let lines = format_task_list_lines(
&tasks,
"https://chatgpt.com/backend-api",
now,
/*colorize*/ false,
);
assert_eq!(
lines,
vec![
+24 -12
View File
@@ -5,23 +5,35 @@ use codex_cloud_tasks_client::MockClient;
async fn mock_backend_varies_by_env() {
let client = MockClient;
let root = CloudBackend::list_tasks(&client, None, None, None)
.await
.unwrap()
.tasks;
let root = CloudBackend::list_tasks(
&client, /*env*/ None, /*limit*/ None, /*cursor*/ None,
)
.await
.unwrap()
.tasks;
assert!(root.iter().any(|t| t.title.contains("Update README")));
let a = CloudBackend::list_tasks(&client, Some("env-A"), None, None)
.await
.unwrap()
.tasks;
let a = CloudBackend::list_tasks(
&client,
Some("env-A"),
/*limit*/ None,
/*cursor*/ None,
)
.await
.unwrap()
.tasks;
assert_eq!(a.len(), 1);
assert_eq!(a[0].title, "A: First");
let b = CloudBackend::list_tasks(&client, Some("env-B"), None, None)
.await
.unwrap()
.tasks;
let b = CloudBackend::list_tasks(
&client,
Some("env-B"),
/*limit*/ None,
/*cursor*/ None,
)
.await
.unwrap()
.tasks;
assert_eq!(b.len(), 2);
assert!(b[0].title.starts_with("B: "));
}