fix(preserve-model): parse exported variables in parse_dotenv in preserve-active-model.py - #5562
Open
vaibhavsrv wants to merge 1 commit into
Open
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
…erve-active-model.py
vaibhavsrv
force-pushed
the
fix/preserve-active-model-export-prefix
branch
from
September 17, 2026 04:47
2a63df2 to
0ebcda0
Compare
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/preserve-active-model.py,parse_dotenv()parsed key-value lines without stripping theexportkeyword. Any environment variables written asexport KEY=VALUEwere rejected by identifier regex and dropped, causing active model contracts to be lost during upgrades.Strip leading
exportprefixes before key-value splitting, aligning dotenv ingestion withvalidate-env.shand shell standards.Validation
parse_dotenv()on.envwithexport GGUF_FILE=...returned an empty dictionary.test_preserve_active_model_export_prefix.pyverifies export-prefixed configuration keys parse accurately.Overlap check
Searched live open/closed PRs by
preserve-active-model.py. #5368 handles GGUF unsampled metadata; this hardens upgrade contract preservation.Risk / AI disclosure
AI-assisted investigation, implementation and CLI regressions. This strengthens upgrade dotenv parsing. Independent review remains a gate.
Follow-up integration evidence
Composed with #5368 at 3c186f3 without conflicts. Active model preservation 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.