Skip to content

fix(demo): guard non-interactive stdin in demo-offline.sh - #5560

Open
vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/demo-offline-non-interactive-stdin-guard
Open

vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/demo-offline-non-interactive-stdin-guard

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Why this matters

In ods/scripts/demo-offline.sh, the interactive menu loop executes read -r choice. In CI pipelines, automated smoke tests, or redirected stdin (< /dev/null), read returns exit code 1 upon reaching EOF, causing the script to abort with failure under set -euo pipefail.

Append || break to read -r choice, allowing the script to cleanly exit 0 on stdin EOF while preserving interactive menu processing.

Validation

  • Baseline reproduction: bash ods/scripts/demo-offline.sh < /dev/null fails immediately with exit code 1.
  • Post-fix: test_demo_offline_noninteractive_stdin.py verifies EOF on stdin exits cleanly with code 0.
  • Offline demo suites: 1 passed. ShellCheck and diff checks pass; regression wired into Linux CI.

Overlap check

Searched live open/closed PRs by demo-offline.sh. #5143 supports Bash 3.2 case folding; it does not touch stdin loop termination.

Risk / AI disclosure

AI-assisted investigation, implementation and CLI regressions. This strengthens stdin terminal handling. Independent review remains a gate.

Follow-up integration evidence

Composed with #5143 at 5143 without conflicts. Offline demonstration workflows remain intact.
Backlog composition was local-only (production/test diffs, excluding workflow/Makefile wiring); it is not an upstream merge or independent human approval. Declared live-review gates remain open.

@vaibhavsrv
vaibhavsrv force-pushed the fix/demo-offline-non-interactive-stdin-guard branch from 1e6cb2d to d52054a Compare September 17, 2026 04:47
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