mirror of
https://github.com/openai/codex.git
synced 2026-05-01 09:56:37 +00:00
Use released DotSlash package for argument-comment lint (#15199)
## Why The argument-comment lint now has a packaged DotSlash artifact from [#15198](https://github.com/openai/codex/pull/15198), so the normal repo lint path should use that released payload instead of rebuilding the lint from source every time. That keeps `just clippy` and CI aligned with the shipped artifact while preserving a separate source-build path for people actively hacking on the lint crate. The current alpha package also exposed two integration wrinkles that the repo-side prebuilt wrapper needs to smooth over: - the bundled Dylint library filename includes the host triple, for example `@nightly-2025-09-18-aarch64-apple-darwin`, and Dylint derives `RUSTUP_TOOLCHAIN` from that filename - on Windows, Dylint's driver path also expects `RUSTUP_HOME` to be present in the environment Without those adjustments, the prebuilt CI jobs fail during `cargo metadata` or driver setup. This change makes the checked-in prebuilt wrapper normalize the packaged library name to the plain `nightly-2025-09-18` channel before invoking `cargo-dylint`, and it teaches both the wrapper and the packaged runner source to infer `RUSTUP_HOME` from `rustup show home` when the environment does not already provide it. After the prebuilt Windows lint job started running successfully, it also surfaced a handful of existing anonymous literal callsites in `windows-sandbox-rs`. This PR now annotates those callsites so the new cross-platform lint job is green on the current tree. ## What Changed - checked in the current `tools/argument-comment-lint/argument-comment-lint` DotSlash manifest - kept `tools/argument-comment-lint/run.sh` as the source-build wrapper for lint development - added `tools/argument-comment-lint/run-prebuilt-linter.sh` as the normal enforcement path, using the checked-in DotSlash package and bundled `cargo-dylint` - updated `just clippy` and `just argument-comment-lint` to use the prebuilt wrapper - split `.github/workflows/rust-ci.yml` so source-package checks live in a dedicated `argument_comment_lint_package` job, while the released lint runs in an `argument_comment_lint_prebuilt` matrix on Linux, macOS, and Windows - kept the pinned `nightly-2025-09-18` toolchain install in the prebuilt CI matrix, since the prebuilt package still relies on rustup-provided toolchain components - updated `tools/argument-comment-lint/run-prebuilt-linter.sh` to normalize host-qualified nightly library filenames, keep the `rustup` shim directory ahead of direct toolchain `cargo` binaries, and export `RUSTUP_HOME` when needed for Windows Dylint driver setup - updated `tools/argument-comment-lint/src/bin/argument-comment-lint.rs` so future published DotSlash artifacts apply the same nightly-filename normalization and `RUSTUP_HOME` inference internally - fixed the remaining Windows lint violations in `codex-rs/windows-sandbox-rs` by adding the required `/*param*/` comments at the reported callsites - documented the checked-in DotSlash file, wrapper split, archive layout, nightly prerequisite, and Windows `RUSTUP_HOME` requirement in `tools/argument-comment-lint/README.md`
This commit is contained in:
@@ -2901,7 +2901,7 @@ impl App {
|
||||
Ok(()) => {
|
||||
session_telemetry.counter(
|
||||
"codex.windows_sandbox.elevated_setup_success",
|
||||
1,
|
||||
/*inc*/ 1,
|
||||
&[],
|
||||
);
|
||||
AppEvent::EnableWindowsSandboxForAgentMode {
|
||||
@@ -2931,7 +2931,7 @@ impl App {
|
||||
codex_core::windows_sandbox::elevated_setup_failure_metric_name(
|
||||
&err,
|
||||
),
|
||||
1,
|
||||
/*inc*/ 1,
|
||||
&tags,
|
||||
);
|
||||
tracing::error!(
|
||||
@@ -2972,7 +2972,7 @@ impl App {
|
||||
) {
|
||||
session_telemetry.counter(
|
||||
"codex.windows_sandbox.legacy_setup_preflight_failed",
|
||||
1,
|
||||
/*inc*/ 1,
|
||||
&[],
|
||||
);
|
||||
tracing::warn!(
|
||||
@@ -2997,7 +2997,7 @@ impl App {
|
||||
self.chat_widget
|
||||
.add_to_history(history_cell::new_info_event(
|
||||
format!("Granting sandbox read access to {path} ..."),
|
||||
None,
|
||||
/*hint*/ None,
|
||||
));
|
||||
|
||||
let policy = self.config.permissions.sandbox_policy.get().clone();
|
||||
@@ -3072,11 +3072,13 @@ impl App {
|
||||
match builder.apply().await {
|
||||
Ok(()) => {
|
||||
if elevated_enabled {
|
||||
self.config.set_windows_sandbox_enabled(false);
|
||||
self.config.set_windows_elevated_sandbox_enabled(true);
|
||||
self.config.set_windows_sandbox_enabled(/*value*/ false);
|
||||
self.config
|
||||
.set_windows_elevated_sandbox_enabled(/*value*/ true);
|
||||
} else {
|
||||
self.config.set_windows_sandbox_enabled(true);
|
||||
self.config.set_windows_elevated_sandbox_enabled(false);
|
||||
self.config.set_windows_sandbox_enabled(/*value*/ true);
|
||||
self.config
|
||||
.set_windows_elevated_sandbox_enabled(/*value*/ false);
|
||||
}
|
||||
self.chat_widget.set_windows_sandbox_mode(
|
||||
self.config.permissions.windows_sandbox_mode,
|
||||
@@ -6454,7 +6456,7 @@ guardian_approval = true
|
||||
make_header(true),
|
||||
Arc::new(crate::history_cell::new_info_event(
|
||||
"startup tip that used to replay".to_string(),
|
||||
None,
|
||||
/*hint*/ None,
|
||||
)) as Arc<dyn HistoryCell>,
|
||||
user_cell("Tell me a long story about a town with a dark lighthouse."),
|
||||
agent_cell(story_part_one),
|
||||
|
||||
Reference in New Issue
Block a user