fix(ci): cfg(unix)-gate golden test helpers — windows clippy dead-code on main#36
Conversation
… 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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
|
||
| static TEST_ID: AtomicUsize = AtomicUsize::new(0); | ||
|
|
||
| #[cfg(unix)] |
There was a problem hiding this comment.
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,
};
main CI czerwone od merge #35: windows-latest, clippy -D warnings, 5× dead_code.
Test
golden_precision_side_index_and_warm_path_contractje#[cfg(unix)], ale jego helpery (GoldenSet/GoldenPair/GoldenEvidence/canonical_card/write_projection) były bezwarunkowe — pod Windowsym nic ich nie używo. Gate tym samymcfg(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