Skip to content

fix(demo-offline): handle EOF cleanly during menu and pause prompts - #5869

Closed
vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/demo-offline-eof
Closed

vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/demo-offline-eof

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Why this matters

In ods/scripts/demo-offline.sh, the interactive showcase menu and intermediate pause functions use read -r choice and read -r under set -e. When executed in automated testing harnesses, piped streams, or headless environments where standard input is closed (</dev/null), read returns a non-zero exit status on EOF. Because set -e is active, this unexpected return code abruptly terminates the script with exit code 1 instead of exiting cleanly with 0.

This patch updates pause() to allow non-zero returns (read -r || true) and modifies the menu loop to exit cleanly with code 0 upon encountering EOF on read -r choice.

Validation

  • Repro baseline: Executed bash demo-offline.sh </dev/null; confirmed script aborted with exit code 1.
  • Post-fix: Verified test_demo_offline_eof.py passes with exit code 0; demo-offline.sh renders header and exits 0 on EOF or explicit quit.
  • Demo suites: 2 passed. New-test Ruff, ShellCheck, and diff checks pass; new regressions wired into Linux CI.

Overlap check

Risk / AI disclosure

AI-assisted investigation, implementation and CLI regressions. This strengthens input EOF handling in the offline demonstration script, not runtime core services. Independent human review and platform/runtime qualification remain gates. No running configuration, deployment or upstream merge changed.

Follow-up integration evidence

Composed with #5861 at 2a24f49 without conflicts. Production and test diffs passed together; demo and showcase contracts 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.

@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

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.

2 participants