refactor: public AbstractPaths.preserve_in_zip for post-completion artifacts (#1389)#1390
Merged
Conversation
restore() deletes the output dir and re-extracts the zip, so a file written into files/ after a search completed (e.g. a cache derived from the finished result) is destroyed by the next resume unless it is also a zip member. preserve_in_zip(file_path) appends it (no-op without a zip; idempotent on existing members). Public home for the private _append_to_search_zip helper born in PyAutoGalaxy's SLaM resume fast-path (PyAutoGalaxy#502 / #504); the autogalaxy/autolens callers switch over in a follow-up leg once their repos free (checklist on #1389). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of #1389: public
AbstractPaths.preserve_in_zip(file_path)— appends a post-completion artifact into the search's.zipso therestore()cycle (rmtree + re-extract) cannot destroy it. Public home for the private_append_to_search_ziphelper that the SLaM resume fast-path introduced in PyAutoGalaxy (PyAutoGalaxy#504) and PyAutoLens (PyAutoLens#619) — their caller switch is phase 2, blocked until those repos' current claim frees.API Changes
Added
AbstractPaths.preserve_in_zip(file_path): no-op when the zip does not exist; idempotent on existing members; arcname relative tooutput_path. No existing behaviour changes.Test Plan
zip → preserve → restore; append is idempotent; no-zip is a no-op.test_autofit/suite: 1499 passed / 1 skipped.Part of #1389 (phase 2 = autogalaxy/autolens caller switch + helper deletion).
🤖 Generated with Claude Code