Skip to content

fix(config): ignore yaml backup files in model loader#9443

Open
leinasi2014 wants to merge 1 commit intomudler:masterfrom
leinasi2014:codex/fix-model-config-loader-yaml-suffix
Open

fix(config): ignore yaml backup files in model loader#9443
leinasi2014 wants to merge 1 commit intomudler:masterfrom
leinasi2014:codex/fix-model-config-loader-yaml-suffix

Conversation

@leinasi2014
Copy link
Copy Markdown

@leinasi2014 leinasi2014 commented Apr 20, 2026

Description

This PR fixes #9442.

It tightens LoadModelConfigsFromPath() so only files whose actual extension is .yaml or .yml are loaded as model configs. Backup files such as model.yaml.bak and model.yaml.bak.<timestamp> are now ignored.

It also adds a regression test covering:

  • loading a normal .yaml config
  • ignoring .yaml.bak
  • ignoring .yaml.bak.<timestamp>
  • preventing backup configs from overriding the active config

Notes for Reviewers

  • Reproduced in a live distributed deployment where stale *.yaml.bak* files in /models overrode the active config with the same name:.
  • Verified locally in Docker with:
    • make protogen-go
    • copying tests/models_fixtures/* into test-models
    • go test ./core/config

Signed commits

  • Yes, I signed my commits.

Only load files whose real extension is .yaml or .yml so backup files like model.yaml.bak do not override active configs. Add a regression test covering plain and timestamped backup files.

Assisted-by: Codex:gpt-5.4 docker
Signed-off-by: leinasi2014 <leinasi2014@gmail.com>
@leinasi2014 leinasi2014 force-pushed the codex/fix-model-config-loader-yaml-suffix branch from e0dc41d to 5959572 Compare April 20, 2026 11:09
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.

core/config: LoadModelConfigsFromPath treats .yaml.bak files as active model configs

2 participants