Skip to content

Tell the update skill to remove its snapshot after the merge - #216

Merged
realmarcin merged 7 commits into
mainfrom
docs/skill-snapshot-cleanup
Sep 25, 2026
Merged

realmarcin merged 7 commits into
mainfrom
docs/skill-snapshot-cleanup

Conversation

@realmarcin

@realmarcin realmarcin commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #174, closes #227, closes #228, closes #230, closes #236, closes #237, closes #245, closes #246, closes #251, closes #252, closes #253.

The update-xmech-page skill builds sparse shared clones of every Mech at the pinned revisions in the session scratchpad, and nothing removed them. After #120 that snapshot was 5.7 GB: TaxonMech 3.2 GB, ProteinTraitsMech 2.3 GB, the rest under 0.2 GB.

This session's own snapshot (…/scratchpad/refresh, 5.7 GB) stays until the #84 reruns are done. It also holds working files from the #120 refresh, including the only copy of the site-audit builder (#238), so the new listing would stop step 11 on it. Those files will be moved out first, then the snapshot goes by this step.

🤖 Generated with Claude Code

realmarcin and others added 4 commits September 25, 2026 14:03
A refresh builds sparse shared clones of every Mech in the scratchpad, about
6 GB, and nothing removed them (#174). Step 11 removes the snapshot once the PR
has merged, guarded against an unset variable, and step 2 gives its real size.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The skill named the session scratchpad itself as $SNAP, so step 11's rm -rf
could take the scratchpad and every worktree in it (#227). Step 1 now creates a
dedicated directory and refuses to reuse one, the PR records its absolute path
because the merge may come in another session (#228), and step 11 removes the
path from the PR only if it holds revisions.json, mechs/ and claw/. Step 4's
timings follow _fleet/README.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d snapshot

build_subsets.py takes about six minutes over the ten-Mech snapshot, less than
the census's eight, in every logged run at the #120 pins (#230). Step 11 also
says a later PR can rebuild the snapshot from the pins in site_audit.json.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t the same pins

Step 11 said step 2 could rebuild a removed snapshot, but step 2 makes only the
Mech clones; a rerun at the same pins also needs CLAW at the audited sha and a
revisions.json, and the skill now says how (#236). The removal also stops if
the directory holds anything but the clones, revisions.json and logs, and the
preamble says to keep working files outside it (#237).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…'s shape

Step 11 listed before/after copies of the derived data among what it removes
while its guard stops on them; they are working files and belong outside $SNAP
(#245). The same-pins rebuild recipe now shows the revisions.json shape step 7
reads and says to set SRC before step 2 (#246).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The preamble allowed any log in $SNAP while step 11's guard accepts only
*.log; the preamble and step 4 now say to use that suffix (#251).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…der set -e

The listing matched names as regular expressions, so revisionsXjson passed as
revisions.json, and it took a directory named *.log for a log (#252). It also
exited 1 when nothing was extra, which stops a set -e shell before the removal
(#253). A case loop compares literally, requires a *.log to be a regular file
and exits 0 on a clean snapshot; tested under bash 3.2, zsh and sh with set -e.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@realmarcin
realmarcin merged commit 75a1356 into main Sep 25, 2026
1 check passed
@realmarcin
realmarcin deleted the docs/skill-snapshot-cleanup branch September 25, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment