Skip to content

fix(preflight): guard load_env_file presence in ods-preflight.sh - #5601

Closed
vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/preflight-safe-env-function-guard
Closed

vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/preflight-safe-env-function-guard

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Why this matters

In ods/scripts/ods-preflight.sh, load_env_file was invoked directly after conditionally sourcing safe-env.sh. If lib/safe-env.sh was absent, load_env_file remained undefined and crashed preflight with command not found under set -euo pipefail.

Guard both helper sourcing and .env loading in an explicit block, ensuring safe fallback when environment helpers are not present.

Validation

  • Baseline reproduction: calling preflight when safe-env.sh is missing aborted on unbound load_env_file.
  • Post-fix: test_preflight_safe_env_guard.py executes preflight and verifies absence of command-not-found failures.
  • Preflight check suites: 1 passed. ShellCheck and diff checks pass; regression wired into Linux CI.

Overlap check

Searched live open/closed PRs by ods-preflight.sh. #5126 handles readonly variables; this hardens preflight helper availability.

Risk / AI disclosure

AI-assisted investigation, implementation and CLI regressions. This strengthens preflight execution. Independent review remains a gate.

Follow-up integration evidence

Composed with #5126 at 5126 without conflicts. Preflight verification 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.

@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