Repository navigation
fix: set cargo target dir explicitly - #683
Merged
Merged
Conversation
|
| Project | cot |
| Branch | set-cargo-target-dir |
| Testbed | github-ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|
| empty_router/empty_router | 📈 view plot 🚷 view threshold | 13.12 ms(+19.27%)Baseline: 11.00 ms | 18.79 ms (69.81%) |
| json_api/json_api | 📈 view plot 🚷 view threshold | 1.13 ms(+11.29%)Baseline: 1.01 ms | 1.35 ms (83.71%) |
| nested_routers/nested_routers | 📈 view plot 🚷 view threshold | 1.05 ms(+9.89%)Baseline: 0.95 ms | 1.25 ms (83.83%) |
| single_root_route/single_root_route | 📈 view plot 🚷 view threshold | 1.05 ms(+14.39%)Baseline: 0.92 ms | 1.21 ms (86.64%) |
| single_root_route_burst/single_root_route_burst | 📈 view plot 🚷 view threshold | 18.33 ms(+8.85%)Baseline: 16.84 ms | 22.20 ms (82.59%) |
m4tx
force-pushed
the
set-cargo-target-dir
branch
from
October 2, 2026 17:59
afb306a to
40473c4
Compare
m4tx
marked this pull request as ready for review
October 2, 2026 18:05
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The target-directory overrides consistently address the reported nondeterminism without affecting raw configuration-discovery tests.
Review effort: Balanced
Findings: None
What changed in this PR
Pins Cargo target directories to make CLI snapshot and project tests reproducible regardless of global Cargo configuration.
Changes:
- Sets
CARGO_TARGET_DIRfor compiled test-project commands. - Adds a local Cargo target configuration to temporary unit-test projects.
| File | Description |
|---|---|
cot-cli/src/test_harness.rs |
Pins proxy commands to the bridged project target directory. |
cot-cli/src/project.rs |
Isolates temporary project tests from global Cargo target settings. |
💡 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.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
ElijahAhianyo
approved these changes
Oct 2, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a user has a global target set in
.cargo/config.toml, e.g.:The recently introduced test harness (#665) might cause snapshot tests to run unpredictably, as the exact behavior and stderr changes depending on the exact order the tests are run in.
This sets the target directory explicitly for the test harness, making the snapshot tests reproducible.