Skip to content

Harden example scripts with strict shell options (#131) - #202

Open
Cid-oe wants to merge 2 commits into
dmarro89:mainfrom
Cid-oe:feat/issue-131-strict-shell-scripts
Open

Cid-oe wants to merge 2 commits into
dmarro89:mainfrom
Cid-oe:feat/issue-131-strict-shell-scripts

Conversation

@Cid-oe

@Cid-oe Cid-oe commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #131

Changes

  • Added set -euo pipefail to all helper scripts in examples/:
    • examples/build_and_run.sh
    • examples/run_docker.sh
    • examples/test_all.sh
  • Verified bash syntax across all scripts.

Summary by CodeRabbit

  • Bug Fixes
    • Improved example scripts to stop immediately when commands fail, variables are undefined, or pipeline steps encounter errors.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7a689078-7946-4794-8e01-e9977599ecf8

📥 Commits

Reviewing files that changed from the base of the PR and between a57dedc and 839bec1.

📒 Files selected for processing (3)
  • examples/build_and_run.sh
  • examples/run_docker.sh
  • examples/test_all.sh

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The three example shell scripts now enable strict Bash execution. They exit on command failures, unset variables, and failed pipeline stages.

Changes

Strict shell execution

Layer / File(s) Summary
Enable strict shell options
examples/build_and_run.sh, examples/run_docker.sh, examples/test_all.sh
Each script adds set -euo pipefail without changing its existing commands or Make targets.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to e8bf4

The scripts preserve their existing Make targets while improving failure propagation, so the change is mergeable with normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description identifies the changed scripts and linked issue, but it omits the required What, Why, How to test, and Pre-flight sections. It also provides no concrete verification command or checkli… Add the required What, Why, How to test, and Pre-flight sections. Include a concrete syntax-check command and mark each applicable pre-flight item as complete or explain why it is not applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: adding strict shell options to the example scripts.
Linked Issues check ✅ Passed The PR satisfies #131. It adds set -euo pipefail to examples/build_and_run.sh, examples/run_docker.sh, and examples/test_all.sh. The scripts remain simple. The existing Make targets remain unc…
Out of Scope Changes check ✅ Passed The whole-PR diff contains only the required strict shell option additions in the three scripts named by #131. It contains no unrelated source, build-target, or README changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Full details: Description check

Explanation

The description identifies the changed scripts and linked issue, but it omits the required What, Why, How to test, and Pre-flight sections. It also provides no concrete verification command or checklist status.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Cid-oe <cid066a86@gmail.com>
@Cid-oe
Cid-oe force-pushed the feat/issue-131-strict-shell-scripts branch from 839bec1 to 1658fce Compare September 14, 2026 14:33
@dmarro89

Copy link
Copy Markdown
Owner

Hi @Cid-oe thanks for the contribution.
Have you checked these points:

  • Keep the scripts simple and readable.
  • Ensure examples/build_and_run.sh, examples/test_all.sh, and examples/run_docker.sh still invoke the same Make targets.
  • Update examples/README.md only if any usage text needs to change.

? Thanks

@dmarro89

Copy link
Copy Markdown
Owner

@codex review

This branch has not been deployed

No deployments
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.

Harden example scripts with strict shell options

2 participants