Skip to content

fix(cold-storage): ensure cold storage directory exists before archiving idle models in llm-cold-storage.sh - #5557

Closed
vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/cold-storage-create-initial-directory
Closed

vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/cold-storage-create-initial-directory

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Why this matters

In ods/scripts/llm-cold-storage.sh, do_archive() moves idle Hugging Face models from $HF_CACHE to $COLD_DIR/$name using mv. In fresh installations or on systems where cold storage maintenance has not yet executed, the $COLD_DIR directory does not exist on disk, causing mv to fail with No such file or directory and aborting maintenance tasks under set -euo pipefail.

Call mkdir -p "$COLD_DIR" prior to model relocation, ensuring the target storage directory is established before moving model weights. Existing directory validation, idle time thresholds, and symlink creation contracts remain untouched.

Validation

  • Baseline reproduction: running llm-cold-storage.sh --execute with an absent $COLD_DIR failed with AssertionError: Cold storage directory was not created.
  • Post-fix: test_cold_storage_initial_directory.py executes llm-cold-storage.sh --execute, confirms $COLD_DIR is created on demand, and verifies that archived models are relocated and valid symlinks are maintained in $HF_CACHE.
  • Cold storage suites: 2 passed. New-test Ruff, ShellCheck, and diff checks pass; new regressions wired into Linux CI.

Overlap check

Searched live open/closed PRs touching llm-cold-storage.sh. #5386 anchors relative symlink targets; this PR strengthens initial target directory creation during idle model archival. Their scopes do not overlap or conflict.

Risk / AI disclosure

AI-assisted investigation, implementation and CLI regressions. This strengthens initial archive directory creation boundaries. Independent human review and platform/runtime qualification remain gates. No running configuration, deployment or upstream merge changed.

Follow-up integration evidence

Composed with #5386 at 3c186f3 without conflicts. Production and test diffs passed together; cold storage symlink contracts 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