From 16b0b7615203640570b26ff1b3c9503d81396066 Mon Sep 17 00:00:00 2001 From: Leonardo Araujo dos Santos Date: Thu, 12 Nov 2026 14:35:33 -0400 Subject: [PATCH 1/2] Fix lints from Rust 1.100 clippy CI uses the latest stable toolchain. Rust 1.100 (2026-11-09) flags a needless_bool in the workflow runs watcher and an unused futures dependency in cyber-collab, which fails clippy -D warnings on main. --- Cargo.lock | 1 - crates/cyber-cli/src/commands/workflows/runs.rs | 5 +---- crates/cyber-collab/Cargo.toml | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2bbdede92..792589157 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1107,7 +1107,6 @@ dependencies = [ "cyber-account", "cyber-core", "cyber-store", - "futures", "getrandom 0.3.4", "hmac", "http-body-util", diff --git a/crates/cyber-cli/src/commands/workflows/runs.rs b/crates/cyber-cli/src/commands/workflows/runs.rs index b4a8fa50f..dca150a68 100644 --- a/crates/cyber-cli/src/commands/workflows/runs.rs +++ b/crates/cyber-cli/src/commands/workflows/runs.rs @@ -256,10 +256,7 @@ impl Watch { for key in ["status", "phase", "agents", "tokens", "cost_usd"] { run[key] = data.get(key).cloned().unwrap_or(Value::Null); } - if !query.admits(run) || run["status"] == "queued" { - return true; - } - false + !query.admits(run) || run["status"] == "queued" } fn show(&mut self) -> Result<(), CliError> { diff --git a/crates/cyber-collab/Cargo.toml b/crates/cyber-collab/Cargo.toml index 9362500a1..749fc38ed 100644 --- a/crates/cyber-collab/Cargo.toml +++ b/crates/cyber-collab/Cargo.toml @@ -14,7 +14,6 @@ cyber-store.workspace = true axum = { version = "0.8", features = ["macros"] } base64 = "0.22" crossbeam-channel.workspace = true -futures = "0.3" getrandom = "0.3" hmac = "0.12" http-body-util = "0.1" From 0fc2eeb4991e32c579e6d7549bb13a639112b990 Mon Sep 17 00:00:00 2001 From: Leonardo Araujo dos Santos Date: Thu, 12 Nov 2026 15:06:32 -0400 Subject: [PATCH 2/2] Pin CI and release to Rust 1.99.1; fix Windows lint Cargo 1.100 builds test binaries under target//build/, so tests that locate the sandbox helper next to their executable fail. Pin every workflow to 1.99.1, the last toolchain main passed on, until the helper lookup is reworked for the new layout. Also rewrite executable_file so the Windows build has no needless_bool. --- .github/workflows/binary-editor-proof.yml | 3 +- .github/workflows/child-hook-regression.yml | 4 ++- .github/workflows/ci.yml | 23 +++++++++++---- .github/workflows/cwd-hook-regression.yml | 4 ++- .../workflows/file-observation-regression.yml | 4 ++- .github/workflows/non-git-snapshot-proof.yml | 4 ++- .../plugin-bootstrap-environment.yml | 4 ++- .github/workflows/plugin-linux-ipc.yml | 4 ++- .github/workflows/plugin-native-launcher.yml | 3 +- .github/workflows/plugin-package-copy.yml | 4 ++- .github/workflows/release.yml | 4 +-- .github/workflows/windows-tests.yml | 4 ++- .../cyber-core/src/intelligence/discovery.rs | 28 +++++++++---------- 13 files changed, 60 insertions(+), 33 deletions(-) diff --git a/.github/workflows/binary-editor-proof.yml b/.github/workflows/binary-editor-proof.yml index 762e1508b..55e69fee6 100644 --- a/.github/workflows/binary-editor-proof.yml +++ b/.github/workflows/binary-editor-proof.yml @@ -27,8 +27,9 @@ jobs: CARGO_PROFILE_TEST_DEBUG: line-tables-only steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit with: + toolchain: 1.99.1 components: clippy - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/child-hook-regression.yml b/.github/workflows/child-hook-regression.yml index 584dd6b25..fb923a954 100644 --- a/.github/workflows/child-hook-regression.yml +++ b/.github/workflows/child-hook-regression.yml @@ -32,7 +32,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 with: key: child-hook-regression diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fd8b96aa..3f8eddbc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,8 +54,11 @@ jobs: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL df -h / - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + # Every workflow pins Rust 1.99.1. Cargo 1.100 builds test binaries under + # target//build/, where tests no longer find the sandbox helper. + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit with: + toolchain: 1.99.1 components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 - name: Sandbox prerequisites @@ -85,8 +88,9 @@ jobs: runs-on: windows-2025 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit with: + toolchain: 1.99.1 components: clippy - uses: Swatinem/rust-cache@v2 with: @@ -102,7 +106,9 @@ jobs: timeout-minutes: 180 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 with: key: windows-native @@ -166,7 +172,9 @@ jobs: run: python3 ../../scripts/generate_sdk.py --check - run: npm ci - run: npm run typecheck - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 with: key: sdk @@ -252,8 +260,9 @@ jobs: shell: bash steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit with: + toolchain: 1.99.1 targets: ${{ matrix.target }} - uses: Swatinem/rust-cache@v2 with: @@ -295,7 +304,9 @@ jobs: node-version: '22' cache: npm cache-dependency-path: web/package-lock.json - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 - run: npm ci working-directory: web diff --git a/.github/workflows/cwd-hook-regression.yml b/.github/workflows/cwd-hook-regression.yml index bacd5c145..4569847ae 100644 --- a/.github/workflows/cwd-hook-regression.yml +++ b/.github/workflows/cwd-hook-regression.yml @@ -34,7 +34,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 with: key: cwd-hook-regression diff --git a/.github/workflows/file-observation-regression.yml b/.github/workflows/file-observation-regression.yml index 58eb5db21..0c963236d 100644 --- a/.github/workflows/file-observation-regression.yml +++ b/.github/workflows/file-observation-regression.yml @@ -56,7 +56,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 with: key: file-observation diff --git a/.github/workflows/non-git-snapshot-proof.yml b/.github/workflows/non-git-snapshot-proof.yml index d388f5dd2..f7404e49b 100644 --- a/.github/workflows/non-git-snapshot-proof.yml +++ b/.github/workflows/non-git-snapshot-proof.yml @@ -28,7 +28,9 @@ jobs: CARGO_PROFILE_TEST_DEBUG: line-tables-only steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 with: key: non-git-snapshot-proof diff --git a/.github/workflows/plugin-bootstrap-environment.yml b/.github/workflows/plugin-bootstrap-environment.yml index 441f17c33..4be1f1fee 100644 --- a/.github/workflows/plugin-bootstrap-environment.yml +++ b/.github/workflows/plugin-bootstrap-environment.yml @@ -47,7 +47,9 @@ jobs: - uses: denoland/setup-deno@v2 with: deno-version: 'v2.9.8' - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 - name: Linux sandbox prerequisites if: runner.os == 'Linux' diff --git a/.github/workflows/plugin-linux-ipc.yml b/.github/workflows/plugin-linux-ipc.yml index 2d00467f3..f25916132 100644 --- a/.github/workflows/plugin-linux-ipc.yml +++ b/.github/workflows/plugin-linux-ipc.yml @@ -59,7 +59,9 @@ jobs: - uses: denoland/setup-deno@v2 with: deno-version: 'v2.9.8' - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 - name: Prepare namespace prerequisites shell: bash diff --git a/.github/workflows/plugin-native-launcher.yml b/.github/workflows/plugin-native-launcher.yml index d63949132..29693cd31 100644 --- a/.github/workflows/plugin-native-launcher.yml +++ b/.github/workflows/plugin-native-launcher.yml @@ -53,8 +53,9 @@ jobs: if: runner.os != 'Windows' with: deno-version: 'v2.9.8' - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit with: + toolchain: 1.99.1 components: rustfmt - uses: Swatinem/rust-cache@v2 - name: Verify native musl C compilation diff --git a/.github/workflows/plugin-package-copy.yml b/.github/workflows/plugin-package-copy.yml index a37bc758a..3e1b8633c 100644 --- a/.github/workflows/plugin-package-copy.yml +++ b/.github/workflows/plugin-package-copy.yml @@ -38,7 +38,9 @@ jobs: CARGO_INCREMENTAL: 0 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 - name: Verify package capture and actual helper protocol shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afb63fdf6..795fb6362 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,9 +77,9 @@ jobs: - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: "3.12" - - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit with: - toolchain: stable + toolchain: 1.99.1 targets: ${{ matrix.target }} - name: Native C build prerequisites if: runner.os == 'Linux' diff --git a/.github/workflows/windows-tests.yml b/.github/workflows/windows-tests.yml index 3c3cae4ae..17c0ecc2a 100644 --- a/.github/workflows/windows-tests.yml +++ b/.github/workflows/windows-tests.yml @@ -17,7 +17,9 @@ jobs: runs-on: windows-2025 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # pinned commit + with: + toolchain: 1.99.1 - uses: Swatinem/rust-cache@v2 with: key: windows-tests diff --git a/crates/cyber-core/src/intelligence/discovery.rs b/crates/cyber-core/src/intelligence/discovery.rs index 5ba2cc7f5..0e7c45078 100644 --- a/crates/cyber-core/src/intelligence/discovery.rs +++ b/crates/cyber-core/src/intelligence/discovery.rs @@ -66,21 +66,19 @@ impl ExecutableSearch { } } fn executable_file(path: &Path) -> bool { - let Ok(metadata) = path.metadata() else { - return false; - }; - if !metadata.is_file() { - return false; - } - #[cfg(unix)] - { - use std::os::unix::fs::PermissionsExt; - metadata.permissions().mode() & 0o111 != 0 - } - #[cfg(not(unix))] - { - true - } + path.metadata() + .is_ok_and(|metadata| metadata.is_file() && executable_bits(&metadata)) +} + +#[cfg(unix)] +fn executable_bits(metadata: &std::fs::Metadata) -> bool { + use std::os::unix::fs::PermissionsExt; + metadata.permissions().mode() & 0o111 != 0 +} + +#[cfg(not(unix))] +fn executable_bits(_metadata: &std::fs::Metadata) -> bool { + true } #[derive(Debug, Clone, Serialize)]