Tell the update skill to remove its snapshot after the merge - #216
Merged
Merged
Conversation
This was referenced Sep 25, 2026
Closed
realmarcin
force-pushed
the
docs/skill-snapshot-cleanup
branch
from
September 25, 2026 20:42
bef7e4a to
384f67b
Compare
This was referenced Sep 25, 2026
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>
realmarcin
force-pushed
the
docs/skill-snapshot-cleanup
branch
from
September 25, 2026 21:04
384f67b to
ffe1d32
Compare
…'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>
This was referenced Sep 25, 2026
Closed
…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>
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.
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-pageskill 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.SNAP=<scratchpad>/xmech-refresh-<date>withmkdir, which refuses an existing directory. Before, the skill named the scratchpad itself as$SNAP, so step 11's removal could have taken the whole scratchpad, including the worktrees of open PRs.revisions.json,mechs/andclaw/, so the scratchpad or any other directory is refused. It also stops, listing the entries, if the directory holds anything but the clones,revisions.jsonand logs (update skill step 11 says nothing is lost by removing the snapshot directory; it can hold work the pins cannot rebuild #237). It says how a later PR rebuilds a snapshot at the same pins: CLAW at the audit's sha withrefresh_manifest.py --checkonly, andrevisions.jsonfrom the audit (update skill step 11 says a removed snapshot can be rebuilt with step 2; that rebuilds only the Mech clones #236). It says never to touch$SRC, and why removing--sharedclones can't harm the source checkouts._fleet/README.mdgive the measured timings: census about 8 minutes,build_subsets.pyabout 6 (Pipeline timings say build_subsets.py takes longer than the census; it takes about 6 minutes to the census's 8 #230).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