Skip to content

Land #2 and #3 on main (vision bundles + reliability fixes, 0.3.1) - #4

Merged
ensevengg merged 8 commits into
mainfrom
support-artifact-bundles
Oct 22, 2026
Merged

ensevengg merged 8 commits into
mainfrom
support-artifact-bundles

Conversation

@ensevengg

Copy link
Copy Markdown
Owner

Summary

PRs #2 and #3 were stacked on #1 and were merged into their parent branches (stabilize-sync-lifecycle and support-artifact-bundles), not into main. #1 had already been merged by then, so GitHub didn't carry their changes forward. As a result, main is still on 0.2.1 and has none of their commits:

support-artifact-bundles already contains #2 plus the #3 merge (3ddc769). This PR merges it into main unchanged. No code here is new; it is the same code that was reviewed in #2 and #3.

The only commit on main that this branch lacks is the #1 merge commit (f9df9a3), and that commit's content is already in the branch. The merge should therefore be conflict-free.

Verification

Please merge with a merge commit, not a squash. Follow-up work (fix/import-lifecycle-validation) is being rebased onto this branch.

🤖 Generated with Claude Code

ensevengg and others added 8 commits August 31, 2026 16:30
Alias creation: mkdir() and the stale-alias unlink() ran outside the
OSError->RuntimeError conversion, so a PermissionError/FileExistsError
escaped _sync_one and aborted the whole sync batch. Wrap both calls so
each model reports an error result instead.

Artifact order: a manifest that lists the projector before the model made
per-artifact partial persistence serialize a projector-only record, whose
primary_artifact lookup raised StopIteration and aborted the batch. The
adapter now normalizes model layers first, partial persistence never
serializes without a model artifact, and primary_artifact raises a clear
ValueError if the invariant is ever violated.

Bundle co-location: re-pulling one artifact of a vision bundle changed
import_user_repo, but the unchanged artifact was still reused from the old
digest-keyed directory, splitting the pair across LM Studio directories.
Reuse now requires the prior target to live in the current destination
directory, so both artifacts are re-imported together and vision
confirmation checks the new location.

Already-synced policy: a complete import that Ollama can no longer back
now reports "skipped" for bundles too, matching text models, instead of a
spurious stale error.

same_file(): treat st_ino == 0 as unknowable identity. On filesystems
without file ids (FAT/exFAT) every file on the volume compared equal,
which could silently reuse a stale alias and import old weights.
Read state.json with utf-8-sig so an editor-added BOM no longer makes
every record disappear and trigger a mass re-import. Write through a
per-process temp file with fsync before the atomic replace, so concurrent
writers cannot interleave into one temp file and a crash cannot leave a
truncated state file behind.
status() no longer crashes when lms cannot be executed: with a broken
CLI, projector bundles read as pending instead of the whole command
failing for users with synced vision models.

doctor gains two checks: a reversible hard-link probe of a real blob into
each staging destination (catching restrictions such as Linux
fs.protected_hardlinks that same-volume st_dev checks cannot see), and an
lms ls --json inventory check that vision verification depends on.

prune now also sweeps .studiolink-imports, where copy-mode temporary
aliases live; anything found there survived a crash or cleanup failure
and pinned blob space.
_version_tuple concatenated every digit run in a component, so 0.1.0rc1
compared as (0, 1, 11) - newer than any 0.1.x release. Only the leading
numeric run counts now, so pre-releases never look newer than their
release.

The upgrade command pins the exact version it just reported, so the
success message cannot describe a different release than the one pip
installed.
The audit documents the verified failure modes behind this branch's
fixes, including two merge blockers in the bundles branch (projector-first
manifests and split vision bundles) found during review.
Reliability audit fixes + release 0.3.1
@ensevengg
ensevengg merged commit 4c86a50 into main Oct 22, 2026
7 checks passed
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.

1 participant