Repository navigation
test(executor): fail fast on missing rubash bin in lib-only runs (Refs #3292) - #3472
Merged
Merged
Conversation
Member
Author
|
【WIN-AGENT-AUDIT】 机制核查:
腿(逐项给数字与名字):
F 点:无 未跑/VOID 的腿:
|
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.
PR body — rubash #3292 (Refs-only)
Title:
test(executor): fail fast on missing rubash bin in lib-only runs (Refs #3292)Root cause
The issue2875 procsub lib cell reds deterministically on any fresh target
where neither
target/debug/rubashnorCARGO_BIN_EXE_rubashexists: theprocsub child exe resolution chain falls back to the lib-test binary itself,
which rejects
-c(Unrecognized option: 'c'). Three-cell measurement fromthe PR #3281 captain review (CAPTAIN-VERIFY §2, rebuilt base tree
917870ff):base no-bin = RED, base bin-built = GREEN, head bin-built = GREEN. Not a load
flake, not product behaviour — a missing build precondition.
GNU anchor
Harness-side issue; no new semantic probe. The GNU anchor is the established
three-cell measurement above (issue #3292 body cites the same evidence:
~/workspace/review-3281/CAPTAIN-VERIFY.md§2,rerun-console.log/rerun3-console.log).What this PR changes (A — in-repo)
test_rubash_binary_from_current_exe(src/executor/compound_exec.rs):widened from
pub(in crate::executor)topub(crate); inside the existingdeps/gate it now also searches the test binary's profile dir, itsreleasesibling, theCARGO_TARGET_DIRdebug/release dirs, and thedebug/release dirs under each ancestor of the test binary (≤ 8 levels).
Only a file literally named
rubash/rubash.execounts. Productionbehaviour is unchanged: the
deps/gate still returnsNoneoutside atest binary, so a real shell keeps falling back to
current_exe().src/executor/mod.rs:pub(crate)re-export of the helper.src/api/consumer_tests.rs: newissue2875_require_rubash_binary()(
#[cfg(test)]), called first in the issue2875 cell; it resolves the binthrough the same chain as the product spawn sites and fails fast naming
the precondition (
cargo build --locked --bin rubashfirst) instead ofletting the spawn fall back to the lib-test binary with a misleading
-cerror. No product spawn site is touched.
Companion change (B — outside the repo, needs captain review)
~/workspace/batch-tools/scrubbed_cargo.py(shared captain/queue harness):a pure
cargo test … --librun now builds--bin rubashfirst when norubashbinary exists under the target dir (same profile /--target/--target-dir/--locked/--offlineflags); a failed bin build stopsthe run with the build's exit code.
--test/--bins/--tests/--all-targetsforms are untouched. Verified functionally with a stub cargo(5 cases: build-first, bin-exists skip, stem passthrough, build-fail stop,
--releasepassthrough). If the captain does not adopt (B), (A) stillstands alone: the cell's failure face changes from a misleading
-cerrorto a named-precondition panic.
本 PR 删除了什么
未删除任何产品行为、公开面、测试或文档。仅有的删除是
test_rubash_binary_from_current_exe旧版单目录查找体被扩展版取代(行为为超集,
deps/门与回退语义不变),以及consumer_tests.rs中一段 doc 注释从 helper 上方移回其所属的测试函数上方(纯注释移动)。Verification status
UNVERIFIED-BY-CAPTAIN. Static legs done this round:
rustfmt --checkonthe three changed files (rc=0),
check-marker-literals.pyOK,check-utf8-boundary-hygiene.shclean, codegraph callers cross-checked withscoped
rg(4 product spawn sites + 1 test call site). Build/test legs areOWED to the review round: no build slot was available this round (Simular box
disk 100% full; old server sshd banner-dead on two bounded retries; local
builds banned by the write wall; X299 direct access not yet set up). Owed:
fresh-target issue2875 cell two-sided run (no-bin → named-precondition
failure; bin-built → green), adjacent procsub stems, full lib base/head
count alignment,
RUSTFLAGS="-D warnings" cargo check --locked --lib --bins.