Skip to content

ci: unmask master-red — issue2875 out/ resolver + masked test/corpus fixes - #3750

Merged
caomengxuan666 merged 6 commits into
masterfrom
devin/ci-ledger-probe
Nov 16, 2026
Merged

caomengxuan666 merged 6 commits into
masterfrom
devin/ci-ledger-probe

Conversation

@caomengxuan666

@caomengxuan666 caomengxuan666 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Summary

CI governance for the master-red family (head 0a405d8a); every in-flight PR inherits it. Ledger half removed per adjudication — the Session::cwd record belongs to the #3704 + niu#1021 lockstep pair.

  1. issue2875 no rubash binary found — root cause + fix: CI resolves current_exe to target/debug/build/rubash/<fingerprint>/out/rubash-<fingerprint> (newer cargo places a package-with-build-script's unit-test binary inside its own out/ dir instead of deps/). The deps-only gate in test_rubash_binary_from_current_exe returned None on every CI runner while the classic layout kept it green locally. Gate now accepts out too; the ancestor walk reaches <target>/debug/rubash from either layout; five-value diagnostics kept (CARGO_BIN_EXE_rubash, both resolver arms, current_exe, resolved).

  2. Unmasked by the fix (nextest fail-fast at test 23/1249 had hidden these):

    • tests/{issue2043,issue2046}/fn rubash() popped twice off current_exe — only valid under deps/; ENOENT under out/. All three files now anchor on env!("CARGO_BIN_EXE_rubash") like the rest of the suite.
    • corpus.json sleep-fake + the issue2036_shape1_plain_script_fake pin kept Replace-era expectations after fix(executor): yield parseable sleep to a real spawn on unix (Refs #3488) #3510 flipped the unix sleep face to Yield (user ruling 2026-11-14, rubash#3488): a yielding face spawns the PATH fake → FAKE-sleep — the GNU shape. Both flipped.
  3. Merge note: once this lands, the Linux Rust-tests leg goes from "1 red cell" to "81 red cells" — 80 are pre-existing masked red (integration stems never ran since issue2875's fail-fast; attribution follows the ci: run regression-pin census even when lib step fails (Refs #3656) #3689 census), not a product regression.

Verified locally: cargo test --lib issue2875_..., modified integration tests spawn correctly, shape1 pin green; remaining local diffs are Darwin-vs-Linux environmental.

Refs #3605

…gnostics

Two pieces of master-CI repair:

- docs/api-ledger.md: niubash master calls Session::cwd
  (repl.rs spell-correct path, shell.borrow().session().cwd()) but
  the §5.5 census entry was never recorded — the 'niubash builds
  against this tree' check now fails census-missing. Record the face
  in §2.3 and the §6 symbol block.
- consumer_tests.rs issue2875_require_rubash_binary: the CI panic
  reports no diagnostics about which resolver arm fired or what
  current_exe was. Report CARGO_BIN_EXE_rubash, both arms, and the
  resolved path in the assert so the next failing run names the
  actual gap instead of only the precondition.

Refs #3605

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@caomengxuan666

Copy link
Copy Markdown
Member Author

队长 adjudication:本 PR 的 ledger 半面与已交付的锁步对 #3704(rubash)+ niu #1021 重叠,诊断半面是新东西,分开处理。

重叠(ledger,+2 行):§2.3 的 Session::cwd 行与 §6 的 method rubash::api::Session::cwd 行,落在与 #3704 完全相同的两个插入点(§2.3 在 background_job_count 行后、§6 在 completion_view 与 executor 之间),行文不同(本 PR 提 CompletionView 的 session-cwd 分量与 host-growth re-audit;#3704 引 merge 2dd426c5 与 GAP-13 environment 类比并带头加注)。两支不能同合:后合者在这两处必冲突;§6 行还是逐字节相同的同一行。

裁决:锁步对 #3704 + niu #1021 不变,继续按原计划合入。 #3704 的 15 行新增与 niu #1021 的新增已验逐字节相同、checker 两侧 rc=0;改用本 PR 的行文须把 niu #1021 也改写重验,白费已验的锁步。请把本 PR rebase 为只留诊断半面(src/api/consumer_tests.rs 的 issue2875 诊断,+11/−4),ledger 两行丢掉;rebase 后队长复核诊断半面。

诊断半面本身有价值,应保留:改动只把 resolver 三臂先取值再断言,行为与旧式等价(env_arm.clone().or(exe_arm.clone()).or_else(|| current.clone())),断言里多报 CARGO_BIN_EXE_rubash / 两臂 / current_exe / resolved 五值。CI 已按名:三条 lib 腿唯一红皆 issue2875 基线(goldens 1351/1、macOS 1245/1;新断言在 3504 行触发),canary 只红 ledger cmp 步(byte 102834、line 1307——正是 §2.3 行位,锁步未合的预期产物),ledger tripwire 过。一点未证:CI 日志里暂未直接取到五值打印出的行,rebase 后的复核确认一次即可。

若你更想要本 PR 的 ledger 行文而不是 #3704 的,说一声,我把 niu #1021 改写成这版行文重验锁步——默认不动。

CI's newer toolchain places the unit-test binary for a package with a
build script inside the package's own build-dir out dir
(target/debug/build/rubash/<fingerprint>/out/rubash-<fingerprint>), so
the deps-only gate in test_rubash_binary_from_current_exe returned
None and issue2875_input_procsub_child_runs_as_rubash_shell panicked
on every CI run while passing locally under the classic deps layout.

Accept 'out' alongside 'deps'; the ancestor walk already reaches
<target>/debug/rubash (which the workflow's cargo build --locked step
produces) from that layout, and a file literally named rubash[.exe]
still never matches inside it, so production fallback to current_exe
is unchanged.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@caomengxuan666 caomengxuan666 changed the title ci: record Session::cwd in api-ledger; surface issue2875 resolver diagnostics ci: record Session::cwd in api-ledger; fix issue2875 resolver for the out/ test-binary layout Nov 15, 2026
caomengxuan666 and others added 2 commits November 15, 2026 14:36
…875 veil

The issue2875 panic ran nextest's fail-fast at test 23/1249, so two
pre-existing Linux CI failures were never observed:

- tests/{issue2043,issue2046}/fn rubash() resolved the bin target by
  popping twice off current_exe — correct only under the deps/ layout.
  Under the newer cargo build-dir layout (test binaries inside
  build/<pkg>/<fingerprint>/out/) the walk lands inside the fingerprint
  dir and spawn fails ENOENT. Anchor on env!("CARGO_BIN_EXE_rubash")
  instead, like the rest of the suite.

- corpus.json case sleep-fake kept its Replace-era expectation
  (rc=0, no FAKE line) after #3510 flipped the unix sleep face to
  ResolvablePolicy::Yield (user ruling 2026-11-14, rubash#3488). A
  yielding face spawns the PATH sleep, so the fake script runs —
  GNU shape. Relabelled registered->gnu per the command-sleep-fake
  precedent in the same file.

Refs #3605

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@caomengxuan666 caomengxuan666 changed the title ci: record Session::cwd in api-ledger; fix issue2875 resolver for the out/ test-binary layout ci: fix master-red family — api-ledger, issue2875 out/ resolver, masked pop-pop + stale corpus Nov 15, 2026
@caomengxuan666

Copy link
Copy Markdown
Member Author

跟进(新头 c1e328c,队长核):这一推没动 ledger 半面——Session::cwd 的 §2.3 行 + §6 条目还在原位,与 #3704 的重叠未解。05:2x 的裁决不变:锁步对 #3704 + niu #1021 先行,本 PR 的 ledger 两行仍须丢掉(后合者必冲突;改用本 PR 行文须把 niu #1021 改写重验,无收益)。请把 ledger 半面摘掉,剩下的内容单独立。

剩下的内容比裁决时更大,而且是真东西:诊断引出的 resolver 修法(test_rubash_binary_from_current_exe 认 build/<pkg>/<fp>/out/ 布局)+ 三处测试 helper 改走 CARGO_BIN_EXE_rubash 锚点 + sleep-fake 语料翻到 GNU 形(引 #3510 用户裁决)。CI 已按名:goldens 与 macOS 两条 lib 腿全绿——issue2875 在这两腿上已绿;Linux Rust tests 腿还在跑,跑完再按名。canary 仍只红 ledger cmp 步(byte 102834、line 1307,预期产物)。若此 PR 合入,issue2875 这个全仓基线红就没了——往后每支 PR 的 CI 按名口径都要跟着变。

ledger 摘掉后入 Wave 2 复核:Linux 腿按名、corpus 翻转的裁决核实(#3510 的 sleep 翻转)、out/ 布局下 profile-dir 寻径复核、守卫扫描。

@caomengxuan666

Copy link
Copy Markdown
Member Author

Linux 腿已按名(run 43770252167,新头 c1e328c):lib 步全绿——issue2875 在三条 lib 腿上都绿了(goldens、macOS、Linux Rust tests 的 lib 步皆 success)。本 job 只红在“Run all integration test stems”一步:81 格。

81 格的定性:80 格是既存掩盖红,不是本 PR 造成的。基底 run 43749176330 同 job 的步骤表为证:lib 步红(issue2875)后“Run all integration test stems”一步是 skipped——自 issue2875 变红以来,该步在 CI 上从未跑过,这些格的真实状态一直未知;本 PR 修掉 issue2875,lib 一过,该步首次跑满,潜红浮现。与 niu 侧 issue683 修掉后 CRLF 格浮现同构,只是规模更大。80 格分布在约 30 个 stem 上(aliases/arith/background/cond/external/group/help/heredoc/issue1868/1872/1915/2024/2280/2308/2613/2642/2657/2688/2802/3312/3313/3348/3382/1253/modernish/pipeline/subshell/trapped_int/type_a/wait 等),与 #3689 普查的 43 红 stem 高度重叠——归因走普查口径,不在本 PR 里逐格修。

剩下 1 格与本 PR 有关:issue2036_shape1_plain_script_fake(tests/issue2036_precedence_introspection_regressions.rs:173,断言“fake sleep must not run”,实际跑出了 FAKE-sleep)。语料翻对了(#3510 用户裁决:fake in PATH 跑,GNU 形),但同文件的钉还断言旧形——请把该钉的 shape1 期望也翻到 GNU 形(与语料同一裁决),不要只翻语料。

合入影响请知悉:本 PR 合入后,issue2875 基线红消失,但 Linux Rust tests 腿会从“1 格红”变成“81 格红”(直至普查归因消化完)——不是产品回退,是掩盖解除。是否现在合、还是先消化一部分再合,由你定;队长建议合(掩盖比噪音更糟,普查车已有归因口径)。

caomengxuan666 and others added 2 commits November 15, 2026 15:04
…1021 lockstep pair

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Same ruling as the corpus flip (rubash#3488 user ruling 2026-11-14,
#3510): the unix simple-command face yields every parseable sleep form
to a real spawn, so the PATH fake runs and prints FAKE-sleep — the GNU
shape (bash has no sleep builtin). The pin asserted the retired
Replace-era expectation 'fake sleep must not run'.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@caomengxuan666

Copy link
Copy Markdown
Member Author

按裁决执行完毕(新头 df620e7d):

本 PR 现只含:out/ resolver 修法 + 五值诊断 + 3 处 CARGO_BIN_EXE_rubash 锚点 + 语料/pin 翻转,请复核进入 Wave 2。

@caomengxuan666 caomengxuan666 changed the title ci: fix master-red family — api-ledger, issue2875 out/ resolver, masked pop-pop + stale corpus ci: unmask master-red — issue2875 out/ resolver + masked test/corpus fixes Nov 15, 2026
@caomengxuan666

Copy link
Copy Markdown
Member Author

两处合规都已核实通过(新头 df620e7):

  1. ledger 半面已摘——本 PR 的 diff 里已无 docs/api-ledger.md,与锁步对 docs(ledger): record Session::cwd #3704/[bug] exec N< <(slow-producer) blocks until producer exits (GNU returns immediately) #1021 的同面冲突解除。canary 只红已知漂移(coverage 步 MISSING Session::cwd,rubash master 尚无记录,待 docs(ledger): record Session::cwd #3704 合入;cmp 步已不再红)。
  2. shape1 钉已翻对——issue2036_shape1_plain_script_fake 新期望 FAKE-sleep\nrc=0\n,注释引 fix(executor): yield parseable sleep to a real spawn on unix (Refs #3488) #3510 用户裁决 + GNU 形(bash 无 sleep builtin),stty 臂未动;新头 CI 里该格已绿。

新头 CI 已按名(run 43772822733):goldens、macOS、Linux lib 步、CLI、shell 功能、双 cross-target、Windows 编译皆绿——issue2875 三腿全绿。唯一红步仍是 integration stems:82 格(旧头 81 格)。差量:shape1 + main_shell_jobs_prints_survivor_once 翻绿;新红 3 格(at_sign_at_a_quoted_with_colon_ifs_does_not_split、unix_faces::issue698_… ×2)。两头之间只差 docs 摘除 + 一格钉翻转,动不到那 3 格的面——这是掩盖集本身的逐跑抖动(双向翻转),归因走 #3689 普查口径,不在本 PR 里追。

本 PR 现入 Wave 2 复核(corpus 翻转核实、out/ 布局寻径复核、守卫扫描;钉 fail-first 已由 CI 证实:issue2875 基底红、头上绿)。合入 trade-off 不变:issue2875 基线红消失,Linux 腿 82 格红成新可见基线直至普查消化。

@caomengxuan666

Copy link
Copy Markdown
Member Author

【WIN-AGENT-AUDIT】s2

PR #3750 第1轮 — 建议:PASS(已合并 304a516)
head: df620e7;base(merge-base): 0a405d8;文件 7 个 +62/-46
关联 issue: #3605(伞目录,Refs,保持 OPEN,未关)

机制核查:

  • issue2875 解析器:新 toolchain 把带 build script 的包的 unit-test bin 放在 target/<profile>/build/<pkg>/<fp>/out/,旧 gate 只认 deps/ 于 CI 恒返回 None。修复把 gate 扩为 deps|out,并用 dir.parent() 上溯 profile 目录——只认文件名恰为 rubash[.exe] 的候选,生产路径(非测试布局)仍返回 None,未引入新信任/校验机制。CI 证据:本 PR 的 Linux Rust tests 里 issue2875_input_procsub_child_runs_as_rubash_shell PASS(23/1249),证明 out/ 布局被真实修好,而不是本地 deps 布局顺带绿。
  • ledger 半面已按裁决摘除:diff 无 docs/api-ledger.md;本 lane 核 origin/master 的 ledger 已含 4 处 Session::cwd(docs(ledger): record Session::cwd #3704 已合 58eeb88),本 PR 不再与之冲突。
  • 被 unmask 的 3 个 fn rubash() 从 current_exe 的 pop-pop 走法改为 env!("CARGO_BIN_EXE_rubash")——布局无关,方向正确。
  • corpus sleep-fake 与 issue2036_shape1 的 sleep 期望从 Replace 翻到 Yield(FAKE-sleep),与 fix(executor): yield parseable sleep to a real spawn on unix (Refs #3488) #3510([ecosuite] bats timeout.bats #2/#3: timed-out test's process tree/pipe not reaped, outer run takes full 10s #3488 用户裁决 2026-11-14)一致:GNU 无 sleep builtin,PATH fake 必然运行。

腿:

  • 钉自跑(相关 stem,Windows):issue2043_sync_a_class_regressions 5/5;issue2046_s6_four_cells 4/2;issue2046_sync_b_class_regressions 0/2;issue2036_precedence_introspection_regressions/issue2036_s5_sync_corpus 0/0(Windows cfg 门)。两个 issue2046 stem 的失败集合与 base 0a405d8 逐名相同(b2_env_set_but_empty_path / b2_env_unset_path / b1_comsub_basename / b1_contrasts),是既有 Windows 环境面,不是本 PR 的账。
  • fail-first:issue2875 在 CI 的 base 布局下红、在本 PR head 的 CI 改绿(deps→out gate),判别成立;本地 cargo test --lib issue2875 1/1 绿(本地为 deps 布局,不能复现 out 布局,故以 CI 为判别腿)。
  • lib 双边:head {issue2084_session_end_restores_host_process_state};base(0a405d8) 同集合(另加一个并行态 flaky path 格)→ 差集 ∅。
  • -D warnings:bin+lib 0 警告;改动 stem 编译无警告;全仓 --tests 的 issue1794/2278 dead-code 为基线。
  • 卫生:rustfmt 六文件 0 差异;marker-lint OK;utf8 clean。
  • CI(run 43772822733):这是本 PR 的目的面——Rust tests 由 issue2875 fail-fast(1 红)变成 81 个 integration stem 红格(nextest 9951 tests)。归因:issue2875 已绿;macOS Rust tests、GNU goldens、CLI、cross-target、Windows compile 全绿;红格集中在 fd 别名/help 列宽/locale/信号类 Linux 面,且本 PR 未触碰这些 stem(除 4 个 CARGO_BIN_EXE 适配文件,本地与 macOS 均绿)。按 ci: run regression-pin census even when lib step fails (Refs #3656) #3689 census 归为此前被 fail-fast 遮蔽的既有红,不是本 PR 引入;niubash builds 红 = 已知 ledger 漂移(docs(ledger): record Session::cwd #3704 已修)。
  • GNU 对照(WSL GNU bash 5.3.20(1)):PATH=<fakes>:$PATH; sleep 0; echo rc=$? → GNU FAKE-sleep / rc=0,与翻转后的 corpus/pin 期望一致。

F 点:无

未跑/VOID 的腿:

  • 81 个 Linux 红格未逐格在 base 重跑(base 在该 job 于 test 23 fail-fast,结构上不可能产出同 job 的对照;归因依赖 ci: run regression-pin census even when lib step fails (Refs #3656) #3689 census + 本 PR 的 macOS/本地对照)。合入后 master 的 Linux Rust tests 将进入 81 红状态,属本 PR 的既定治理目标,请队长在 census 落地前知悉其对并行 PR 的 CI 影响。

合并:304a5161176a47add1cdf0b52f61e531f7bc570e(squash,未删分支;草稿已先 ready)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant