Skip to content

fix(ci): cfg(unix)-gate golden test helpers — windows clippy dead-code on main#36

Merged
div0-space merged 1 commit into
mainfrom
fix/ci-windows-clippy-golden-helpers
Jul 15, 2026
Merged

fix(ci): cfg(unix)-gate golden test helpers — windows clippy dead-code on main#36
div0-space merged 1 commit into
mainfrom
fix/ci-windows-clippy-golden-helpers

Conversation

@div0-space

Copy link
Copy Markdown
Contributor

main CI czerwone od merge #35: windows-latest, clippy -D warnings, 5× dead_code.

Test golden_precision_side_index_and_warm_path_contract je #[cfg(unix)], ale jego helpery (GoldenSet/GoldenPair/GoldenEvidence/canonical_card/write_projection) były bezwarunkowe — pod Windowsym nic ich nie używo. Gate tym samym cfg(unix); unix build bez zmian (clippy+testy lokalnie GREEN, pre-push suite GREEN).

Wykryte w post-merge vc-review PR #35 (kolejka merguje bez windows-checka — required-checks nie obejmujóm windows-latest; osobny temat konfiguracyjny dlo operatora).

𝚅𝚒𝚋𝚎𝚌𝚛𝚊𝚏𝚝𝚎𝚍. with AI Agents by VetCoders (c)2024-2026 LibraxisAI

… clippy dead-code

- golden_precision_side_index_and_warm_path_contract je #[cfg(unix)], ale jego
  helpery (GoldenSet/GoldenPair/GoldenEvidence/canonical_card/write_projection)
  były bezwarunkowe -> na windows-latest clippy -D warnings walił 5x dead_code
  i main CI stoło czerwone od merge #35
- gate tym samym cfg; unix build bez zmian (clippy lokalnie GREEN)

Authored-By: claude <agents@vetcoders.io>
session_id: 49a84e4c-f24d-4167-9f55-ae0f8123a66f
timestamp: 2026_0715_0335_CEST
runtime: claude-code-interactive
Copilot AI review requested due to automatic review settings July 15, 2026 01:42
@div0-space div0-space added this pull request to the merge queue Jul 15, 2026
Merged via the queue into main with commit 05957ac Jul 15, 2026
3 of 4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Windows CI failures (clippy -D warnings) caused by dead_code warnings in src/overlay.rs tests: a Unix-only golden test was #[cfg(unix)], but its helper structs/functions were previously compiled on all platforms and became unused on Windows.

Changes:

  • Added #[cfg(unix)] to golden-test-only helper structs (GoldenSet, GoldenPair, GoldenEvidence).
  • Added #[cfg(unix)] to golden-test-only helper functions (canonical_card, write_projection).
  • Keeps Unix behavior unchanged while preventing Windows from compiling unused golden helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds #[cfg(unix)] attributes to several test-related structs and helper functions in src/overlay.rs to restrict their compilation to Unix-like platforms. The review feedback correctly points out that this change will lead to unused import warnings on non-Unix platforms (such as Windows), which can cause build failures under strict compiler settings. It is recommended to conditionally import these dependencies using #[cfg(unix)] as well.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/overlay.rs

static TEST_ID: AtomicUsize = AtomicUsize::new(0);

#[cfg(unix)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Poprzez oznaczanie GoldenSet, GoldenPair, GoldenEvidence, canonical_card oraz write_projection atrybutem #[cfg(unix)], kilka importów na początku modułu tests (linie 1469–1476) staje się całkowicie nieużywanych na platformach innych niż Unix (np. na Windowsie). Przy restrykcyjnych ustawieniach Clippy (clippy -D warnings lub #[deny(warnings)]), spowoduje to błędy kompilacji typu unused_imports podczas budowania na Windowsie.

Aby temu zapobiec, należy również warunkowo importować te zależności za pomocą #[cfg(unix)]:

#[cfg(unix)]
use crate::store::write_canonical_projection_at;
#[cfg(unix)]
use aicx_parser::engine::{
    AgentKind, BoundaryFlags, ParseStatus, TurnRole, VisibleCompleteness,
};
#[cfg(unix)]
use aicx_parser::projections::{
    CANONICAL_CARD_SCHEMA, CanonicalProjection, ProjectAttribution, ProjectBucket,
    TimelineFrame,
};

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.

2 participants