Skip to content

refactor: public AbstractPaths.preserve_in_zip for post-completion artifacts (#1389) - #1390

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/preserve-in-zip
Jul 17, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/preserve-in-zip

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Phase 1 of #1389: public AbstractPaths.preserve_in_zip(file_path) — appends a post-completion artifact into the search's .zip so the restore() cycle (rmtree + re-extract) cannot destroy it. Public home for the private _append_to_search_zip helper 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 to output_path. No existing behaviour changes.

Test Plan

  • New tests: preserved file survives zip → preserve → restore; append is idempotent; no-zip is a no-op.
  • Full test_autofit/ suite: 1499 passed / 1 skipped.

Part of #1389 (phase 2 = autogalaxy/autolens caller switch + helper deletion).

🤖 Generated with Claude Code

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>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 17, 2026
@Jammy2211
Jammy2211 merged commit 5865957 into main Jul 17, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/preserve-in-zip branch July 17, 2026 09:15
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
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