Repository navigation
fix(test): make clone stage dominance independent of real wall-time races - #1659
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: CurateLabs/graphforge/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Independent review and local validation for the #1623 blocker:
The earlier concurrency lane failed during dependency-index transport before tests ran; its HTTP/2 framing error remains recorded in run 36659106567. The current refreshed-tree run completed the concurrency lane successfully. |
Fixes #1650.
Problem
hub_clone::tests::both_identity_forms_import_and_reopen_the_same_real_projectinjected a two-secondthread::sleepinto one stage per case and asserted that stage had the largest real wall time. Real import, filesystem work, and scheduling have no two-second bound, so under loadPortableImportcould out-dominate the injectedNetworkTransportstage. That's an invalid timing assumption, not a clone defect. The failure was observed while validating #1623.Change
CloneClock(crates/graphforge-cli/src/hub_clone.rs). Production code always usesMonotonic, which keeps the unchangedInstant::now()/thread::sleepbehavior. TheManualvariant is#[cfg(test)]only.2_000_000_000ns;finished_nsmust equal the end of the last stage.Validation
cargo fmt --all -- --check: clean.cargo clippy -p graphforge-cli -- -D warnings, matching the CI Rust Quality gate command: clean. With--all-targetsthere are pre-existing lint errors in unrelated test files (maintenance_cli/tests.rs,research_cli/interchange.rs,tests/{branches,research_journey,slices}.rs) that also fail onmain. None are inhub_clone.rs.python3 scripts/test_environment.py -- cargo test -p graphforge-cli --lib hub_clone: 21 passed, 0 failed, 1 ignored, in 0.36 s. The attribution cases no longer spend about 10 s of real sleeps.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.