ygg-verify: export SHELLOPTS=pipefail so job scripts inherit pipefail
Soul proved bash -o pipefail -c "bash job.sh" leaves the script without pipefail; a failing piped test came back exit 0. Probe: false|cat exits 1, true|cat exits 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e96c482940
commit
4cf81d39da
2 changed files with 17 additions and 2 deletions
|
|
@ -1220,3 +1220,15 @@ code path", and "such obviously unnecessary split authority should never pass a
|
|||
(missing tools, one retry on `Unavailable`, a resumable stop); a Hands exit for a fork before the first
|
||||
commit; operator directions as rulings with no `answers`; the target document committed before its
|
||||
`DocRef`s are admitted; and a substrate-gaps table in `campaign-state.md`.
|
||||
|
||||
## 2026-09-30: pipefail reaches job scripts
|
||||
|
||||
- Evidence: Soul (scenarios batch 2) proved that `bash -o pipefail -c "bash job.sh"` does not give the script
|
||||
pipefail, because shell options are not inherited. A job script ending in `dotnet test ... | tail -3` came back
|
||||
`exit 0` on a failing test. Every Hands and Soul job on 2026-09-30 ran as `bash <script>.sh`.
|
||||
- The stopgap now exports `SHELLOPTS=pipefail` into the container. Probe: a script `false | cat` exits 1, and
|
||||
`true | cat` exits 0.
|
||||
- **Consequence for today's results:** any job-script verdict whose last command was a pipeline, reported before
|
||||
this change, is unproven. Soul passes re-derived their verdicts from test output, not from the exit code alone, so
|
||||
their CONFIRMED and held claims stand. Hands-reported "green" that rested only on the exit status should be read
|
||||
as unverified until re-run.
|
||||
|
|
|
|||
|
|
@ -46,7 +46,10 @@
|
|||
# 2026-09-22. Mutation testing uses the ecosystem's tools on a cut's diff.
|
||||
#
|
||||
# TWO RAKES, both paid for on 2026-09-23:
|
||||
# * The command runs under `bash -o pipefail -c` (pipefail forced since
|
||||
# * The command runs under `bash -o pipefail -c`, and SHELLOPTS=pipefail is exported
|
||||
# into the container, so a job SCRIPT run as `bash job.sh` inherits pipefail too
|
||||
# (the -o flag alone does not reach child shells; Soul proved a failing piped
|
||||
# test in a job script came back exit 0, 2026-09-30). Pipefail forced since
|
||||
# 2026-09-30, after an ack Cut 2 job piped a failing test run into `cut` and
|
||||
# came back exit 0). pipefail does not rescue `a; b`: the job's status is the
|
||||
# LAST statement's, so a command ending in `git checkout`, `echo` or a filter
|
||||
|
|
@ -181,7 +184,7 @@ set +e
|
|||
sudo nice -n 10 docker run --rm --name "$cname" --cpus="$cpus" --memory="$mem" \
|
||||
-v "$work:/src" -v /etc/machine-id:/etc/machine-id:ro \
|
||||
-v eureka-cargo-registry:/usr/local/cargo/registry -v eureka-nuget:/root/.nuget/packages \
|
||||
-e CARGO_TARGET_DIR=/src/target \
|
||||
-e CARGO_TARGET_DIR=/src/target -e SHELLOPTS=pipefail \
|
||||
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0='*' \
|
||||
$docker_args \
|
||||
-w /src "$image" bash -o pipefail -c "$cmd"
|
||||
|
|
|
|||
Loading…
Reference in a new issue