fix(installer): quote model metadata in generated env - #2811
Open
tang-vu wants to merge 1 commit into
Open
Conversation
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.
Summary
.envcan be sourced with spaces, parentheses, and semicolon-separated alternativesWhy this matters
Closes #2617. The production hardware/model selection path writes
MODEL_RECOMMENDATION_REASON,MODEL_RECOMMENDED_ALTERNATIVES, andMODEL_PERFORMANCE_LABELinto.env. Those values contain shell-significant spaces, parentheses, and semicolons. Unquoted output madesource .envfail and could interpret alternative model entries as commands, preventing operators from loading API keys and other settings after installation.Overlap check
Searched open and closed PRs for
MODEL_RECOMMENDATION_REASON env quote,MODEL_RECOMMENDED_ALTERNATIVES,multiline env, issue#2617, and the three platform env generators. No existing PR covers model-metadata dotenv quoting. The scope is independent of recent atomic-write and sed-escaping changes because it fixes the generated value grammar itself.Test plan
bash -n ods/installers/phases/06-directories.sh ods/installers/macos/lib/env-generator.sh ods/tests/smoke/installer-env-smoke.shbash ods/tests/smoke/installer-env-smoke.sh— model-metadata, schema, dependency, and compose checks pass; existing unrelated phase-07ai_errfunction-resolution check failsods/installers/windows/lib/env-generator.ps1git diff --checkGenerated with Codex