Repository navigation
Description
[bug] wait/disown stopped-job warning pins expect bash: prefix; D1 argv[0] prolog renders the absolute binary path
Symptom
Three job-warning regression stems fail identically on master (1fd251b3)
and on the Stage-2 ④ Phase 1 branch — 13 tests, all with the same
single-token mismatch: the stderr diagnostic prefix is the absolute
binary path where the test expects bash:.
left: "/home/hatch/workspace/stage2-p4-phase1/repo/target/debug/rubash: line 1: warning: wait_for_job: job 1 is stopped\n"
right: "bash: line 1: warning: wait_for_job: job 1 is stopped\n"
Failing stems (identical tallies and identical failing-name sets on
base and branch — this is NOT a Phase 1 regression):
tests/issue2488_wait_stopped_warning_regressions.rs— 1 passed / 2 failed
(wait_jobspec_on_stopped_job_warns,wait_mixed_operands_warn_only_for_jobspec)tests/issue2489_disown_stopped_warning_regressions.rs— 2 passed / 4 failed
(disown_all_warns_per_stopped_job,disown_current_stopped_job_warns,
disown_jobspec_of_stopped_job_warns,disown_pid_of_stopped_job_warns)tests/issue2496_disown_r_set.rs— 1 passed / 7 failed
(disown_a_still_clears_whole_table,disown_h_r_keeps_all_jobs_listed,
disown_r_completed_job_not_deleted,disown_r_deleted_running_pid_not_a_child,
disown_r_deletes_only_running_jobs,disown_r_sole_running_job_empties_table,
disown_r_stopped_survivor_still_waitable)
Message bodies, job numbers, pids, and exit codes are all byte-identical
to the expectations — only the prolog name token differs. The same
prefix mismatch covers all four message shapes in these stems
(warning: wait_for_job: job N is stopped,
warning: deleting stopped job N with process group M,
wait: pid N is not a child of this shell,
disown: current: no such job).
Mechanism
rubash#2714 (commit ca50ca94, 2026-11-04, owner decision D1):
the diagnostic prolog follows argv[0] / $0 verbatim
(Executor::error_report_name, src/executor/public_accessors.rs),
instead of hardcoding the literal bash.
These stems invoke the binary via Command::new(env!("CARGO_BIN_EXE_rubash"))
with -c and no $0 argument, so $0 is the absolute test-binary path
and the -c prolog renders it verbatim. The stems were written against
the pre-D1 hardcoded-bash rendering and hardcode bash: line 1: in
their expected stderr.
Why CI never caught it
CI executes only --lib, --test cli_tests, --test regression, and one
redirect stem (.github/workflows/ci.yml); these three stems are compiled
by the cross-target jobs but never executed. The D1 fallout has been latent
since 2026-11-04.
Fix direction (test-side, not product)
The product behavior is D1-faithful: GNU error.c get_name_for_error
reports the name the shell was invoked under. The pins need the same
treatment #2714's own follow-ups gave the snapshot/golden compares
(b0e7142d, 74db6a66): invoke the binary under the name bash
(or normalize the invocation-name token in the expected stderr).
No product-code change is implied.
Discovery
Surfaced by the Stage-2 ④ Phase 1 neighbourhood loop (47 stems):
44 ok, these 3 stems red; re-run on a clean master 1fd251b3
worktree reproduces the identical 13 failing names, confirming
pre-existing status. Base log:
~/workspace/stage2-p4-phase1/base-3stems.log (lane workdir).
Activity
④ Phase 1: pilot-family migration to the (table row + BuiltinOpt + Di…
caomengxuan666 commentedon Nov 7, 2026
Same signature, one more stem (found in the Stage-2 ④ Phase 2 neighbourhood loop, 2026-11-07):
tests/issue635_builtin_oob.rs— 5/5 failing (declare_append_empty_phantom_gone,declare_append_oob,declare_empty_oob,local_in_function_oob,typeset_in_function_oob). Same root cause: the stderr prolog renders the absolute binary path (.../target/debug/rubash: line 1: [-2]=q: bad array subscript) where the test hardcodesbash: line 1:. Message bodies byte-identical.Verified pre-existing: identical 5/5 tally and identical failing-name set on clean master
854eed80and on the Phase 2 branch (p4-phase2-hash-dashdash-family). No product change implied — same test-side fix direction as the three stems above (invoke under the namebashor normalize the invocation-name token). Not filing a separate issue since the mechanism and fix are the same as this one.test(diag): pin argv[0] to 'bash' in four D1-prolog stems (Refs #2935)
fix: small wave — enable colon carrier, type -a empty PATH elements, …