Commit Graph
10 Commits
Author SHA1 Message Date
Joseph Magly c271afa7d6 fix(persistence): repair the #645 changelog entry; make rollback tests platform-correct
Grok review r1 for #674: the #645 CHANGELOG entry is one coherent paragraph
that says rollback is manual wherever no staging descriptor is held,
including Windows (#667). The 20 rollback tests that assumed a held
descriptor branch on the same capability flag the code checks: without a
descriptor they assert the refusal and that nothing moved. Adds a test for an
EMFILE pin failure followed by a post-promotion refusal.
2026-11-25 12:52:35 -05:00
Joseph Magly 1418c5109c Merge main dd7cef9 into fix/644-645-checkpoint-rollback-capacity
Keep both sides: #659's snapshot close tests and this branch's snapshot plan
tests in tests/test_model_snapshot.py, and both CHANGELOG entries.
2026-11-25 07:51:30 -05:00
Joseph Magly 3500f9dfe0 Merge main 3a49e8e into fix/644-645-checkpoint-rollback-capacity; address review r1
Sync with #658 (fd-held staging cleanup): staging cleanup keeps #658's held
handle plus the keep_staging condition, and rollback takes its identity from
the held staging handle. Review r1 fixes for #664: staging is marked possibly
foreign before the move-aside and cleared only on a positive identity check,
so a failing check or an interrupt keeps staging; the backup is restored with
the no-replace rename helper and kept if the destination is occupied or
no-replace is unsupported; on POSIX an unpinned identity is never recorded, so
rollback refuses. Docs call the plan's host figure a conservative upper bound.
2026-11-25 03:54:35 -05:00
Joseph Magly 686ebddac9 Merge main 3a49e8e into fix/639-640-651-modelhandle-followups 2026-11-25 03:47:21 -05:00
Joseph Magly 5458b193a6 fix(models): report DiskSnapshot removal failures and close ModelHandle cleanup gaps
DiskSnapshot.close() stays retryable and raises SnapshotError when files
remain, and a cleanup failure no longer replaces an in-flight error; the
ModelHandle finalizer only logs. Interrupted cleanup names the still-owned
offload directory, the snapshot-policy read records unreadable falsy policies,
and the pipeline offload guard requires ownership `is True`. The entry-point
test closes its handles and checks TMPDIR for leftovers.

Fixes #639
Fixes #640
Fixes #651
2026-11-25 02:41:03 -05:00
Joseph Magly e2db84183f fix(persistence,vocab): fd-held staging cleanup, keep cancellations, guard apply_all, silent-owner tie flag
Staging cleanup now removes only the directory held open since creation, so a
directory recreated at the staging path is never deleted. Cancellations after
a no-replace rename stay cancellations, with the outcome as a note; an
interrupted discovery publish names the file as possibly published.
VocabSurgeryStrategy.apply_all enforces the ID-only tokenizer guard itself, a
silent alias owner defers to the top-level tie flag, and
logical_values_identical no longer reshapes non-rank-2 values.

Fixes #649
Fixes #655
2026-11-25 02:38:37 -05:00
Joseph Magly 539283d52b fix(loader): attempt each ModelHandle cleanup stage once and never retry removal
Codex review r4 for #636: rather than retrying failed removals (which needed
identity checks and a held descriptor, each with its own race), each cleanup
stage is attempted once. The owned offload directory is released through
loader.release_offload_dir (also used by the pipeline's _cleanup_offload_dir):
ownership is dropped first, one removal is attempted, and a failure is logged
at WARNING with the path and the directory left on disk, untracked. The
restore point is detached and marked closed before close() runs, so close is
never repeated; failures are still raised by explicit cleanup.
2026-11-24 20:37:27 -05:00
Joseph Magly c74538a2be test: harden checkpoint transaction reliability 2026-08-16 00:28:15 -04:00
Joseph Magly 1240bf2adb test: enforce transactional persistence contracts 2026-08-14 23:32:30 -04:00
Joseph Magly 8bbb5f2926 test: add offline integration baseline 2026-08-14 13:15:32 -04:00