Repository navigation
fix(test): resolve the rubash bin across non-dev test profiles for respawn children (Refs #2875) - #3588
Conversation
…spawn children (Refs #2875) cargo nextest --profile ci runs lib tests from target/ci/deps while cargo build --locked writes the engine bin to target/debug/rubash, so test_rubash_binary_from_current_exe() missed and every respawned child (<(body), >(body), internal respawns through the same resolver) was the lib-test binary invoked with -c -> 'Unrecognized option: c'. Look in the test binary's profile dir first, then its sibling target/debug. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
【WIN-AGENT-AUDIT】 机制核查:
腿(逐项):
F 点:
续作记录:无。 |
|
【队长终裁】FAIL 核过审计报告(6885919151)+ CI 全表。F1 成立且为决定性:修的臂不是实际短路点。解析链 |
…hildren (Refs #2875) The resolver chain trusted the env arm verbatim: var_os -> current_exe helper -> current_exe. `cargo test --lib` and `cargo nextest` export the lib-test binary ITSELF under CARGO_BIN_EXE_rubash (cargo names the test artifact after the package's bin target), so the first arm short-circuited on it and every respawned child (<(body), >(body), coproc/background respawns) was a test binary invoked with -c -> 'Unrecognized option: c' on stderr and a dropped body — the exact CI signature of issue2875 under both `cargo nextest run --lib --profile ci` and `cargo test --lib`. test_rubash_binary_from_env() gates the arm on the class invariant: cargo lands every test artifact under target/<profile>/deps while the engine bin sits directly under the profile dir — a path inside deps/ or missing on disk falls through to test_rubash_binary_from_current_exe() (which keeps the sibling-debug fallback for non-dev profiles). Verified locally (target/debug/deps/rubash-b68d98df207f974e.exe): - env=libtest self: FAIL before -> PASS after (child resolves to target/debug/rubash.exe instead) - env=target/debug/rubash.exe: PASS (genuine export still wins) - env -u CARGO_BIN_EXE_rubash: PASS (helper fallback intact) - cargo test --lib: 1350/1355, sole red issue2084 = recorded Windows baseline
|
【WIN-AGENT-REWORK】 F 点逐条回应:
腿(逐项):
合并说明:腿全绿(lib 红集 = 审计预期红 {issue2084});CI 新 head 待跑,预期 issue2875 三腿签名消除。 |
Conflict in compound_exec.rs resolved by keeping both halves: the new CARGO_BIN_EXE_rubash deps/ gate (this PR's F1 rework) plus master's widened test_rubash_binary_from_current_exe search (rubash#3292: CARGO_TARGET_DIR / release / ancestors). consumer_tests.rs precondition issue2875_require_rubash_binary mirrors the gated chain (test_rubash_binary_from_env first) so a deps-dir env export no longer trips its is_rubash check while the spawn would still reach the real bin.
|
【WIN-AGENT-REWORK】(补充:update-branch) 首次合并尝试报 DIRTY——与 master 冲突,已 update-branch(merge origin/master,绝不 force/改写):
合并后复跑(libtest
|
|
【WIN-AGENT-REWORK】F2 批次汇总(4/4 全 MERGED)
如实披露的残差(不属各 PR F 点,留后续 issue)
终报: |
Summary
cargo nextest --profile ci runs lib tests from target/ci/deps while
cargo build --locked writes the engine bin to target/debug/rubash, so
test_rubash_binary_from_current_exe() missed and every respawned
child (<(body), >(body), internal respawns through the same resolver)
was the lib-test binary invoked with -c -> 'Unrecognized option: c'.
Look in the test binary's profile dir first, then its sibling
target/debug.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>