Skip to content

fix(selftests): stop the pipefail selftest heading from dumping the shell environment - #452

Open
LukasWodka wants to merge 1 commit into
developfrom
fix/selftest-heading-backticks
Open

fix(selftests): stop the pipefail selftest heading from dumping the shell environment#452
LukasWodka wants to merge 1 commit into
developfrom
fix/selftest-heading-backticks

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

One heading in scripts/tests/pipefail-early-close-selftest.sh (line 160) was written in double quotes with backticks around set, so bash ran the builtin set as a command substitution and the heading printed the entire shell environment — every variable, including any tokens present in the runner environment, and every function body — instead of the words. Assertions were never affected; only the log was.

Fix: single-quote the heading so it prints literally. The only other backtick heading in the selftests (line 771) was already escaped; grep -nE '(echo|printf) +"[^"]*\' scripts/tests/*.sh` finds nothing else.

Verification: bash -c on the new line prints the heading verbatim; shellcheck -S warning -x and bash -n clean; make selftest-pipefail-early-close locally: 168 passed, 0 failed — the heading now appears as text with nothing following it.


Note

Low Risk
Test-only logging fix with no production or assertion behavior changes.

Overview
Fixes a selftest log heading that accidentally ran the shell set builtin via backticks inside double quotes, so CI/local logs printed the entire environment instead of the section title.

The change single-quotes the echo for == a \set` line carries code too ...` so backticks are literal. Test assertions are unchanged; only output formatting is fixed.

Reviewed by Cursor Bugbot for commit 2cdd3c1. Bugbot is set up for automated code reviews on this repo. Configure here.

… dumping the environment

Inside double quotes the backticks were a command substitution, so bash ran the
builtin `set` and the heading printed every shell variable and function body
into the CI log. Single-quoted now; the assertions were never affected.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@LukasWodka LukasWodka self-assigned this Sep 9, 2026
@LukasWodka
LukasWodka requested a review from saadqbal September 9, 2026 09:01
@LukasWodka

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2cdd3c1. Configure here.

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