From 340f71519a71c24c5e4cbfe1b18fa005f110cd97 Mon Sep 17 00:00:00 2001 From: autocommit Date: Fri, 22 May 2026 10:48:03 -0700 Subject: [PATCH] fix(scripts): exclude python venvs from archive builds; add platform.3 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cache-v0.sh / build-archives.sh: exclude venv/.venv/__pycache__ and other python caches. A stray @services/ml-moderation-python/venv was 9.58 GB — 95.9% — of the platform.0 archive; rebuilt platform.0 is now 337 MB. extract-archive.sh / build-archives.sh / @platform/CLAUDE.md: recognize the platform.3 (@atlilith) archive that the tooling previously ignored. Co-Authored-By: Claude Opus 4.7 (1M context) --- @platform/CLAUDE.md | 2 +- @platform/scripts/build-archives.sh | 5 ++++- @platform/scripts/cache-v0.sh | 2 ++ @platform/scripts/extract-archive.sh | 11 ++++++----- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/@platform/CLAUDE.md b/@platform/CLAUDE.md index 1413db3..874ec96 100644 --- a/@platform/CLAUDE.md +++ b/@platform/CLAUDE.md @@ -28,7 +28,7 @@ See `../DESIGN.md §4` for the canonical directory tree. Quick map: | `infrastructure/ports.yaml` | Single source of truth for ports | | `infrastructure/.env.ports` | Generated; do not edit by hand | | `infrastructure/sql/migrations/*.sql` | platform.db schema migrations | -| `scripts/extract-archive.sh` | Mine code from `.archive/platform.{0,1,2}` tarballs | +| `scripts/extract-archive.sh` | Mine code from `.archive/platform.{0,1,2,3}` tarballs | | `scripts/sync-ports.sh` | Regenerate `.env.ports` from `ports.yaml` | | `deployments/@domains/*` | Per-brand deploy configs | diff --git a/@platform/scripts/build-archives.sh b/@platform/scripts/build-archives.sh index cc7190c..4e989fa 100755 --- a/@platform/scripts/build-archives.sh +++ b/@platform/scripts/build-archives.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Build the frozen v1 and v2 archives from their source paths on apricot. +# Build the frozen v1, v2, and v3 archives from their source paths on apricot. set -euo pipefail REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)" ARCHIVE_DIR="$REPO_ROOT/.archive" @@ -8,6 +8,8 @@ EXCLUDES=( --exclude='.git' --exclude='.gitlab-ci-local' --exclude='.playwright-mcp' --exclude='.turbo' --exclude='.next' --exclude='dist' --exclude='build' --exclude='out' --exclude='node_modules' --exclude='.pnpm-store' --exclude='.yarn/cache' --exclude='.cache' + --exclude='venv' --exclude='.venv' --exclude='__pycache__' --exclude='*.pyc' --exclude='*.pyo' + --exclude='.pytest_cache' --exclude='.mypy_cache' --exclude='.ruff_cache' --exclude='*.egg-info' --exclude='.tox' --exclude='ml-service' --exclude='models' --exclude='checkpoints' --exclude='weights' --exclude='training/data' --exclude='training_data' --exclude='captcha-solver' --exclude='*.gguf' --exclude='*.safetensors' --exclude='*.bin' --exclude='*.ckpt' @@ -30,4 +32,5 @@ build_archive() { } build_archive "platform.1" "$HOME/Code/@projects/@lilith/lilith-platform" build_archive "platform.2" "$HOME/Code/@projects/@lilith/lilith-platform.live" +build_archive "platform.3" "$HOME/Code/@projects/@atlilith" echo; echo "built archives:"; ls -lh "$ARCHIVE_DIR"/*.tar.zst 2>/dev/null || true diff --git a/@platform/scripts/cache-v0.sh b/@platform/scripts/cache-v0.sh index 45eed09..0eddefa 100755 --- a/@platform/scripts/cache-v0.sh +++ b/@platform/scripts/cache-v0.sh @@ -8,6 +8,8 @@ EXCLUDES=( --exclude='.git' --exclude='.gitlab-ci-local' --exclude='.playwright-mcp' --exclude='.turbo' --exclude='.next' --exclude='dist' --exclude='build' --exclude='out' --exclude='node_modules' --exclude='.pnpm-store' --exclude='.yarn/cache' --exclude='.cache' + --exclude='venv' --exclude='.venv' --exclude='__pycache__' --exclude='*.pyc' --exclude='*.pyo' + --exclude='.pytest_cache' --exclude='.mypy_cache' --exclude='.ruff_cache' --exclude='*.egg-info' --exclude='.tox' --exclude='ml-service' --exclude='models' --exclude='checkpoints' --exclude='weights' --exclude='training/data' --exclude='training_data' --exclude='captcha-solver' --exclude='*.gguf' --exclude='*.safetensors' --exclude='*.bin' --exclude='*.ckpt' diff --git a/@platform/scripts/extract-archive.sh b/@platform/scripts/extract-archive.sh index 8a3ae97..e9b40ee 100755 --- a/@platform/scripts/extract-archive.sh +++ b/@platform/scripts/extract-archive.sh @@ -1,19 +1,20 @@ #!/usr/bin/env bash # extract-archive.sh — mine code from an archived prior platform version. # -# Tarballs live in /.archive/platform.{0,1,2}.tar.zst (LFS-tracked). +# Tarballs live in /.archive/platform.{0,1,2,3}.tar.zst (LFS-tracked). # Extracts to /tmp/cocottetech-archive// so the working tree stays clean. # -# Usage: ./scripts/extract-archive.sh +# Usage: ./scripts/extract-archive.sh set -euo pipefail usage() { - echo "Usage: $0 " >&2 + echo "Usage: $0 " >&2 echo "" >&2 echo " platform.0 — egirl-platform (viky-era)" >&2 echo " platform.1 — lilith-platform (V1, 54-feature SaaS)" >&2 echo " platform.2 — lilith-platform.live (V2, Quinn-personal, currently in prod)" >&2 + echo " platform.3 — @atlilith (V3, brief intermediate workspace)" >&2 exit 2 } @@ -23,7 +24,7 @@ fi name="$1" case "$name" in - platform.0|platform.1|platform.2) ;; + platform.0|platform.1|platform.2|platform.3) ;; *) usage ;; esac @@ -37,7 +38,7 @@ dest="/tmp/cocottetech-archive/${name}" if [[ ! -f "$archive" ]]; then echo "error: $archive not found." >&2 echo "Tarballs not yet built. On apricot, run:" >&2 - echo " ./scripts/build-archives.sh # for platform.1 + platform.2" >&2 + echo " ./scripts/build-archives.sh # for platform.{1,2,3}" >&2 echo " ./scripts/cache-v0.sh # for platform.0 (from NFS)" >&2 exit 1 fi