mirror of
https://github.com/openai/codex.git
synced 2026-04-26 15:45:02 +00:00
chore: clean up argument-comment lint and roll out all-target CI on macOS (#16054)
## Why `argument-comment-lint` was green in CI even though the repo still had many uncommented literal arguments. The main gap was target coverage: the repo wrapper did not force Cargo to inspect test-only call sites, so examples like the `latest_session_lookup_params(true, ...)` tests in `codex-rs/tui_app_server/src/lib.rs` never entered the blocking CI path. This change cleans up the existing backlog, makes the default repo lint path cover all Cargo targets, and starts rolling that stricter CI enforcement out on the platform where it is currently validated. ## What changed - mechanically fixed existing `argument-comment-lint` violations across the `codex-rs` workspace, including tests, examples, and benches - updated `tools/argument-comment-lint/run-prebuilt-linter.sh` and `tools/argument-comment-lint/run.sh` so non-`--fix` runs default to `--all-targets` unless the caller explicitly narrows the target set - fixed both wrappers so forwarded cargo arguments after `--` are preserved with a single separator - documented the new default behavior in `tools/argument-comment-lint/README.md` - updated `rust-ci` so the macOS lint lane keeps the plain wrapper invocation and therefore enforces `--all-targets`, while Linux and Windows temporarily pass `-- --lib --bins` That temporary CI split keeps the stricter all-targets check where it is already cleaned up, while leaving room to finish the remaining Linux- and Windows-specific target-gated cleanup before enabling `--all-targets` on those runners. The Linux and Windows failures on the intermediate revision were caused by the wrapper forwarding bug, not by additional lint findings in those lanes. ## Validation - `bash -n tools/argument-comment-lint/run.sh` - `bash -n tools/argument-comment-lint/run-prebuilt-linter.sh` - shell-level wrapper forwarding check for `-- --lib --bins` - shell-level wrapper forwarding check for `-- --tests` - `just argument-comment-lint` - `cargo test` in `tools/argument-comment-lint` - `cargo test -p codex-terminal-detection` ## Follow-up - Clean up remaining Linux-only target-gated callsites, then switch the Linux lint lane back to the plain wrapper invocation. - Clean up remaining Windows-only target-gated callsites, then switch the Windows lint lane back to the plain wrapper invocation.
This commit is contained in:
@@ -125,7 +125,11 @@ async fn shell_output_stays_json_without_freeform_apply_patch(
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let server = start_mock_server().await;
|
||||
let mut builder = configure_shell_model(test_codex(), output_type, false);
|
||||
let mut builder = configure_shell_model(
|
||||
test_codex(),
|
||||
output_type,
|
||||
/*include_apply_patch_tool*/ false,
|
||||
);
|
||||
let test = builder.build(&server).await?;
|
||||
|
||||
let call_id = "shell-json";
|
||||
@@ -177,7 +181,11 @@ async fn shell_output_is_structured_with_freeform_apply_patch(
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let server = start_mock_server().await;
|
||||
let mut builder = configure_shell_model(test_codex(), output_type, true);
|
||||
let mut builder = configure_shell_model(
|
||||
test_codex(),
|
||||
output_type,
|
||||
/*include_apply_patch_tool*/ true,
|
||||
);
|
||||
let test = builder.build(&server).await?;
|
||||
|
||||
let call_id = "shell-structured";
|
||||
@@ -222,7 +230,11 @@ async fn shell_output_preserves_fixture_json_without_serialization(
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let server = start_mock_server().await;
|
||||
let mut builder = configure_shell_model(test_codex(), output_type, false);
|
||||
let mut builder = configure_shell_model(
|
||||
test_codex(),
|
||||
output_type,
|
||||
/*include_apply_patch_tool*/ false,
|
||||
);
|
||||
let test = builder.build(&server).await?;
|
||||
|
||||
let fixture_path = test.cwd.path().join("fixture.json");
|
||||
@@ -286,7 +298,11 @@ async fn shell_output_structures_fixture_with_serialization(
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let server = start_mock_server().await;
|
||||
let mut builder = configure_shell_model(test_codex(), output_type, true);
|
||||
let mut builder = configure_shell_model(
|
||||
test_codex(),
|
||||
output_type,
|
||||
/*include_apply_patch_tool*/ true,
|
||||
);
|
||||
let test = builder.build(&server).await?;
|
||||
|
||||
let fixture_path = test.cwd.path().join("fixture.json");
|
||||
@@ -345,7 +361,11 @@ async fn shell_output_for_freeform_tool_records_duration(
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let server = start_mock_server().await;
|
||||
let mut builder = configure_shell_model(test_codex(), output_type, true);
|
||||
let mut builder = configure_shell_model(
|
||||
test_codex(),
|
||||
output_type,
|
||||
/*include_apply_patch_tool*/ true,
|
||||
);
|
||||
let test = builder.build(&server).await?;
|
||||
|
||||
let call_id = "shell-structured";
|
||||
@@ -395,10 +415,14 @@ async fn shell_output_reserializes_truncated_content(output_type: ShellModelOutp
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let server = start_mock_server().await;
|
||||
let mut builder =
|
||||
configure_shell_model(test_codex(), output_type, true).with_config(move |config| {
|
||||
config.tool_output_token_limit = Some(200);
|
||||
});
|
||||
let mut builder = configure_shell_model(
|
||||
test_codex(),
|
||||
output_type,
|
||||
/*include_apply_patch_tool*/ true,
|
||||
)
|
||||
.with_config(move |config| {
|
||||
config.tool_output_token_limit = Some(200);
|
||||
});
|
||||
let test = builder.build(&server).await?;
|
||||
|
||||
let call_id = "shell-truncated";
|
||||
|
||||
Reference in New Issue
Block a user