Skip to content

fix(fetch): preserve published models until replacement succeeds - #8

Open
DivyamTalwar wants to merge 1 commit into
FedericoTs:masterfrom
DivyamTalwar:fix/qp-preserve-model
Open

DivyamTalwar wants to merge 1 commit into
FedericoTs:masterfrom
DivyamTalwar:fix/qp-preserve-model

Conversation

@DivyamTalwar

Copy link
Copy Markdown

Summary

Fixes #7.

The forced-refresh path deletes the published output before HEAD or GET succeeds. A connection, HTTP, stream, or rename failure therefore leaves no working model. Retain the old output until the existing os.replace publication point.

Testing

Base: 252e5193902d466726da9af75047dfffff2ae662. Debian 12 Linux aarch64 in a nonroot disposable container, Python 3.11. The full existing smoke exits 0 with eight pre-existing optional research/hardware skips, explicitly not counted as passes. No Windows run or GPU/real-model benchmark is claimed.

The same final test files fail against unchanged production; the corrected branch gives:

Focused: 10 passed in 0.18s
Full applicable suite: 8 SKIPPED (a skip is not a pass):
all green
python tests/smoke.py
ruff check quantprobe
ruff format --check quantprobe
# Bandit medium-severity checks on changed package modules
git diff --check

All applicable commands above exited 0 locally. The snapshot is a complete upstream checkout plus this branch's exact changed-file bytes; no test is a copied production-function reimplementation. External I/O is mocked where stated. Dependencies and lockfiles are unchanged.

Security And Data Access

No credential, production-data, authentication, read-only guardrail or privileged workflow changes are included. Tests use synthetic inputs and disposable paths. No new benchmark, fitted law, or hardware capability is claimed.

Notes

This is publication ordering, not content authentication or concurrent-writer isolation. While a published output remains, each new --force invocation starts its replacement from zero; retries within one invocation resume. That tradeoff and two-copy disk cost are documented and tested. A forced attempt without a published output still resumes its existing partial. Existing HEAD/filesystem exceptions may still propagate.

AI-assisted implementation, isolated same-provider source review, and controller regression checks are disclosed. They are not maintainer approval, cross-vendor certification, or hosted CI. One focused, signed-off commit; no generated logs, personal config, model weights or worktree state is included.

Draft pending upstream CI and maintainer review. Companion changes touching the same module/test hook may require rebasing as they land; no combined branch is being submitted.

Address FedericoTs#7 with focused regression coverage.

AI-assisted implementation and isolated source review; exact validation and remaining platform limitations are recorded in the draft PR.

Signed-off-by: Divyam Talwar <divyamtalwar0@gmail.com>
@DivyamTalwar DivyamTalwar reopened this Sep 19, 2026
@DivyamTalwar
DivyamTalwar marked this pull request as ready for review September 19, 2026 21:21

This branch has not been deployed

No deployments
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.

A failed forced model refresh removes the previously working model

1 participant