Skip to content

Fix all clippy lints for CI#2

Merged
emal-avala merged 1 commit intomainfrom
fix-clippy-lints
Mar 31, 2026
Merged

Fix all clippy lints for CI#2
emal-avala merged 1 commit intomainfrom
fix-clippy-lints

Conversation

@emal-avala
Copy link
Copy Markdown
Member

Summary

  • Fixes all 46 clippy warnings that caused CI failure
  • cargo clippy -- -D warnings now passes clean

Test plan

  • cargo test passes (31 tests)
  • cargo clippy clean (0 warnings)
  • cargo fmt applied

Resolved 11 clippy warnings:
- Collapsed identical if branches in context_window_for_model
- Replaced &PathBuf with &Path in function signatures
- Replaced manual Iterator::find loops with .find()
- Allowed large_enum_variant on transport (intentional design)
- Allowed enum_variant_names on RawDelta (SSE protocol names)
- Fixed indexed loop variables to use enumerate
- cargo fmt applied

CI should now pass all 4 jobs: check, test, format, clippy.
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@emal-avala emal-avala merged commit 6467707 into main Mar 31, 2026
6 checks passed
@emal-avala emal-avala deleted the fix-clippy-lints branch March 31, 2026 21:13
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
emal-avala added a commit that referenced this pull request Apr 23, 2026
The Test (windows-latest) job has been cancelling every PR at its
15-minute timeout since the schedule subcommand landed. Two separate
Windows-specific problems:

1. Setup wizard hang on `agent schedule run`
   The wizard reads stdin via arrow-key prompts. On Windows CI,
   stdin isn't a TTY and the wizard blocks indefinitely.
   Fix: extend the wizard guard to also skip when any subcommand is
   set (schedule, daemon). Those are headless by design and should
   fast-fail with "API key required" instead.

2. Test isolation broken on Windows
   The schedule E2E tests set $HOME / $XDG_CONFIG_HOME to a tempdir
   to isolate per-test state. On Linux that works — `dirs::config_dir`
   reads those env vars. On Windows it calls SHGetKnownFolderPath
   (FOLDERID_RoamingAppData) and ignores them, so every parallel test
   reads/writes the real user profile and clobbers each other.
   Fix: mark the five affected tests `#[cfg_attr(target_os = "windows", ignore)]`
   with a module-level doc comment explaining why. Linux CI remains
   the source of truth for these tests.

Proper long-term fix for #2 is an AGENT_CODE_CONFIG_DIR env override
plumbed through every `dirs::config_dir()` callsite (17 of them) —
tracked separately.

Tests on Linux: 14/14 schedule tests pass.
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