fix(cargo-gamma): stabilize Linux publish tests - #141
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new wait helper directive can block indefinitely (and on empty payload), which can hang CI by leaving orphaned helper processes running when tests fail early.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Stabilizes cargo-gamma Linux publish/test runs by removing environment-sensitive filesystem assumptions in redirected-cache security fixtures and replacing a timing-based grandchild/orphan assertion with a deterministic “release gate” handshake.
Changes:
- Moved redirected-cache test fixtures from the repo
target/tree to the system temporary directory to avoid inheriting unsafe checkout ancestry permissions. - Reworked the grandchild-orphan control test to use a filesystem “release gate” instead of a fixed wall-clock threshold.
- Bumped the cached
cargo-gamma-processtest helper fixture name and introduced a new helper directive (wait).
File summaries
| File | Description |
|---|---|
| crates/cargo-gamma-process/src/testing.rs | Adds a new helper directive and bumps the cached helper name used by process-tree tests. |
| crates/cargo-gamma-process/src/process_tree.rs | Makes the grandchild control test deterministic via a release marker instead of elapsed-time assertions. |
| crates/cargo-gamma-lib/src/exec/workspace.rs | Creates redirected-cache security fixtures in the system temp directory to avoid unsafe permission inheritance from the repo checkout. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
=======================================
- Coverage 97.6% 97.6% -0.1%
=======================================
Files 290 288 -2
Lines 65894 64984 -910
=======================================
- Hits 64351 63450 -901
+ Misses 1543 1534 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The changes directly address the stated Linux flake root causes with deterministic fixtures and bounded waits, and the updated tests appear consistent and self-contained.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The changes are narrowly scoped to test infrastructure/fixtures, address the described Linux flakiness causes deterministically, and include coverage for the newly introduced helper failure mode.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
🤖 Fixes the Linux test failures behind publish build 40437331.
Root cause
targetdirectory. On the containerized Linux agents, the checkout has a non-sticky world-writable ancestor, which the production cache hardening correctly rejects.Changes
Validation
cargo test -p cargo-gamma-lib --lib exec::workspace::testson Windows and Linuxcargo test -p cargo-gamma-process --libon Windowscargo test --release -p cargo-gamma-process --libon Linuxjust format,just readme, andjust spellcheck