Skip to content

fix(jobs): correct Windows-only cfg gates that break the workspace clippy gate - #460

Merged
getappz merged 1 commit into
masterfrom
task/440
Aug 12, 2026
Merged

fix(jobs): correct Windows-only cfg gates that break the workspace clippy gate#460
getappz merged 1 commit into
masterfrom
task/440

Conversation

@getappz

@getappz getappz commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Two cfg bugs in crates/agentflare-jobs/src/supervisor.rs, introduced by PR #443 (65f0788), that make the workspace clippy gate fail on a clean checkout on Windows. Neither changes behavior on Linux or macOS.

  1. descendant_pids's non-Linux stub is unreachable on Windows. It was gated #[cfg(not(target_os = "linux"))], but its only caller (kill_graceful) sits inside #[cfg(unix)]. On Windows the stub compiles while its caller does not, leaving it genuinely dead code. Narrowed to #[cfg(all(unix, not(target_os = "linux")))], which is the macOS/BSD case it was actually written for.

  2. The test module's glob import is unused off Linux. That module has exactly one test and it is #[cfg(target_os = "linux")]-gated, so use super::*; is unused on every other platform. Gated it to match.

Why this is being opened now

Item #440 was filed and marked completed on 2026-08-11, but the fix never shipped: the commit only ever existed on an unpushed local branch, no PR was opened, and master still fails the gate today. It surfaced again while verifying item #435 (PR #459), where this pre-existing failure blocked a workspace-wide clippy run — I deliberately kept it out of that PR rather than folding in an unrelated fix.

Verification

Rebased onto current master (0d552e0), so this includes #459's newly-merged resource-gate crate.

cargo clippy --workspace --all-targets -- -D warnings -A unsafe_code -A clippy::pedantic now completes clean on Windows. Before this change the same command failed with:

error: function `descendant_pids` is never used
   --> crates\agentflare-jobs\src\supervisor.rs:208:4
error: unused import: `super::*`
   --> crates\agentflare-jobs\src\supervisor.rs:281:9

The Linux-gated test itself is unchanged.

…st-only import unused off Linux

Agentflare-Agent: claude-code_2-1-227_agent
Agentflare-Branch: task/440
Agentflare-Item: 440
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4d660ee1-abdb-4744-b1a9-336814738196

📥 Commits

Reviewing files that changed from the base of the PR and between 0d552e0 and ba43060.

📒 Files selected for processing (1)
  • crates/agentflare-jobs/src/supervisor.rs

📝 Walkthrough

Walkthrough

The supervisor module now limits the descendant_pids fallback to non-Linux Unix targets. The test import is limited to Linux targets.

Changes

Platform compilation

Layer / File(s) Summary
Supervisor platform gating
crates/agentflare-jobs/src/supervisor.rs
The descendant_pids fallback compiles only on non-Linux Unix platforms. The test-module import compiles only on Linux.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • getappz/agentflare#394: Introduced the descendant_pids functionality refined by this platform-specific compilation change.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the Windows cfg-gate fixes and their effect on the workspace Clippy gate.
Description check ✅ Passed The description explains the changes, motivation, platform impact, and Clippy verification, but omits the template checklist and reviewer notes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/440

Comment @coderabbitai help to get the list of available commands.

@getappz
getappz merged commit 5c96bb5 into master Aug 12, 2026
19 checks passed
@getappz
getappz deleted the task/440 branch August 12, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant