Apply argument comment lint across codex-rs (#14652)

## Why

Once the repo-local lint exists, `codex-rs` needs to follow the
checked-in convention and CI needs to keep it from drifting. This commit
applies the fallback `/*param*/` style consistently across existing
positional literal call sites without changing those APIs.

The longer-term preference is still to avoid APIs that require comments
by choosing clearer parameter types and call shapes. This PR is
intentionally the mechanical follow-through for the places where the
existing signatures stay in place.

After rebasing onto newer `main`, the rollout also had to cover newly
introduced `tui_app_server` call sites. That made it clear the first cut
of the CI job was too expensive for the common path: it was spending
almost as much time installing `cargo-dylint` and re-testing the lint
crate as a representative test job spends running product tests. The CI
update keeps the full workspace enforcement but trims that extra
overhead from ordinary `codex-rs` PRs.

## What changed

- keep a dedicated `argument_comment_lint` job in `rust-ci`
- mechanically annotate remaining opaque positional literals across
`codex-rs` with exact `/*param*/` comments, including the rebased
`tui_app_server` call sites that now fall under the lint
- keep the checked-in style aligned with the lint policy by using
`/*param*/` and leaving string and char literals uncommented
- cache `cargo-dylint`, `dylint-link`, and the relevant Cargo
registry/git metadata in the lint job
- split changed-path detection so the lint crate's own `cargo test` step
runs only when `tools/argument-comment-lint/*` or `rust-ci.yml` changes
- continue to run the repo wrapper over the `codex-rs` workspace, so
product-code enforcement is unchanged

Most of the code changes in this commit are intentionally mechanical
comment rewrites or insertions driven by the lint itself.

## Verification

- `./tools/argument-comment-lint/run.sh --workspace`
- `cargo test -p codex-tui-app-server -p codex-tui`
- parsed `.github/workflows/rust-ci.yml` locally with PyYAML

---

* -> #14652
* #14651
This commit is contained in:
Michael Bolin authored and GitHub committed 2026-03-16 16:48:15 -07:00
1 parent 6f05d8d735
commit b77fe8fefe
261 files changed
+2311 -1377

No files matched your search

+25 -16
View File
@@ -700,14 +700,14 @@ impl BottomPane {
pub(crate) fn show_esc_backtrack_hint(&mut self) {
self.esc_backtrack_hint = true;
self.composer.set_esc_backtrack_hint(true);
self.composer.set_esc_backtrack_hint(/*show*/ true);
self.request_redraw();
}
pub(crate) fn clear_esc_backtrack_hint(&mut self) {
if self.esc_backtrack_hint {
self.esc_backtrack_hint = false;
self.composer.set_esc_backtrack_hint(false);
self.composer.set_esc_backtrack_hint(/*show*/ false);
self.request_redraw();
}
}
@@ -729,7 +729,7 @@ impl BottomPane {
));
}
if let Some(status) = self.status.as_mut() {
status.set_interrupt_hint_visible(true);
status.set_interrupt_hint_visible(/*visible*/ true);
}
self.sync_status_inline_message();
self.request_redraw();
@@ -943,7 +943,7 @@ impl BottomPane {
);
self.pause_status_timer_for_modal();
self.set_composer_input_enabled(
false,
/*enabled*/ false,
Some("Answer the questions to continue.".to_string()),
);
self.push_view(Box::new(modal));
@@ -1004,7 +1004,7 @@ impl BottomPane {
);
self.pause_status_timer_for_modal();
self.set_composer_input_enabled(
false,
/*enabled*/ false,
Some("Respond to the tool suggestion to continue.".to_string()),
);
self.push_view(Box::new(view));
@@ -1020,7 +1020,7 @@ impl BottomPane {
);
self.pause_status_timer_for_modal();
self.set_composer_input_enabled(
false,
/*enabled*/ false,
Some("Respond to the MCP server request to continue.".to_string()),
);
self.push_view(Box::new(modal));
@@ -1028,7 +1028,7 @@ impl BottomPane {
fn on_active_view_complete(&mut self) {
self.resume_status_timer_after_modal();
self.set_composer_input_enabled(true, None);
self.set_composer_input_enabled(/*enabled*/ true, /*placeholder*/ None);
}
fn pause_status_timer_for_modal(&mut self) {
@@ -1131,12 +1131,15 @@ impl BottomPane {
} else {
let mut flex = FlexRenderable::new();
if let Some(status) = &self.status {
flex.push(0, RenderableItem::Borrowed(status));
flex.push(/*flex*/ 0, RenderableItem::Borrowed(status));
}
// Avoid double-surfacing the same summary and avoid adding an extra
// row while the status line is already visible.
if self.status.is_none() && !self.unified_exec_footer.is_empty() {
flex.push(0, RenderableItem::Borrowed(&self.unified_exec_footer));
flex.push(
/*flex*/ 0,
RenderableItem::Borrowed(&self.unified_exec_footer),
);
}
let has_pending_thread_approvals = !self.pending_thread_approvals.is_empty();
let has_pending_input = !self.pending_input_preview.queued_messages.is_empty()
@@ -1145,19 +1148,25 @@ impl BottomPane {
self.status.is_some() || !self.unified_exec_footer.is_empty();
let has_inline_previews = has_pending_thread_approvals || has_pending_input;
if has_inline_previews && has_status_or_footer {
flex.push(0, RenderableItem::Owned("".into()));
flex.push(/*flex*/ 0, RenderableItem::Owned("".into()));
}
flex.push(1, RenderableItem::Borrowed(&self.pending_thread_approvals));
flex.push(
/*flex*/ 1,
RenderableItem::Borrowed(&self.pending_thread_approvals),
);
if has_pending_thread_approvals && has_pending_input {
flex.push(0, RenderableItem::Owned("".into()));
flex.push(/*flex*/ 0, RenderableItem::Owned("".into()));
}
flex.push(1, RenderableItem::Borrowed(&self.pending_input_preview));
flex.push(
/*flex*/ 1,
RenderableItem::Borrowed(&self.pending_input_preview),
);
if !has_inline_previews && has_status_or_footer {
flex.push(0, RenderableItem::Owned("".into()));
flex.push(/*flex*/ 0, RenderableItem::Owned("".into()));
}
let mut flex2 = FlexRenderable::new();
flex2.push(1, RenderableItem::Owned(flex.into()));
flex2.push(0, RenderableItem::Borrowed(&self.composer));
flex2.push(/*flex*/ 1, RenderableItem::Owned(flex.into()));
flex2.push(/*flex*/ 0, RenderableItem::Borrowed(&self.composer));
RenderableItem::Owned(Box::new(flex2))
}
}