Skip to content

fix(ci): unblock main — cfg-gate unix-only test + add missing ToolContext field#264

Merged
emal-avala merged 2 commits into
mainfrom
fix/cfg-gate-mode-test
May 4, 2026
Merged

fix(ci): unblock main — cfg-gate unix-only test + add missing ToolContext field#264
emal-avala merged 2 commits into
mainfrom
fix/cfg-gate-mode-test

Conversation

@emal-avala
Copy link
Copy Markdown
Member

@emal-avala emal-avala commented May 1, 2026

Summary

Two unrelated fixes that together unblock CI on `main`:

  1. Windows compile — `backup_rotation_does_not_run_when_atomic_write_fails` in `crates/lib/tests/config_migrations.rs` uses `std::os::unix::fs::PermissionsExt::set_mode` to drop a directory's mode and simulate an atomic-write failure. Without a `#[cfg(unix)]` gate, Windows builds fail with E0433/E0599. Other POSIX-mode tests in the same file are already gated; this one was missed when feat: settings migrations framework #255 landed.

  2. Ubuntu compilefeat: task model variants #263 (task model variants) was based on `main` before feat: load output styles from disk #256 (disk output styles) added `active_disk_output_style` to `ToolContext`. After both landed, three `ToolContext` literals in the task subsystem fail to compile with E0063. Adds the field with `None` to:

    • `crates/lib/src/tools/tasks/executors/local_agent.rs`
    • `crates/lib/src/tools/tasks/tools.rs` (test helper)
    • `crates/lib/tests/task_kind_integration.rs`

Task executors don't propagate disk output styles today; `None` is the correct value until 8.7 (swarm mode) and 8.10 (fork/resume) wire that through.

Test plan

  • `cargo check --all-targets` clean on linux
  • `cargo clippy --all-targets -- -D warnings` clean
  • `cargo fmt --all -- --check` clean
  • `cargo test --all-targets` — passes (modulo 3 pre-existing `bwrap_*` sandbox failures from missing user-namespace permissions in this env, unrelated)
  • CI green on this PR (verifies the Windows and Ubuntu fixes against actual runners)

emal-avala added 2 commits May 1, 2026 15:11
backup_rotation_does_not_run_when_atomic_write_fails uses
std::os::unix::fs::PermissionsExt::set_mode to simulate an atomic
write failure by dropping directory mode to 0o555. Without a
#[cfg(unix)] gate the test fails to compile on Windows with
E0433 (cannot find unix in os) and E0599 (no method named
set_mode on Permissions).

The other three POSIX-mode tests in this file are already gated;
this one was missed when #255 landed.
…literals

#263 (task model variants) was based on main before #256 (output styles
from disk) added active_disk_output_style to ToolContext. After both
landed, three ToolContext literals in the task subsystem fail to
compile with E0063.

Add the field with None to:
- crates/lib/src/tools/tasks/executors/local_agent.rs:75
- crates/lib/src/tools/tasks/tools.rs (test helper)
- crates/lib/tests/task_kind_integration.rs:34

Task executors don't propagate disk output styles today; None is the
correct value until 8.7 (swarm mode) and 8.10 (fork/resume) wire that
through.
@emal-avala emal-avala changed the title fix(test): cfg-gate unix-only mode preservation test fix(ci): unblock main — cfg-gate unix-only test + add missing ToolContext field May 1, 2026
@emal-avala emal-avala merged commit 040217e into main May 4, 2026
13 of 14 checks passed
@emal-avala emal-avala deleted the fix/cfg-gate-mode-test branch May 4, 2026 05:55
@emal-avala emal-avala mentioned this pull request May 4, 2026
12 tasks
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