fix(load-backend): reject missing option value for backend in load-backend-contract.sh - #5558
Open
vaibhavsrv wants to merge 1 commit into
Open
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
vaibhavsrv
force-pushed
the
fix/load-backend-contract-missing-value-guard
branch
from
September 17, 2026 04:46
300f6c6 to
3a02d3a
Compare
…ckend-contract.sh
vaibhavsrv
force-pushed
the
fix/load-backend-contract-missing-value-guard
branch
from
September 23, 2026 03:45
3a02d3a to
364dd80
Compare
This was referenced Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this matters
In
ods/scripts/load-backend-contract.sh, the CLI argument parsing loop unconditionally executesshift 2when encountering--backend. If--backendis passed as the final option without a value (for instance in automated scripts, test harnesses, or operator typos), Bash underset -euo pipefailhalts with an unhandledshift count must be <= $#failure before reaching the explicit$BACKEND_IDvalidation check. This leaves callers with an empty diagnostic stderr and a confusing internal shell abort.This patch adds an explicit parameter presence guard
[[ $# -ge 2 ]]for--backend, writing an actionable diagnosticMissing value for argument: --backendto standard error and exiting with usage code 1. Existing options, contract file lookups, and Python environment extraction logic remain untouched.Validation
bash ods/scripts/load-backend-contract.sh --backendfailed with internal shell shift error and empty diagnostic output.Missing value for argument: --backendto stderr; valid contracts continue to load and output expected shell exports.Overlap check
fix(pixel-inference): validate top_logprobs integer bounds) — API inference argument validation; no shell script overlap.fix(dashboard): guard compact resize callbacks after unmount) — UI resize observer, separate layer.fix: guard array indexing for SERVICE_PORTS parameter expansion) — Installer port parameter expansion, independent CLI helper.Risk / AI disclosure
Follow-up integration evidence