Skip to content

fix(ci): clear repo-wide rustfmt drift + env! macro in tests/cli_exit_status.rs:6 #130

Open

Description

@KooshaPari

Summary

Two pre-existing CI failures have been blocking every PR for the
last several days. PR #129 fixes them.

Issue 1: rustfmt drift in 7 files

The Format CI job has been failing on 7 unrelated files. None of them
are part of any open PR — they accumulated over the last week of
inbound merges. cargo fmt --all brings them back to canonical form
(no semantic change).

Affected files:

  • crates/jcode-app-core/examples/print_build_info.rs
  • crates/jcode-base/tests/mcp_xj07_failure_modes.rs (2 hunks)
  • crates/jcode-core/examples/smoke.rs
  • crates/jcode-core/src/stdin_detect_tests.rs
  • crates/jcode-harness-api-server/src/translate_tests.rs (2 hunks)
  • crates/jcode-herdr/examples/round_trip_state.rs
  • crates/jcode-tui/src/tui/mod.rs (cache_expected_warm re-order)

Issue 2: env! macro in tests/cli_exit_status.rs:6

let output = Command::new(env!("CARGO_BIN_EXE_jcode"))

env! is a compile-time macro that requires CARGO_BIN_EXE_jcode
to be set during the build. The Quality Guardrails job runs
cargo check --workspace, which does not set this variable, so
the macro fails with E0461 (environment variable CARGO_BIN_EXE_jcode not defined at compile time).

Fix: switch to std::env::var(...).expect(...) which resolves at
process start instead of macro expansion. Same semantics under
cargo test (where Cargo does set the env var, so the .expect
succeeds).

Evidence

The merged PR #128 commit message shows pristine origin/master and
the PR's branch both have "143 pass / 6 fail" — confirming the
failures are repo-wide drift, not specific to any single PR.

Out of scope (separate issues)

The 6+ test failures in provider_matrix::*, tui::app::helpers::*,
tui::app::tests::test_fork_command_*, tui::session_picker::*,
and tui::turn_notify::* look like real regressions from the recent
TUI refactors. Tracked separately.

Resolution

Closed by PR #129.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions